diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
commit | 458120dd40db6b4df55a4e96b650e16798ef06a0 (patch) | |
tree | 8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Doc/texinputs/ltxmarkup.sty | |
parent | 3a742c699f6806c1145aea5149bf15de15a0afd7 (diff) |
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Doc/texinputs/ltxmarkup.sty')
-rw-r--r-- | sys/src/cmd/python/Doc/texinputs/ltxmarkup.sty | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Doc/texinputs/ltxmarkup.sty b/sys/src/cmd/python/Doc/texinputs/ltxmarkup.sty new file mode 100644 index 000000000..ace08cc83 --- /dev/null +++ b/sys/src/cmd/python/Doc/texinputs/ltxmarkup.sty @@ -0,0 +1,40 @@ +% 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}} |