sphinx / sphinx / texinputs / sphinxmanual.cls

% sphinxmanual.cls for Sphinx (

\ProvidesClass{sphinxmanual}[2009/06/02 Document class (Sphinx manual)]

% chapters starting at odd pages (overridden by 'openany' document option)

% 'oneside' option overriding the 'twoside' default
% Pass remaining document options to the parent class.

% Defaults two-side document
% nothing to do (oneside is the default)


% 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.
      % These \defs are 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\\{, }
      \def\and{and }
        /Author (\@author)
        /Title (\@title)
      {\rm\Huge\py@HeaderFamily \@title \par}%
      {\em\LARGE\py@HeaderFamily \py@release\releaseinfo \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.

% Fix the bibliography environment to add an entry to the Table of
% Contents.
% For a report document class this environment is a chapter.