summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2006-05-25 02:42:25 (GMT)
committerFred Drake <fdrake@acm.org>2006-05-25 02:42:25 (GMT)
commit61bbe6c37c30aff66c8ff76d50b45b1a05068f0f (patch)
treed220aa77948206533bedf3f50908731ea6b13577 /Doc
parent3cdf24bc9957540d28c86c8c7b3209b10997cd6f (diff)
downloadcpython-61bbe6c37c30aff66c8ff76d50b45b1a05068f0f.zip
cpython-61bbe6c37c30aff66c8ff76d50b45b1a05068f0f.tar.gz
cpython-61bbe6c37c30aff66c8ff76d50b45b1a05068f0f.tar.bz2
fix broken links in PDF
(SF patch #1281291, contributed by Rory Yorke)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ACKS1
-rw-r--r--Doc/texinputs/python.sty24
2 files changed, 22 insertions, 3 deletions
diff --git a/Doc/ACKS b/Doc/ACKS
index 14a5ca8..bbb3241 100644
--- a/Doc/ACKS
+++ b/Doc/ACKS
@@ -195,6 +195,7 @@ Dan Wolfe
Steven Work
Thomas Wouters
Ka-Ping Yee
+Rory Yorke
Moshe Zadka
Milan Zamazal
Cheng Zhang
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 4cb02de..3ce62f4 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -848,8 +848,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
@@ -925,7 +934,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