comparison Doc/texinputs/python.sty @ 25048:d0413de143ec 2.1

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.
author Fred Drake <fdrake@acm.org>
date Tue, 27 Aug 2002 19:50:42 +0000
parents b664b02c3e91
children
comparison
equal deleted inserted replaced
25047:ec373696c17b 25048:d0413de143ec
854 \newcommand{\program}[1]{\strong{#1}} 854 \newcommand{\program}[1]{\strong{#1}}
855 \newcommand{\programopt}[1]{\strong{#1}} 855 \newcommand{\programopt}[1]{\strong{#1}}
856 % Note that \longprogramopt provides the '--'! 856 % Note that \longprogramopt provides the '--'!
857 \newcommand{\longprogramopt}[1]{\strong{-{}-#1}} 857 \newcommand{\longprogramopt}[1]{\strong{-{}-#1}}
858 858
859 % \ulink{link text}{URL}
860 \@ifundefined{pdfannotlink}{
861 \newcommand{\ulink}[2]{#1}
862 }{
863 % The \noindent here is a hack -- we're forcing pdfTeX into
864 % horizontal mode since \pdfstartlink requires that.
865 \newcommand{\ulink}[2]{\noindent{%
866 \pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#2)}%
867 \py@LinkColor% color of the link text
868 #1%
869 \py@NormalColor% Turn it back off; these are declarative
870 \pdfendlink}% and don't appear bound to the current
871 }% formatting "box".
872 }
873
859 % cited titles: \citetitle{Title of Work} 874 % cited titles: \citetitle{Title of Work}
860 % online: \citetitle[url-to-resource]{Title of Work} 875 % online: \citetitle[url-to-resource]{Title of Work}
861 \newcommand{\citetitle}[2][URL]{\emph{#2}} 876 \newcommand{\citetitle}[2][URL]{\emph{#2}}
862 877
863 878