1 % |
|
2 % howto.cls for Sphinx |
|
3 % |
|
4 |
|
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01] |
|
6 \ProvidesClass{howto}[2008/10/18 Document class (Sphinx HOWTO)] |
|
7 |
|
8 % Pass all given class options to the parent class. |
|
9 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} |
|
10 \ProcessOptions\relax |
|
11 \LoadClass[twoside]{article} |
|
12 |
|
13 % Set some sane defaults for section numbering depth and TOC depth. You can |
|
14 % reset these counters in your preamble. |
|
15 % |
|
16 \setcounter{secnumdepth}{2} |
|
17 |
|
18 % Change the title page to look a bit better, and fit in with the fncychap |
|
19 % ``Bjarne'' style a bit better. |
|
20 % |
|
21 \renewcommand{\maketitle}{ |
|
22 \rule{\textwidth}{1pt} |
|
23 \ifsphinxpdfoutput |
|
24 \begingroup |
|
25 % This \def is required to deal with multi-line authors; it |
|
26 % changes \\ to ', ' (comma-space), making it pass muster for |
|
27 % generating document info in the PDF file. |
|
28 \def\\{, } |
|
29 \pdfinfo{ |
|
30 /Author (\@author) |
|
31 /Title (\@title) |
|
32 } |
|
33 \endgroup |
|
34 \fi |
|
35 \begin{flushright} |
|
36 \sphinxlogo% |
|
37 {\rm\Huge\py@HeaderFamily \@title} \par |
|
38 {\em\large\py@HeaderFamily \py@release\releaseinfo} \par |
|
39 \vspace{25pt} |
|
40 {\Large\py@HeaderFamily \@author} \par |
|
41 \vspace{25pt} |
|
42 \@date \par |
|
43 \py@authoraddress \par |
|
44 \end{flushright} |
|
45 \@thanks |
|
46 \setcounter{footnote}{0} |
|
47 \let\thanks\relax\let\maketitle\relax |
|
48 %\gdef\@thanks{}\gdef\@author{}\gdef\@title{} |
|
49 } |
|
50 |
|
51 \let\py@OldTableofcontents=\tableofcontents |
|
52 \renewcommand{\tableofcontents}{ |
|
53 \begingroup |
|
54 \parskip = 0mm |
|
55 \py@OldTableofcontents |
|
56 \endgroup |
|
57 \rule{\textwidth}{1pt} |
|
58 \vspace{12pt} |
|
59 } |
|
60 |
|
61 \@ifundefined{fancyhf}{ |
|
62 \pagestyle{plain}}{ |
|
63 \pagestyle{normal}} % start this way; change for |
|
64 \pagenumbering{arabic} % ToC & chapters |
|
65 |
|
66 \thispagestyle{empty} |
|