From: Fred Drake Date: Thu, 25 May 2006 02:45:39 +0000 (+0000) Subject: fix broken links in PDF X-Git-Tag: v2.4.4c1~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=765ac58b99a7782925fe87c4264e06cd72692e74;p=thirdparty%2FPython%2Fcpython.git fix broken links in PDF (SF patch #1281291, contributed by Rory Yorke) --- diff --git a/Doc/ACKS b/Doc/ACKS index 2e695406788d..32275961ca1a 100644 --- 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 diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 1f480a9e150b..9c6bcc77e4a6 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -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