2 % manual.cls for Sphinx
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesClass{manual}[2008/10/18 Document class (Sphinx manual)]
8 % Pass all given class options to the parent class.
9 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
11 \LoadClass[twoside,openright]{report}
13 % Set some sane defaults for section numbering depth and TOC depth. You can
14 % reset these counters in your preamble.
16 \setcounter{secnumdepth}{2}
17 \setcounter{tocdepth}{1}
19 % Change the title page to look a bit better, and fit in with the fncychap
20 % ``Bjarne'' style a bit better.
22 \renewcommand{\maketitle}{%
24 \let\footnotesize\small
25 \let\footnoterule\relax
28 % These \defs are required to deal with multi-line authors; it
29 % changes \\ to ', ' (comma-space), making it pass muster for
30 % generating document info in the PDF file.
40 \rule{\textwidth}{1pt} \par
41 {\rm\Huge\py@HeaderFamily \@title \par}%
42 \rule{\textwidth}{1pt} \par
43 {\em\LARGE\py@HeaderFamily Leandro Mat\'ias Lucarella \par}
44 {\em\normalsize\py@HeaderFamily Direcci\'on Lic. Rosa Wachenchauzer \par}
45 {\em\small\py@HeaderFamily Padr\'on 77.891 \par}
47 {\LARGE\py@HeaderFamily Tesis de Grado en Ingenier\'ia en Inform\'atica \par}
48 {\Large\py@HeaderFamily Departamento de Computaci\'on \par}
49 {\large\py@HeaderFamily Facultad de Ingenier\'ia \par}
50 {\normalsize\py@HeaderFamily Universidad de Buenos Aires \par}
56 \py@authoraddress \par
62 \setcounter{footnote}{0}%
63 \let\thanks\relax\let\maketitle\relax
64 %\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
68 % Catch the end of the {abstract} environment, but here make sure the abstract
69 % is followed by a blank page if the 'openright' option is used.
71 \let\py@OldEndAbstract=\endabstract
72 \renewcommand{\endabstract}{
75 \typeout{Adding blank page after the abstract.}
82 % This wraps the \tableofcontents macro with all the magic to get the spacing
83 % right and have the right number of pages if the 'openright' option has been
84 % used. This eliminates a fair amount of crud in the individual document files.
86 \let\py@OldTableofcontents=\tableofcontents
87 \renewcommand{\tableofcontents}{%
93 \py@OldTableofcontents%
96 \typeout{Adding blank page after the table of contents.}%
97 \pagebreak\hspace{0pt}%
102 \pagenumbering{arabic}%
103 \@ifundefined{fancyhf}{}{\pagestyle{normal}}%
106 % This is needed to get the width of the section # area wide enough in the
107 % library reference. Doing it here keeps it the same for all the manuals.
109 \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.6em}}
110 \renewcommand*\l@subsection{\@dottedtocline{2}{4.1em}{3.5em}}