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