comparison Doc/texinputs/python.sty @ 22921:3c876ff29a83 legacy-trunk

Add \csimplemacro to parallel the csimplemacrodesc environment. Fix a typo in the comments for csimplemacrodesc.
author Fred Drake <fdrake@acm.org>
date Tue, 09 Apr 2002 20:16:47 +0000
parents d778ea9de780
children d6322983069e
comparison
equal deleted inserted replaced
22920:2392af05f052 22921:3c876ff29a83
611 \index{#2@{\py@idxcode{#1}} (C type)} 611 \index{#2@{\py@idxcode{#1}} (C type)}
612 \fi] 612 \fi]
613 }{\end{fulllineitems}} 613 }{\end{fulllineitems}}
614 614
615 % Funky macros ----------------------------------------------------------- 615 % Funky macros -----------------------------------------------------------
616 % \begin{csimplemacro}{name} 616 % \begin{csimplemacrodesc}{name}
617 % -- "simple" because it has no args; NOT for constant definitions! 617 % -- "simple" because it has no args; NOT for constant definitions!
618 \newenvironment{csimplemacrodesc}[1]{ 618 \newenvironment{csimplemacrodesc}[1]{
619 \begin{fulllineitems} 619 \begin{fulllineitems}
620 \item[\bfcode{#1}\index{#1@{\py@idxcode{#1}} (macro)}] 620 \item[\bfcode{#1}\index{#1@{\py@idxcode{#1}} (macro)}]
621 }{\end{fulllineitems}} 621 }{\end{fulllineitems}}
785 % code is the most difficult one... 785 % code is the most difficult one...
786 \newcommand{\code}[1]{\textrm{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% 786 \newcommand{\code}[1]{\textrm{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}%
787 \texttt{#1}}} 787 \texttt{#1}}}
788 788
789 \newcommand{\bfcode}[1]{\code{\bfseries#1}} % bold-faced code font 789 \newcommand{\bfcode}[1]{\code{\bfseries#1}} % bold-faced code font
790 \newcommand{\csimplemacro}[1]{\code{#1}}
790 \newcommand{\kbd}[1]{\code{#1}} 791 \newcommand{\kbd}[1]{\code{#1}}
791 \newcommand{\samp}[1]{`\code{#1}'} 792 \newcommand{\samp}[1]{`\code{#1}'}
792 % This weird definition of \var{} allows it to always appear in roman 793 % This weird definition of \var{} allows it to always appear in roman
793 % italics, and won't get funky in code fragments when we play around 794 % italics, and won't get funky in code fragments when we play around
794 % with fonts. This also works directly in math mode. 795 % with fonts. This also works directly in math mode.