1999-03-16 12:08:26 -04:00
|
|
|
% Created by Fred L. Drake, Jr. <fdrake@acm.org>, as part of the
|
|
|
|
% Python Documentation Project.
|
|
|
|
%
|
|
|
|
% Define some simple markup for the LaTeX command documentation:
|
|
|
|
|
|
|
|
\ProvidesPackage{ltxmarkup}
|
|
|
|
\RequirePackage{python} % fulllineitems environment
|
|
|
|
|
1999-04-22 10:03:49 -03:00
|
|
|
% These two macros are used in constructing the last parameter to the
|
|
|
|
% envdesc and macrodesc environments.
|
|
|
|
|
|
|
|
\newcommand{\py@ltx@optparam}[1]{{[}\var{#1}{]}}
|
|
|
|
\newcommand{\py@ltx@param}[1]{\{\var{#1}\}}
|
|
|
|
|
1999-03-16 12:08:26 -04:00
|
|
|
\newenvironment{envdesc}[2]{
|
|
|
|
\begin{fulllineitems}
|
1999-04-22 10:03:49 -03:00
|
|
|
\item[\code{\e begin\{{\bfseries #1}\}{%
|
|
|
|
\let\op=\py@ltx@optparam%
|
|
|
|
\let\p=\py@ltx@param%
|
2000-09-21 12:53:54 -03:00
|
|
|
\let\unspecified=\py@unspecified%
|
|
|
|
\let\moreargs=\py@moreargs%
|
|
|
|
#2}}]
|
2000-04-03 01:19:14 -03:00
|
|
|
\item[\code{\e end\{{\bfseries #1}\}}]
|
2002-04-19 01:52:44 -03:00
|
|
|
\index{#1 environment@\py@idxcode{#1} environment}
|
|
|
|
\index{environments!#1@\py@idxcode{#1}}
|
1999-03-16 12:08:26 -04:00
|
|
|
}{\end{fulllineitems}}
|
|
|
|
|
|
|
|
\newenvironment{macrodesc}[2]{
|
|
|
|
\begin{fulllineitems}
|
1999-04-23 11:44:53 -03:00
|
|
|
\item[\code{{\e\bfseries#1}{%
|
1999-04-22 10:03:49 -03:00
|
|
|
\let\op=\py@ltx@optparam%
|
|
|
|
\let\p=\py@ltx@param%
|
2000-09-21 12:53:54 -03:00
|
|
|
\let\unspecified=\py@unspecified%
|
|
|
|
\let\moreargs=\py@moreargs%
|
1999-04-23 11:44:53 -03:00
|
|
|
#2}}]
|
2002-04-19 01:52:44 -03:00
|
|
|
\index{#1@\py@idxcode{#1}}
|
1999-03-16 12:08:26 -04:00
|
|
|
}{\end{fulllineitems}}
|
|
|
|
|
|
|
|
\newcommand{\env}[1]{\code{#1}}
|
|
|
|
\newcommand{\macro}[1]{\code{\e#1}}
|