Added 'description' class attribute to every command class (to help the
[python/dscho.git] / Doc / texinputs / howto.cls
blob127edc4a2d90db7047c22dee7fc47266f851c5e8
2 % howto.cls for the Python documentation
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesClass{howto}
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}
17 % Optional packages:
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
22 % distribution.
24 % The "fancyhdr" package makes nicer page footers reasonable to
25 % implement, and is used to put the chapter and section information in
26 % the footers.
28 \RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
31 % Required package:
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}{
50 \py@doHorizontalRule
51 \@ifundefined{pdfinfo}{}{
52 \pdfinfo{
53 /Author (\@author)
54 /Title (\@title)
57 \begin{flushright}
58 {\rm\Huge\py@HeaderFamily \@title} \par
59 {\em\large\py@HeaderFamily \py@release} \par
60 \vspace{25pt}
61 {\Large\py@HeaderFamily \@author} \par
62 \vspace{25pt}
63 \@date \par
64 \py@authoraddress \par
65 \end{flushright}
66 \@thanks
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}{
75 \begingroup
76 \parskip = 0mm
77 \py@OldTableofcontents
78 \endgroup
79 \py@doHorizontalRule
80 \vspace{12pt}
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}{
90 \clearpage
91 \py@OldTheindex
92 \addcontentsline{toc}{section}{\indexname}
95 \@ifundefined{fancyhf}{
96 \pagestyle{plain}}{
97 \pagestyle{normal}} % start this way; change for
98 \pagenumbering{arabic} % ToC & chapters
99 \setcounter{secnumdepth}{2}
101 \thispagestyle{empty}