comparison Doc/texinputs/python.sty @ 18427:6a5ef1994153 legacy-trunk

Add \ulink, grammar production markup.
author Fred Drake <fdrake@acm.org>
date Fri, 06 Jul 2001 22:44:48 +0000
parents b893d12045cb
children 8ca70c9c1971
comparison
equal deleted inserted replaced
18426:a83ff7739992 18427:6a5ef1994153
752 \newcommand{\C}{C} 752 \newcommand{\C}{C}
753 \newcommand{\EOF}{{\sc eof}} 753 \newcommand{\EOF}{{\sc eof}}
754 \newcommand{\NULL}{\constant{NULL}} 754 \newcommand{\NULL}{\constant{NULL}}
755 \newcommand{\infinity}{\ensuremath{\infty}} 755 \newcommand{\infinity}{\ensuremath{\infty}}
756 \newcommand{\plusminus}{\ensuremath{\pm}} 756 \newcommand{\plusminus}{\ensuremath{\pm}}
757 \newcommand{\menuselection}[1]{{\def\sub{ \ensuremath{>} }#1}}
757 758
758 % Also for consistency: spell Python "Python", not "python"! 759 % Also for consistency: spell Python "Python", not "python"!
759 760
760 % code is the most difficult one... 761 % code is the most difficult one...
761 \newcommand{\code}[1]{\textrm{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% 762 \newcommand{\code}[1]{\textrm{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}%
855 \newcommand{\rfc}[1]{RFC #1\index{RFC!RFC #1}} 856 \newcommand{\rfc}[1]{RFC #1\index{RFC!RFC #1}}
856 \newcommand{\program}[1]{\strong{#1}} 857 \newcommand{\program}[1]{\strong{#1}}
857 \newcommand{\programopt}[1]{\strong{#1}} 858 \newcommand{\programopt}[1]{\strong{#1}}
858 % Note that \longprogramopt provides the '--'! 859 % Note that \longprogramopt provides the '--'!
859 \newcommand{\longprogramopt}[1]{\strong{-{}-#1}} 860 \newcommand{\longprogramopt}[1]{\strong{-{}-#1}}
861 % \ulink{link text}{URL}
862 \newcommand{\ulink}[2]{#1}
860 863
861 % cited titles: \citetitle{Title of Work} 864 % cited titles: \citetitle{Title of Work}
862 % online: \citetitle[url-to-resource]{Title of Work} 865 % online: \citetitle[url-to-resource]{Title of Work}
863 \newcommand{\citetitle}[2][URL]{\emph{#2}} 866 \newcommand{\citetitle}[2][URL]{\emph{#2}}
864 867
868
869 \newenvironment{productionlist}[1][\py@badkey]{
870 \def\optional##1{{\Large[}##1{\Large]}}
871 \def\production##1##2{\code{##1}&::=&\code{##2}\\}
872 \def\orgroup##1{{\def\or{\textbar\ }##1}}
873 \def\token##1{##1}
874 \begin{center}
875 \begin{tabular}{lcl}
876 }{%
877 \end{tabular}
878 \end{center}
879 }
865 880
866 % Deprecation stuff. 881 % Deprecation stuff.
867 % Should be extended to allow an index / list of deprecated stuff. But 882 % Should be extended to allow an index / list of deprecated stuff. But
868 % there's a lot of stuff that needs to be done to make that automatable. 883 % there's a lot of stuff that needs to be done to make that automatable.
869 % 884 %