Mercurial > cpython-lru_cache-weakref
diff Doc/texinputs/python.sty @ 38286:043e29a1e398 2.4
fix broken links in PDF
(SF patch #1281291, contributed by Rory Yorke)
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 25 May 2006 02:45:39 +0000 |
| parents | 0349257e1ed5 |
| children |
line wrap: on
line diff
--- a/Doc/texinputs/python.sty Sat May 20 15:37:28 2006 +0000 +++ b/Doc/texinputs/python.sty Thu May 25 02:45:39 2006 +0000 @@ -869,8 +869,17 @@ % but only if we actually used hyperref: \ifpdf \newcommand{\url}[1]{{% - \py@pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#1)}% - \py@LinkColor% color of the link text + \py@pdfstartlink% + attr{ /Border [0 0 0] }% + user{% + /Subtype/Link% + /A<<% + /Type/Action% + /S/URI% + /URI(#1)% + >>% + }% + \py@LinkColor% color of the link text \py@smallsize\sf #1% \py@NormalColor% Turn it back off; these are declarative \pdfendlink}% and don't appear bound to the current @@ -946,7 +955,16 @@ \ifpdf \newcommand{\ulink}[2]{{% % For PDF, we *should* only generate a link when the URL is absolute. - \py@pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#2)}% + \py@pdfstartlink% + attr{ /Border [0 0 0] }% + user{% + /Subtype/Link% + /A<<% + /Type/Action% + /S/URI% + /URI(#2)% + >>% + }% \py@LinkColor% color of the link text #1% \py@NormalColor% Turn it back off; these are declarative
