1998-03-06 17:21:56 -04:00
|
|
|
%
|
|
|
|
% howto.cls for the Python documentation
|
|
|
|
%
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
|
|
|
\ProvidesClass{howto}
|
|
|
|
[1998/02/25 Document class (Python HOWTO)]
|
|
|
|
|
|
|
|
|
|
|
|
% Change the options here to get a different set of basic options, This
|
|
|
|
% is where to add things like "a4paper" or "10pt".
|
|
|
|
%
|
|
|
|
\LoadClass[twoside]{article}
|
|
|
|
|
1999-06-29 15:15:59 -03:00
|
|
|
\setcounter{secnumdepth}{1}
|
1998-03-06 17:21:56 -04:00
|
|
|
|
|
|
|
% Optional packages:
|
|
|
|
%
|
|
|
|
% If processing of these documents fails at your TeX installation,
|
|
|
|
% these may be commented out (independently) to make things work.
|
|
|
|
% These are both supplied with the current version of the teTeX
|
|
|
|
% distribution.
|
|
|
|
%
|
|
|
|
% The "fancyhdr" package makes nicer page footers reasonable to
|
|
|
|
% implement, and is used to put the chapter and section information in
|
|
|
|
% the footers.
|
|
|
|
%
|
|
|
|
\RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
|
|
|
|
|
|
|
|
|
|
|
|
% Required package:
|
|
|
|
%
|
|
|
|
% This gives us all the Python-specific markup that we really want.
|
|
|
|
% This should come last. Do not change this.
|
|
|
|
%
|
|
|
|
\RequirePackage{python}
|
|
|
|
|
1998-07-23 14:36:46 -03:00
|
|
|
% support for module synopsis sections:
|
|
|
|
\newcommand{\py@ModSynopsisFilename}{\jobname.syn}
|
|
|
|
|
1998-03-06 17:21:56 -04:00
|
|
|
|
1998-03-25 11:41:23 -04:00
|
|
|
% need to do one of these....
|
1998-04-28 15:31:50 -03:00
|
|
|
\newcommand{\py@doHorizontalRule}{\rule{\textwidth}{1pt}}
|
1998-03-25 11:41:23 -04:00
|
|
|
|
|
|
|
|
1998-03-06 17:21:56 -04:00
|
|
|
% Change the title page to look a bit better, and fit in with the
|
|
|
|
% fncychap ``Bjarne'' style a bit better.
|
|
|
|
%
|
|
|
|
\renewcommand{\maketitle}{
|
1998-04-28 15:31:50 -03:00
|
|
|
\py@doHorizontalRule
|
2000-09-05 12:19:56 -03:00
|
|
|
\@ifundefined{pdfinfo}{}{{
|
|
|
|
% This \def is required to deal with multi-line authors; it
|
|
|
|
% changes \\ to ', ' (comma-space), making it pass muster for
|
|
|
|
% generating document info in the PDF file.
|
|
|
|
\def\\{, }
|
1998-03-25 10:53:43 -04:00
|
|
|
\pdfinfo{
|
|
|
|
/Author (\@author)
|
|
|
|
/Title (\@title)
|
|
|
|
}
|
2000-09-05 12:19:56 -03:00
|
|
|
}}
|
1998-03-06 17:21:56 -04:00
|
|
|
\begin{flushright}
|
1998-04-28 15:31:50 -03:00
|
|
|
{\rm\Huge\py@HeaderFamily \@title} \par
|
|
|
|
{\em\large\py@HeaderFamily \py@release} \par
|
1998-03-06 17:21:56 -04:00
|
|
|
\vspace{25pt}
|
1998-04-28 15:31:50 -03:00
|
|
|
{\Large\py@HeaderFamily \@author} \par
|
1998-03-06 17:21:56 -04:00
|
|
|
\vspace{25pt}
|
|
|
|
\@date \par
|
1998-04-28 15:31:50 -03:00
|
|
|
\py@authoraddress \par
|
1998-03-06 17:21:56 -04:00
|
|
|
\end{flushright}
|
|
|
|
\@thanks
|
|
|
|
\setcounter{footnote}{0}
|
|
|
|
\let\thanks\relax\let\maketitle\relax
|
|
|
|
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1998-04-28 15:31:50 -03:00
|
|
|
\let\py@OldTableofcontents=\tableofcontents
|
1998-03-06 17:21:56 -04:00
|
|
|
\renewcommand{\tableofcontents}{
|
|
|
|
\begingroup
|
|
|
|
\parskip = 0mm
|
1998-04-28 15:31:50 -03:00
|
|
|
\py@OldTableofcontents
|
1998-03-06 17:21:56 -04:00
|
|
|
\endgroup
|
1998-04-28 15:31:50 -03:00
|
|
|
\py@doHorizontalRule
|
1998-03-06 17:21:56 -04:00
|
|
|
\vspace{12pt}
|
1998-04-28 15:31:50 -03:00
|
|
|
\py@doing@page@targetstrue
|
1998-03-06 17:21:56 -04:00
|
|
|
}
|
|
|
|
|
1998-04-16 23:45:41 -03:00
|
|
|
% Fix the theindex environment to add an entry to the Table of
|
|
|
|
% Contents; this is much nicer than just having to jump to the end of
|
|
|
|
% the book and flip around, especially with multiple indexes.
|
|
|
|
%
|
1998-04-28 15:31:50 -03:00
|
|
|
\let\py@OldTheindex=\theindex
|
1998-04-16 23:45:41 -03:00
|
|
|
\renewcommand{\theindex}{
|
|
|
|
\clearpage
|
1998-04-28 15:31:50 -03:00
|
|
|
\py@OldTheindex
|
1998-04-16 23:45:41 -03:00
|
|
|
\addcontentsline{toc}{section}{\indexname}
|
|
|
|
}
|
|
|
|
|
1998-03-06 17:21:56 -04:00
|
|
|
\@ifundefined{fancyhf}{
|
|
|
|
\pagestyle{plain}}{
|
|
|
|
\pagestyle{normal}} % start this way; change for
|
|
|
|
\pagenumbering{arabic} % ToC & chapters
|
|
|
|
\setcounter{secnumdepth}{2}
|
|
|
|
|
|
|
|
\thispagestyle{empty}
|