1 % Created by Fred L. Drake, Jr. <fdrake@acm.org>, as part of the
2 % Python Documentation Project.
4 % Define some simple markup for the LaTeX command documentation:
6 \ProvidesPackage{ltxmarkup
}
7 \RequirePackage{python
} % fulllineitems environment
9 % These two macros are used in constructing the last parameter to the
10 % envdesc and macrodesc environments.
12 \newcommand{\py@ltx@optparam
}[1]{{[}\var{#1}{]}}
13 \newcommand{\py@ltx@param
}[1]{\
{\var{#1}\
}}
15 \newenvironment{envdesc
}[2]{
17 \item[\code{\e begin\
{{\bfseries #1}\
}{%
18 \let\op=
\py@ltx@optparam
%
21 %\item[\code{\e end\{{\bfseries #1}\}}]
22 \index{#1 environment@
\idxcode{#1} environment
}
23 \index{environments!
#1@
\idxcode{#1}}
24 }{\end{fulllineitems
}}
26 \newenvironment{macrodesc
}[2]{
28 \item[\code{{\e\bfseries#1}{%
29 \let\op=
\py@ltx@optparam
%
32 \index{#1@
\idxcode{\e #1}}
33 }{\end{fulllineitems
}}
35 \newcommand{\env}[1]{\code{#1}}
36 \newcommand{\macro}[1]{\code{\e#1}}