Staging
v0.5.1
https://github.com/python/cpython
Revision 595ac8a6fc2239a121ae769518fffc86473ed005 authored by Andrew M. Kuchling on 31 August 2004, 13:24:08 UTC, committed by Andrew M. Kuchling on 31 August 2004, 13:24:08 UTC
1 parent ab459f7
Raw File
Tip revision: 595ac8a6fc2239a121ae769518fffc86473ed005 authored by Andrew M. Kuchling on 31 August 2004, 13:24:08 UTC
Remove rotor license
Tip revision: 595ac8a
ltxmarkup.sty
% 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

% 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}\}}

\newenvironment{envdesc}[2]{
  \begin{fulllineitems}
    \item[\code{\e begin\{{\bfseries #1}\}{%
      \let\op=\py@ltx@optparam%
      \let\p=\py@ltx@param%
      \let\unspecified=\py@unspecified%
      \let\moreargs=\py@moreargs%
         #2}}]
    \item[\code{\e end\{{\bfseries #1}\}}]
    \index{#1 environment@\py@idxcode{#1} environment}
    \index{environments!#1@\py@idxcode{#1}}
}{\end{fulllineitems}}

\newenvironment{macrodesc}[2]{
  \begin{fulllineitems}
    \item[\code{{\e\bfseries#1}{%
      \let\op=\py@ltx@optparam%
      \let\p=\py@ltx@param%
      \let\unspecified=\py@unspecified%
      \let\moreargs=\py@moreargs%
      #2}}]
    \index{#1@\py@idxcode{#1}}
}{\end{fulllineitems}}

\newcommand{\env}[1]{\code{#1}}
\newcommand{\macro}[1]{\code{\e#1}}
back to top