]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix broken links in PDF
authorFred Drake <fdrake@acm.org>
Thu, 25 May 2006 02:45:39 +0000 (02:45 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 25 May 2006 02:45:39 +0000 (02:45 +0000)
(SF patch #1281291, contributed by Rory Yorke)

Doc/ACKS
Doc/texinputs/python.sty

index 2e695406788d48ec32f49d55bae84d11069ae892..32275961ca1a87ea36153f7cd23dfef9343bbd0b 100644 (file)
--- a/Doc/ACKS
+++ b/Doc/ACKS
@@ -192,6 +192,7 @@ Dan Wolfe
 Steven Work
 Thomas Wouters
 Ka-Ping Yee
+Rory Yorke
 Moshe Zadka
 Milan Zamazal
 Cheng Zhang
index 1f480a9e150bd037e5e8318c0da38d7a7f6a3895..9c6bcc77e4a6ca5a5c3ca994be57348b3f3449dc 100644 (file)
 % 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
 \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