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}
46 {\LARGE\py@HeaderFamily Tesis de Grado en Ingenier\'ia en Inform\'atica \par}
47 {\Large\py@HeaderFamily Departamento de Computaci\'on \par}
48 {\large\py@HeaderFamily Facultad de Ingenier\'ia \par}
49 {\normalsize\py@HeaderFamily Universidad de Buenos Aires \par}
55 \py@authoraddress \par
61 \setcounter{footnote}{0}%
62 \let\thanks\relax\let\maketitle\relax
63 %\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
67 % Catch the end of the {abstract} environment, but here make sure the abstract
68 % is followed by a blank page if the 'openright' option is used.
70 \let\py@OldEndAbstract=\endabstract
71 \renewcommand{\endabstract}{
74 \typeout{Adding blank page after the abstract.}
81 % This wraps the \tableofcontents macro with all the magic to get the spacing
82 % right and have the right number of pages if the 'openright' option has been
83 % used. This eliminates a fair amount of crud in the individual document files.
85 \let\py@OldTableofcontents=\tableofcontents
86 \renewcommand{\tableofcontents}{%
92 \py@OldTableofcontents%
95 \typeout{Adding blank page after the table of contents.}%
96 \pagebreak\hspace{0pt}%
101 \pagenumbering{arabic}%
102 \@ifundefined{fancyhf}{}{\pagestyle{normal}}%
105 % This is needed to get the width of the section # area wide enough in the
106 % library reference. Doing it here keeps it the same for all the manuals.
108 \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.6em}}
109 \renewcommand*\l@subsection{\@dottedtocline{2}{4.1em}{3.5em}}