diff options
author | Fred Drake <fdrake@acm.org> | 1998-03-07 05:29:15 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-03-07 05:29:15 (GMT) |
commit | 1c8d0e05790be31082dd8e3195199033912b6fbd (patch) | |
tree | 8b92d918e463990ca1cbdac50d12c6b255b7ab41 /Doc | |
parent | 2addd2a6dacea4d02bba084b1569f772ca2d0fc3 (diff) | |
download | cpython-1c8d0e05790be31082dd8e3195199033912b6fbd.zip cpython-1c8d0e05790be31082dd8e3195199033912b6fbd.tar.gz cpython-1c8d0e05790be31082dd8e3195199033912b6fbd.tar.bz2 |
Never, NEVER try to recover a screwed up file by carving a chunk out of an
RCS ,v archive! And certainly don't check it back in without testing it.
;-(
"@" becomes "@@" everywhere.
This one *is* tested!
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/texinputs/python.sty | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 3648c8e..177cf2a 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -13,7 +13,7 @@ \RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.} % for PDF output, use maximal compression -\@@ifundefined{pdfannotlink}{ +\@ifundefined{pdfannotlink}{ \let\LinkColor=\relax \let\NormalColor=\relax }{% @@ -52,18 +52,18 @@ % % This is *heavily* based on the hyperref package. % - \def\@@begindvi{% - \unvbox \@@begindvibox - \@@hyperfixhead + \def\@begindvi{% + \unvbox \@begindvibox + \@hyperfixhead } \def\hyperpageanchor{\pdfdest name{page.\thepage}} \let\HYPERPAGEANCHOR\hyperpageanchor - \def\@@hyperfixhead{% - \let\H@@old@@thehead\@@thehead - \gdef\@@foo{\pdfdest name{page.\thepage} fit}% - \expandafter\ifx\expandafter\@@empty\H@@old@@thehead - \def\H@@old@@thehead{\hfil}\fi - \def\@@thehead{\@@foo\relax\H@@old@@thehead}% + \def\@hyperfixhead{% + \let\H@old@thehead\@thehead + \gdef\@foo{\pdfdest name{page.\thepage} fit}% + \expandafter\ifx\expandafter\@empty\H@old@thehead + \def\H@old@thehead{\hfil}\fi + \def\@thehead{\@foo\relax\H@old@thehead}% } } @@ -73,7 +73,7 @@ \advance \topmargin by -\headsep % attempt to work a little better for A4 users -\@@ifundefined{paperheight}{ +\@ifundefined{paperheight}{ \textheight 9in }{ \textheight \paperheight @@ -84,7 +84,7 @@ \evensidemargin \oddsidemargin \marginparwidth 0.5in -\@@ifundefined{paperwidth}{ +\@ifundefined{paperwidth}{ \textwidth 6.5in }{ \textwidth \paperwidth @@ -107,7 +107,7 @@ \newcommand{\HeaderFamily}{\sffamily} % Redefine the 'normal' header/footer style when using "fancyhdr" package: -\@@ifundefined{fancyhf}{}{ +\@ifundefined{fancyhf}{}{ % Use \pagestyle{normal} as the primary pagestyle for text. \fancypagestyle{normal}{ \fancyhf{} @@ -129,13 +129,13 @@ % Redefine \cleardoublepage so that the blank page between chapters % gets the plain style and not the fancy style. This is described % in the documentation for the fancyhdr package by Piet von Oostrum. - \@@ifundefined{chapter}{}{ + \@ifundefined{chapter}{}{ \renewcommand{\cleardoublepage}{ - \clearpage\if@@openright \ifodd\c@@page\else + \clearpage\if@openright \ifodd\c@page\else \hbox{} \thispagestyle{plain} \newpage - \if@@twocolumn\hbox{}\newpage\fi\fi\fi + \if@twocolumn\hbox{}\newpage\fi\fi\fi } } } @@ -181,26 +181,26 @@ } % Augment the sectioning commands used to get our own font family in place: -\renewcommand{\section}{\@@startsection {section}{1}{\z@@}% - {-3.5ex \@@plus -1ex \@@minus -.2ex}% - {2.3ex \@@plus.2ex}% - {\reset@@font\Large\HeaderFamily}} -\renewcommand{\subsection}{\@@startsection{subsection}{2}{\z@@}% - {-3.25ex\@@plus -1ex \@@minus -.2ex}% - {1.5ex \@@plus .2ex}% - {\reset@@font\large\HeaderFamily}} -\renewcommand{\subsubsection}{\@@startsection{subsubsection}{3}{\z@@}% - {-3.25ex\@@plus -1ex \@@minus -.2ex}% - {1.5ex \@@plus .2ex}% - {\reset@@font\normalsize\HeaderFamily}} -\renewcommand{\paragraph}{\@@startsection{paragraph}{4}{\z@@}% - {3.25ex \@@plus1ex \@@minus.2ex}% +\renewcommand{\section}{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\reset@font\Large\HeaderFamily}} +\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\reset@font\large\HeaderFamily}} +\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\reset@font\normalsize\HeaderFamily}} +\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% {-1em}% - {\reset@@font\normalsize\HeaderFamily}} -\renewcommand{\subparagraph}{\@@startsection{subparagraph}{5}{\parindent}% - {3.25ex \@@plus1ex \@@minus .2ex}% + {\reset@font\normalsize\HeaderFamily}} +\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% {-1em}% - {\reset@@font\normalsize\HeaderFamily}} + {\reset@font\normalsize\HeaderFamily}} % Underscore hack (only act like subscript operator if in math mode) @@ -255,30 +255,30 @@ % Command to generate a reference to a function, statement, keyword, % operator. -\newcommand{\stindex}[1]{\indexii{statement}{#1@@{\idxcode{#1}}}} -\newcommand{\opindex}[1]{\indexii{operator}{#1@@{\idxcode{#1}}}} -\newcommand{\exindex}[1]{\indexii{exception}{#1@@{\idxcode{#1}}}} +\newcommand{\stindex}[1]{\indexii{statement}{#1@{\idxcode{#1}}}} +\newcommand{\opindex}[1]{\indexii{operator}{#1@{\idxcode{#1}}}} +\newcommand{\exindex}[1]{\indexii{exception}{#1@{\idxcode{#1}}}} \newcommand{\obindex}[1]{\indexii{object}{#1}} -\newcommand{\bifuncindex}[1]{\index{#1@@{\idxcode{#1()}} (built-in function)}} +\newcommand{\bifuncindex}[1]{\index{#1@{\idxcode{#1()}} (built-in function)}} % Add an index entry for a module -\newcommand{\refmodule}[2]{\index{#1@@{\idxcode{#1}} (#2module)}} +\newcommand{\refmodule}[2]{\index{#1@{\idxcode{#1}} (#2module)}} \newcommand{\refmodindex}[1]{\refmodule{#1}{}} \newcommand{\refbimodindex}[1]{\refmodule{#1}{built-in }} \newcommand{\refexmodindex}[1]{\refmodule{#1}{extension }} \newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }} % support for the module index -\if@@usemoduleindex +\if@usemoduleindex \newwrite\modindexfile \openout\modindexfile=mod\jobname.idx \fi % Add the defining entry for a module \newcommand{\defmodindex}[2]{% - \index{#1@@{\idxcode{#1}} (#2module)|textbf}% + \index{#1@{\idxcode{#1}} (#2module)|textbf}% \setindexsubitem{(in module #1)}% - \if@@usemoduleindex% + \if@usemoduleindex% \write\modindexfile{#1 \thepage}% \fi} @@ -291,9 +291,9 @@ \newcommand{\exmodindex}[1]{\defmodindex{#1}{extension }} % Additional string for an index entry -\newcommand{\index@@subitem}{} -\newcommand{\setindexsubitem}[1]{\renewcommand{\index@@subitem}{#1}} -\newcommand{\ttindex}[1]{\index{#1@@{\idxcode{#1}} \index@@subitem}} +\newcommand{\index@subitem}{} +\newcommand{\setindexsubitem}[1]{\renewcommand{\index@subitem}{#1}} +\newcommand{\ttindex}[1]{\index{#1@{\idxcode{#1}} \index@subitem}} % {fulllineitems} is used in one place in libregex.tex, but is really for @@ -314,13 +314,13 @@ \newenvironment{cfuncdesc}[3]{% \begin{fulllineitems}% \item[\code{#1 \bfcode{#2}(\varvars{#3})}]% - \index{#2@@{\idxcode{#2()}}}% + \index{#2@{\idxcode{#2()}}}% }{\end{fulllineitems}} \newenvironment{cvardesc}[2]{% \begin{fulllineitems}% \item[\code{#1 \bfcode{#2}}]% - \index{#2@@{\idxcode{#2}}}% + \index{#2@{\idxcode{#2}}}% }{\end{fulllineitems}} \newenvironment{ctypedesc}[1]{% @@ -389,7 +389,7 @@ \newcommand{\NULL}{\code{NULL}} % code is the most difficult one... -\newcommand{\code}[1]{{\@@vobeyspaces\@@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% +\newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% \mbox{\codefont{#1}}}} \newcommand{\bfcode}[1]{\code{\bfseries#1}} % bold-faced code font @@ -408,7 +408,7 @@ % Use this def/redef approach for \url{} since hyperref defined this already, % but only if we actually used hyperref: -\@@ifundefined{pdfannotlink}{% +\@ifundefined{pdfannotlink}{% \newcommand{\pythonurl}[1]{\mbox{\small\textsf{#1}}}% }{ \newcommand{\pythonurl}[1]{{% @@ -491,8 +491,8 @@ } \newcommand{\itemnewline}[1]{% - \@@tempdima\linewidth% - \advance\@@tempdima \leftmargin\makebox[\@@tempdima][l]{#1}% + \@tempdima\linewidth% + \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}% } \newcommand{\sectcode}[1]{{\sectcodefont{#1}}} @@ -508,20 +508,20 @@ % % \end{seealso} -\newif\if@@keyedmodule\@@keyedmodulefalse -\newcommand{\@@modulebadkey}{{--just-some-junk--}} +\newif\if@keyedmodule\@keyedmodulefalse +\newcommand{\@modulebadkey}{{--just-some-junk--}} -\@@ifundefined{pdfannotlink}{% - \newcommand{\seemodule}[3][\@@modulebadkey]{% - \ifx\@@modulebadkey#1\def\@@modulekey{#2}\else\def\@@modulekey{#1}\fi% - \ref{module-\@@modulekey}:\quad % +\@ifundefined{pdfannotlink}{% + \newcommand{\seemodule}[3][\@modulebadkey]{% + \ifx\@modulebadkey#1\def\@modulekey{#2}\else\def\@modulekey{#1}\fi% + \ref{module-\@modulekey}:\quad % Module \module{#2}% \quad (#3)% } -}{\newcommand{\seemodule}[3][\@@modulebadkey]{% - \ifx\@@modulebadkey#1\def\@@modulekey{#2}\else\def\@@modulekey{#1}\fi% - \ref{module-\@@modulekey}:\quad % - {\pdfannotlink attr{/Border [0 0 0]} goto name{label.module-\@@modulekey}% +}{\newcommand{\seemodule}[3][\@modulebadkey]{% + \ifx\@modulebadkey#1\def\@modulekey{#2}\else\def\@modulekey{#1}\fi% + \ref{module-\@modulekey}:\quad % + {\pdfannotlink attr{/Border [0 0 0]} goto name{label.module-\@modulekey}% \LinkColor Module \module{#2} \NormalColor% \pdfendlink% }% @@ -549,34 +549,34 @@ % \date{}. This allows the date to reflect the document's date and % release to specify the Python release that is documented. % -\newcommand{\@@release}{} +\newcommand{\@release}{} \newcommand{\version}{} \newcommand{\releasename}{Release} \newcommand{\release}[1]{% - \renewcommand{\@@release}{\releasename\space\version}% + \renewcommand{\@release}{\releasename\space\version}% \renewcommand{\version}{#1}} % Allow specification of the author's address separately from the % author's name. This can be used to format them differently, which % is a good thing. % -\newcommand{\@@authoraddress}{} -\newcommand{\authoraddress}[1]{\renewcommand{\@@authoraddress}{#1}} +\newcommand{\@authoraddress}{} +\newcommand{\authoraddress}[1]{\renewcommand{\@authoraddress}{#1}} % This sets up the fancy chapter headings that make the documents look % at least a little better than the usual LaTeX output. % -\@@ifundefined{ChTitleVar}{}{ +\@ifundefined{ChTitleVar}{}{ \ChNameVar{\raggedleft\normalsize\HeaderFamily} \ChNumVar{\raggedleft \bfseries\Large\HeaderFamily} \ChTitleVar{\raggedleft \rm\Huge\HeaderFamily} % This creates chapter heads without the leading \vspace*{}: - \def\@@makechapterhead#1{% - {\parindent \z@@ \raggedright \normalfont - \ifnum \c@@secnumdepth >\m@@ne + \def\@makechapterhead#1{% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne \DOCH \fi - \interlinepenalty\@@M + \interlinepenalty\@M \DOTI{#1} } } |