2 % howto.cls for the Python documentation
5 \NeedsTeXFormat{LaTeX2e
}[1995/
12/
01]
7 [1998/
02/
25 Document class (Python HOWTO)
]
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
]{article
}
15 \setcounter{secnumdepth
}{1}
19 % If processing of these documents fails at your TeX installation,
20 % these may be commented out (independently) to make things work.
21 % These are both supplied with the current version of the teTeX
24 % The "fancyhdr" package makes nicer page footers reasonable to
25 % implement, and is used to put the chapter and section information in
28 \RequirePackage{fancyhdr
}\typeout{Using fancier footers than usual.
}
33 % This gives us all the Python-specific markup that we really want.
34 % This should come last. Do not change this.
36 \RequirePackage{python
}
38 % support for module synopsis sections:
39 \newcommand{\py@ModSynopsisFilename
}{\jobname.syn
}
42 % need to do one of these....
43 \newcommand{\py@doHorizontalRule
}{\rule{\textwidth}{1pt
}}
46 % Change the title page to look a bit better, and fit in with the
47 % fncychap ``Bjarne'' style a bit better.
49 \renewcommand{\maketitle}{
51 \@ifundefined
{pdfinfo
}{}{
58 {\rm\Huge\py@HeaderFamily \@title
} \par
59 {\em\large\py@HeaderFamily
\py@release
} \par
61 {\Large\py@HeaderFamily \@author
} \par
64 \py@authoraddress
\par
67 \setcounter{footnote
}{0}
68 \let\thanks\relax\let\maketitle\relax
69 \gdef\@thanks
{}\gdef\@author
{}\gdef\@title
{}
73 \let\py@OldTableofcontents=
\tableofcontents
74 \renewcommand{\tableofcontents}{
77 \py@OldTableofcontents
81 \py@doing@page@targetstrue
84 % Fix the theindex environment to add an entry to the Table of
85 % Contents; this is much nicer than just having to jump to the end of
86 % the book and flip around, especially with multiple indexes.
88 \let\py@OldTheindex=
\theindex
89 \renewcommand{\theindex}{
92 \addcontentsline{toc
}{section
}{\indexname}
95 \@ifundefined
{fancyhf
}{
97 \pagestyle{normal
}} % start this way; change for
98 \pagenumbering{arabic
} % ToC & chapters
99 \setcounter{secnumdepth
}{2}
101 \thispagestyle{empty
}