Kaydet (Commit) 61bbe6c3 authored tarafından Fred Drake's avatar Fred Drake

fix broken links in PDF

(SF patch #1281291, contributed by Rory Yorke)
üst 3cdf24bc
...@@ -195,6 +195,7 @@ Dan Wolfe ...@@ -195,6 +195,7 @@ Dan Wolfe
Steven Work Steven Work
Thomas Wouters Thomas Wouters
Ka-Ping Yee Ka-Ping Yee
Rory Yorke
Moshe Zadka Moshe Zadka
Milan Zamazal Milan Zamazal
Cheng Zhang Cheng Zhang
...@@ -848,8 +848,17 @@ ...@@ -848,8 +848,17 @@
% but only if we actually used hyperref: % but only if we actually used hyperref:
\ifpdf \ifpdf
\newcommand{\url}[1]{{% \newcommand{\url}[1]{{%
\py@pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#1)}% \py@pdfstartlink%
\py@LinkColor% color of the link text 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@smallsize\sf #1%
\py@NormalColor% Turn it back off; these are declarative \py@NormalColor% Turn it back off; these are declarative
\pdfendlink}% and don't appear bound to the current \pdfendlink}% and don't appear bound to the current
...@@ -925,7 +934,16 @@ ...@@ -925,7 +934,16 @@
\ifpdf \ifpdf
\newcommand{\ulink}[2]{{% \newcommand{\ulink}[2]{{%
% For PDF, we *should* only generate a link when the URL is absolute. % 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 \py@LinkColor% color of the link text
#1% #1%
\py@NormalColor% Turn it back off; these are declarative \py@NormalColor% Turn it back off; these are declarative
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment