2
% howto.cls for the Python documentation
5
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
7
[1998/02/25 Document class (Python HOWTO)]
9
\RequirePackage{pypaper}
11
% Change the options here to get a different set of basic options, This
12
% is where to add things like "a4paper" or "10pt".
14
\LoadClass[twoside]{article}
16
\setcounter{secnumdepth}{1}
20
% If processing of these documents fails at your TeX installation,
21
% these may be commented out (independently) to make things work.
22
% These are both supplied with the current version of the teTeX
25
% The "fancyhdr" package makes nicer page footers reasonable to
26
% implement, and is used to put the chapter and section information in
29
\RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
34
% This gives us all the Python-specific markup that we really want.
35
% This should come last. Do not change this.
37
\RequirePackage{python}
39
% support for module synopsis sections:
40
\newcommand{\py@ModSynopsisFilename}{\jobname.syn}
43
% need to do one of these....
44
\newcommand{\py@doHorizontalRule}{\rule{\textwidth}{1pt}}
47
% Change the title page to look a bit better, and fit in with the
48
% fncychap ``Bjarne'' style a bit better.
50
\renewcommand{\maketitle}{
52
\@ifundefined{pdfinfo}{}{{
53
% This \def is required to deal with multi-line authors; it
54
% changes \\ to ', ' (comma-space), making it pass muster for
55
% generating document info in the PDF file.
63
{\rm\Huge\py@HeaderFamily \@title} \par
64
{\em\large\py@HeaderFamily \py@release} \par
66
{\Large\py@HeaderFamily \@author} \par
69
\py@authoraddress \par
72
\setcounter{footnote}{0}
73
\let\thanks\relax\let\maketitle\relax
74
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
78
\let\py@OldTableofcontents=\tableofcontents
79
\renewcommand{\tableofcontents}{
82
\py@OldTableofcontents
86
\py@doing@page@targetstrue
89
% Fix the theindex environment to add an entry to the Table of
90
% Contents; this is much nicer than just having to jump to the end of
91
% the book and flip around, especially with multiple indexes.
93
\let\py@OldTheindex=\theindex
94
\renewcommand{\theindex}{
97
\addcontentsline{toc}{section}{\indexname}
100
\@ifundefined{fancyhf}{
102
\pagestyle{normal}} % start this way; change for
103
\pagenumbering{arabic} % ToC & chapters
104
\setcounter{secnumdepth}{2}
106
\thispagestyle{empty}