Move setting of ioready 'wait' earlier in call chain, to
[python/dscho.git] / Doc / texinputs / howto.cls
blob5fc7a704691dd3c37bc6d0cc8e8eee59ae160792
2 % howto.cls for the Python documentation
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesClass{howto}
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}
18 % Optional packages:
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
23 % distribution.
25 % The "fancyhdr" package makes nicer page footers reasonable to
26 % implement, and is used to put the chapter and section information in
27 % the footers.
29 \RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
32 % Required package:
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}{
51 \py@doHorizontalRule
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.
56 \def\\{, }
57 \pdfinfo{
58 /Author (\@author)
59 /Title (\@title)
62 \begin{flushright}
63 {\rm\Huge\py@HeaderFamily \@title} \par
64 {\em\large\py@HeaderFamily \py@release\releaseinfo} \par
65 \vspace{25pt}
66 {\Large\py@HeaderFamily \@author} \par
67 \vspace{25pt}
68 \@date \par
69 \py@authoraddress \par
70 \end{flushright}
71 \@thanks
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}{
80 \begingroup
81 \parskip = 0mm
82 \py@OldTableofcontents
83 \endgroup
84 \py@doHorizontalRule
85 \vspace{12pt}
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}{
95 \clearpage
96 \py@OldTheindex
97 \addcontentsline{toc}{section}{\indexname}
100 \@ifundefined{fancyhf}{
101 \pagestyle{plain}}{
102 \pagestyle{normal}} % start this way; change for
103 \pagenumbering{arabic} % ToC & chapters
104 \setcounter{secnumdepth}{2}
106 \thispagestyle{empty}