sphinx / sphinx / texinputs / manual.cls

% manual.cls for Sphinx

\ProvidesClass{manual}[2008/10/18 Document class (Sphinx manual)]

% Pass all given class options to the parent class.

% Set some sane defaults for section numbering depth and TOC depth.  You can
% reset these counters in your preamble.

% Change the title page to look a bit better, and fit in with the fncychap
% ``Bjarne'' style a bit better.
      % 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\\{, }
        /Author (\@author)
        /Title (\@title)
      {\rm\Huge\py@HeaderFamily \@title \par}%
      {\em\LARGE\py@HeaderFamily \py@release\releaseinfo \par}
      {\LARGE\py@HeaderFamily \@author \par}
       \@date \par
       \py@authoraddress \par

% Catch the end of the {abstract} environment, but here make sure the abstract
% is followed by a blank page if the 'openright' option is used.
      \typeout{Adding blank page after the abstract.}

% This wraps the \tableofcontents macro with all the magic to get the spacing
% right and have the right number of pages if the 'openright' option has been
% used.  This eliminates a fair amount of crud in the individual document files.
    \parskip = 0mm%
        \typeout{Adding blank page after the table of contents.}%

% This is needed to get the width of the section # area wide enough in the
% library reference.  Doing it here keeps it the same for all the manuals.