Oops -- Lib/Test should be Lib/test, of course!
[python/dscho.git] / Doc / texinputs / manual.cls
blobc7ab75ed16e39ca4dc2b489cdac363428a3ddf77
2 % manual.cls for the Python documentation
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesClass{manual}
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}
16 % Optional packages:
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
21 % distribution.
23 % The "fancyhdr" package makes nicer page footers reasonable to
24 % implement, and is used to put the chapter and section information in
25 % the footers.
27 % The "times" package makes the default font the PostScript Times
28 % font, which makes for smaller PostScript and a font that more people
29 % like.
31 \RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
32 \RequirePackage{times}\typeout{Using times fonts instead of Computer Modern.}
35 % Required packages:
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}{%
56 \begin{titlepage}%
57 \let\footnotesize\small
58 \let\footnoterule\relax
59 \@doHorizontalRule%
60 \@ifundefined{pdfinfo}{}{
61 \pdfinfo{
62 /Author (\@author)
63 /Title (\@title)
66 \begin{flushright}%
67 {\rm\Huge\HeaderFamily \@title \par}%
68 {\em\LARGE\HeaderFamily \@release \par}
69 \vfill
70 {\LARGE\HeaderFamily \@author \par}
71 \vfill\vfill
72 {\large
73 \@date \par
74 \vfill
75 \@authoraddress \par
77 \end{flushright}%\par
78 \@thanks
79 \end{titlepage}%
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}{
91 \if@openright
92 \ifodd\value{page}
93 \typeout{Adding blank page after the abstract.}
94 \vfil\pagebreak
95 \fi
96 \fi
97 \OldEndAbstract
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}%
108 \pagebreak%
109 \pagestyle{plain}%
111 \parskip = 0mm%
112 \OldTableofcontents%
113 \if@openright%
114 \ifodd\value{page}%
115 \typeout{Adding blank page after the table of contents.}%
116 \pagebreak\hspace{0pt}%
117 \fi%
118 \fi%
119 \cleardoublepage%
121 \pagenumbering{arabic}%
122 \@ifundefined{fancyhf}{}{\pagestyle{normal}}%
123 \@doing@page@targetstrue%