Staging
v0.8.1
Revision 9706486b9fb8d25762095c855c3c2a976dcbf1d3 authored by Guido van Rossum on 10 April 2000, 13:52:48 UTC, committed by Guido van Rossum on 10 April 2000, 13:52:48 UTC
* '...%s...' % u"abc" now coerces to Unicode just like
  string methods. Care is taken not to reevaluate already formatted
  arguments -- only the first Unicode object appearing in the
  argument mapping is looked up twice. Added test cases for
  this to test_unicode.py.
1 parent 45ad3c4
Raw File
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%
      #2}}]
    \item[\code{\e end\{{\bfseries #1}\}}]
    \index{#1 environment@\idxcode{#1} environment}
    \index{environments!#1@\idxcode{#1}}
}{\end{fulllineitems}}

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

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