Fred Drake | dbe132c | 1998-03-06 21:21:56 +0000 | [diff] [blame^] | 1 | % |
| 2 | % howto.cls for the Python documentation |
| 3 | % |
| 4 | |
| 5 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 6 | \ProvidesClass{howto} |
| 7 | [1998/02/25 Document class (Python HOWTO)] |
| 8 | |
| 9 | |
| 10 | % Change the options here to get a different set of basic options, This |
| 11 | % is where to add things like "a4paper" or "10pt". |
| 12 | % |
| 13 | \LoadClass[twoside]{article} |
| 14 | |
| 15 | |
| 16 | % Optional packages: |
| 17 | % |
| 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. |
| 22 | % |
| 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. |
| 26 | % |
| 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. |
| 30 | % |
| 31 | \RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.} |
| 32 | \RequirePackage{times}\typeout{Using times fonts instead of Computer Modern.} |
| 33 | |
| 34 | |
| 35 | % Required package: |
| 36 | % |
| 37 | % This gives us all the Python-specific markup that we really want. |
| 38 | % This should come last. Do not change this. |
| 39 | % |
| 40 | \newif\if@usemoduleindex\@usemoduleindexfalse |
| 41 | \RequirePackage{python} |
| 42 | |
| 43 | |
| 44 | % Change the title page to look a bit better, and fit in with the |
| 45 | % fncychap ``Bjarne'' style a bit better. |
| 46 | % |
| 47 | \renewcommand{\maketitle}{ |
| 48 | \@ifundefined{ChTitleVar}{}{ |
| 49 | \mghrulefill{\RW}} |
| 50 | \@ifundefined{pdfinfo}{}{ |
| 51 | \pdfinfo |
| 52 | author {\@author} |
| 53 | title {\@title} |
| 54 | } |
| 55 | \begin{flushright} |
| 56 | {\rm\Huge\HeaderFamily \@title} \par |
| 57 | {\em\large\HeaderFamily \@release} \par |
| 58 | \vspace{25pt} |
| 59 | {\Large\HeaderFamily \@author} \par |
| 60 | \vspace{25pt} |
| 61 | \@date \par |
| 62 | \@authoraddress \par |
| 63 | \end{flushright} |
| 64 | \@thanks |
| 65 | \setcounter{footnote}{0} |
| 66 | \let\thanks\relax\let\maketitle\relax |
| 67 | \gdef\@thanks{}\gdef\@author{}\gdef\@title{} |
| 68 | } |
| 69 | |
| 70 | |
| 71 | \let\OldTableofcontents=\tableofcontents |
| 72 | \renewcommand{\tableofcontents}{ |
| 73 | \begingroup |
| 74 | \parskip = 0mm |
| 75 | \OldTableofcontents |
| 76 | \endgroup |
| 77 | \@ifundefined{ChTitleVar}{}{ |
| 78 | \mghrulefill{\RW}} |
| 79 | \vspace{12pt} |
| 80 | } |
| 81 | |
| 82 | \@ifundefined{fancyhf}{ |
| 83 | \pagestyle{plain}}{ |
| 84 | \pagestyle{normal}} % start this way; change for |
| 85 | \pagenumbering{arabic} % ToC & chapters |
| 86 | \setcounter{secnumdepth}{2} |
| 87 | |
| 88 | \thispagestyle{empty} |