[Python-checkins] python/dist/src/Doc/texinputs python.sty,1.73.2.2,1.73.2.3
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
2002年8月27日 12:50:45 -0700
Update of /cvsroot/python/python/dist/src/Doc/texinputs
In directory usw-pr-cvs1:/tmp/cvs-serv9144/texinputs
Modified Files:
Tag: release21-maint
python.sty
Log Message:
Back-port the \ulink macro to the documentation package for Python 2.1.x
since a documentation patch included \ulink. Adding this here makes
back-porting further documentation patches easier than having to remove
\ulink from the patches.
Closes SF bug #598996.
Index: python.sty
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v
retrieving revision 1.73.2.2
retrieving revision 1.73.2.3
diff -C2 -d -r1.73.2.2 -r1.73.2.3
*** python.sty 22 Jun 2001 15:51:28 -0000 1.73.2.2
--- python.sty 27 Aug 2002 19:50:42 -0000 1.73.2.3
***************
*** 857,860 ****
--- 857,875 ----
\newcommand{\longprogramopt}[1]{\strong{-{}-#1}}
+ % \ulink{link text}{URL}
+ \@ifundefined{pdfannotlink}{
+ \newcommand{\ulink}[2]{#1}
+ }{
+ % The \noindent here is a hack -- we're forcing pdfTeX into
+ % horizontal mode since \pdfstartlink requires that.
+ \newcommand{\ulink}[2]{\noindent{%
+ \pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#2)}%
+ \py@LinkColor% color of the link text
+ #1%
+ \py@NormalColor% Turn it back off; these are declarative
+ \pdfendlink}% and don't appear bound to the current
+ }% formatting "box".
+ }
+
% cited titles: \citetitle{Title of Work}
% online: \citetitle[url-to-resource]{Title of Work}