2 % manual.cls for the Python documentation
5 \NeedsTeXFormat{LaTeX2e
}[1995/
12/
01]
7 [1998/
03/
03 Document class (Python manual)
]
10 % Change the options here to get a different set of basic options, This
11 % is where to add things like "a4paper" or "10pt".
13 \LoadClass[twoside,openright
]{report}
18 % If processing of these documents fails at your TeX installation,
19 % these may be commented out (independently) to make things work.
20 % These are both supplied with the current version of the teTeX
23 % The "fancyhdr" package makes nicer page footers reasonable to
24 % implement, and is used to put the chapter and section information in
27 % The "times" package makes the default font the PostScript Times
28 % font, which makes for smaller PostScript and a font that more people
31 \RequirePackage{fancyhdr
}\typeout{Using fancier footers than usual.
}
32 \RequirePackage{times
}\typeout{Using times fonts instead of Computer Modern.
}
37 % The "fncychap" package is used to get the nice chapter headers. The
38 % .sty file is distributed with Python, so you should not need to disable
39 % it. You'd also end up with a mixed page style; uglier than stock LaTeX!
41 \RequirePackage[Bjarne
]{fncychap
}\typeout{Using fancy chapter headings.
}
42 % Do horizontal rules it this way to match:
43 \newcommand{\@doHorizontalRule
}{\mghrulefill{\RW}}
46 % This gives us all the Python-specific markup that we really want.
47 % This should come last. Do not change this.
49 \RequirePackage{python
}
52 % Change the title page to look a bit better, and fit in with the
53 % fncychap ``Bjarne'' style a bit better.
55 \renewcommand{\maketitle}{%
57 \let\footnotesize\small
58 \let\footnoterule\relax
60 \@ifundefined
{pdfinfo
}{}{
67 {\rm\Huge\HeaderFamily \@title
\par}%
68 {\em\LARGE\HeaderFamily \@release
\par}
70 {\LARGE\HeaderFamily \@author
\par}
80 \setcounter{footnote
}{0}%
81 \let\thanks\relax\let\maketitle\relax
82 \gdef\@thanks
{}\gdef\@author
{}\gdef\@title
{}
86 % Catch the end of the {abstract} environment, but here make sure the
87 % abstract is followed by a blank page if the 'openright' option is used.
89 \let\OldEndAbstract=
\endabstract
90 \renewcommand{\endabstract}{
93 \typeout{Adding blank page after the abstract.
}
100 % This wraps the \tableofcontents macro with all the magic to get the
101 % spacing right and have the right number of pages if the 'openright'
102 % option has been used. This eliminates a fair amount of crud in the
103 % individual document files.
105 \let\OldTableofcontents=
\tableofcontents
106 \renewcommand{\tableofcontents}{%
107 \setcounter{page
}{1}%
115 \typeout{Adding blank page after the table of contents.
}%
116 \pagebreak\hspace{0pt
}%
121 \pagenumbering{arabic
}%
122 \@ifundefined
{fancyhf
}{}{\pagestyle{normal
}}%
123 \@doing@page@targetstrue
%