Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b4b64da

Browse files
committed
Add \ulink, grammar production markup.
1 parent 77602f2 commit b4b64da

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Doc/texinputs/python.sty

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@
754754
\newcommand{\NULL}{\constant{NULL}}
755755
\newcommand{\infinity}{\ensuremath{\infty}}
756756
\newcommand{\plusminus}{\ensuremath{\pm}}
757+
\newcommand{\menuselection}[1]{{\def\sub{ \ensuremath{>} }#1}}
757758

758759
% Also for consistency: spell Python "Python", not "python"!
759760

@@ -857,12 +858,26 @@
857858
\newcommand{\programopt}[1]{\strong{#1}}
858859
% Note that \longprogramopt provides the '--'!
859860
\newcommand{\longprogramopt}[1]{\strong{-{}-#1}}
861+
% \ulink{link text}{URL}
862+
\newcommand{\ulink}[2]{#1}
860863

861864
% cited titles: \citetitle{Title of Work}
862865
% online: \citetitle[url-to-resource]{Title of Work}
863866
\newcommand{\citetitle}[2][URL]{\emph{#2}}
864867

865868

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+
}
880+
866881
% Deprecation stuff.
867882
% Should be extended to allow an index / list of deprecated stuff. But
868883
% there's a lot of stuff that needs to be done to make that automatable.

0 commit comments

Comments
 (0)