docs/_build/latex/sphinxhowto.cls

changeset 11
79fea4145278
equal deleted inserted replaced
10:f6927689a3b2 11:79fea4145278
1 %
2 % sphinxhowto.cls for Sphinx (http://sphinx.pocoo.org/)
3 %
4
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesClass{sphinxhowto}[2009/06/02 Document class (Sphinx HOWTO)]
7
8 % 'oneside' option overriding the 'twoside' default
9 \newif\if@oneside
10 \DeclareOption{oneside}{\@onesidetrue}
11 % Pass remaining document options to the parent class.
12 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
13 \ProcessOptions\relax
14
15 % Default to two-side document
16 \if@oneside
17 % nothing to do (oneside is the default)
18 \else
19 \PassOptionsToClass{twoside}{\sphinxdocclass}
20 \fi
21
22 \LoadClass{\sphinxdocclass}
23
24 % Set some sane defaults for section numbering depth and TOC depth. You can
25 % reset these counters in your preamble.
26 %
27 \setcounter{secnumdepth}{2}
28
29 % Change the title page to look a bit better, and fit in with the fncychap
30 % ``Bjarne'' style a bit better.
31 %
32 \renewcommand{\maketitle}{
33 \rule{\textwidth}{1pt}
34 \ifsphinxpdfoutput
35 \begingroup
36 % These \defs are required to deal with multi-line authors; it
37 % changes \\ to ', ' (comma-space), making it pass muster for
38 % generating document info in the PDF file.
39 \def\\{, }
40 \def\and{and }
41 \pdfinfo{
42 /Author (\@author)
43 /Title (\@title)
44 }
45 \endgroup
46 \fi
47 \begin{flushright}
48 \sphinxlogo%
49 {\rm\Huge\py@HeaderFamily \@title} \par
50 {\em\large\py@HeaderFamily \py@release\releaseinfo} \par
51 \vspace{25pt}
52 {\Large\py@HeaderFamily
53 \begin{tabular}[t]{c}
54 \@author
55 \end{tabular}} \par
56 \vspace{25pt}
57 \@date \par
58 \py@authoraddress \par
59 \end{flushright}
60 \@thanks
61 \setcounter{footnote}{0}
62 \let\thanks\relax\let\maketitle\relax
63 %\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
64 }
65
66 \let\py@OldTableofcontents=\tableofcontents
67 \renewcommand{\tableofcontents}{
68 \begingroup
69 \parskip = 0mm
70 \py@OldTableofcontents
71 \endgroup
72 \rule{\textwidth}{1pt}
73 \vspace{12pt}
74 }
75
76 \@ifundefined{fancyhf}{
77 \pagestyle{plain}}{
78 \pagestyle{normal}} % start this way; change for
79 \pagenumbering{arabic} % ToC & chapters
80
81 \thispagestyle{empty}

mercurial