diff options
| author | georg.brandl <devnull@localhost> | 2008-09-12 13:08:52 +0000 |
|---|---|---|
| committer | georg.brandl <devnull@localhost> | 2008-09-12 13:08:52 +0000 |
| commit | 510fa29a8f92556644f146f4834faa835b330053 (patch) | |
| tree | 26e76e780d07d1c7d4bd104179fe185f394b65ba /sphinx/texinputs | |
| parent | b83226c92045f57f44637eabfa29e882015e9573 (diff) | |
| download | sphinx-510fa29a8f92556644f146f4834faa835b330053.tar.gz | |
Restructure LaTeX file template: add new "latex_elements" config value
allowing to customize each part of what is written to the tex file.
Diffstat (limited to 'sphinx/texinputs')
| -rw-r--r-- | sphinx/texinputs/howto.cls | 16 | ||||
| -rw-r--r-- | sphinx/texinputs/manual.cls | 17 | ||||
| -rw-r--r-- | sphinx/texinputs/sphinx.sty | 15 |
3 files changed, 13 insertions, 35 deletions
diff --git a/sphinx/texinputs/howto.cls b/sphinx/texinputs/howto.cls index 43cbc31e..c58bff4c 100644 --- a/sphinx/texinputs/howto.cls +++ b/sphinx/texinputs/howto.cls @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{howto}[2008/05/01 Document class (Sphinx HOWTO)] +\ProvidesClass{howto}[2008/09/12 Document class (Sphinx HOWTO)] \RequirePackage{fancybox} @@ -12,18 +12,11 @@ \ProcessOptions\relax \LoadClass[twoside]{article} - % Set some sane defaults for section numbering depth and TOC depth. You can % reset these counters in your preamble. % \setcounter{secnumdepth}{2} - -% The "fancyhdr" package makes nicer page footers reasonable to implement, and -% is used to put the chapter and section information in the footers. -% -\RequirePackage{fancyhdr} - % This gives us all the Python-specific markup that we really want. This should % come last. Do not change this. % @@ -34,15 +27,12 @@ % \RequirePackage{makeidx} -% Need to do one of these.... -\newcommand{\py@doHorizontalRule}{\rule{\textwidth}{1pt}} - % Change the title page to look a bit better, and fit in with the fncychap % ``Bjarne'' style a bit better. % \renewcommand{\maketitle}{ - \py@doHorizontalRule + \rule{\textwidth}{1pt} \ifpdf \begingroup % This \def is required to deal with multi-line authors; it @@ -78,7 +68,7 @@ \parskip = 0mm \py@OldTableofcontents \endgroup - \py@doHorizontalRule + \rule{\textwidth}{1pt} \vspace{12pt} } diff --git a/sphinx/texinputs/manual.cls b/sphinx/texinputs/manual.cls index 021f4f3a..8c99228a 100644 --- a/sphinx/texinputs/manual.cls +++ b/sphinx/texinputs/manual.cls @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{manual}[2008/05/01 Document class (Sphinx manual)] +\ProvidesClass{manual}[2008/09/12 Document class (Sphinx manual)] \RequirePackage{fancybox} @@ -12,25 +12,12 @@ \ProcessOptions\relax \LoadClass[twoside,openright]{report} - % Set some sane defaults for section numbering depth and TOC depth. You can % reset these counters in your preamble. % \setcounter{secnumdepth}{2} \setcounter{tocdepth}{1} - -% The "fancyhdr" package makes nicer page footers reasonable to implement, and -% is used to put the chapter and section information in the footers. -% -\RequirePackage{fancyhdr} - -% The "fncychap" package is used to get the nice chapter headers. -% -\RequirePackage[Bjarne]{fncychap} -% Do horizontal rules it this way to match: -\newcommand{\py@doHorizontalRule}{\mghrulefill{\RW}} - % This gives us all the Sphinx-specific markup that we really want. This should % come last. Do not change this. % @@ -49,7 +36,7 @@ \begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax - \py@doHorizontalRule% + \rule{\textwidth}{1pt}% \ifpdf \begingroup % This \def is required to deal with multi-line authors; it diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 4f776ca1..cec477ca 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -9,8 +9,8 @@ \ProvidesPackage{sphinx}[2008/05/01 LaTeX package (Sphinx markup)] \RequirePackage{textcomp} -\RequirePackage{times} \RequirePackage{fancyvrb} +\RequirePackage{fancyhdr} \RequirePackage{titlesec} \RequirePackage{tabulary} \RequirePackage{amsmath} % for \text @@ -36,18 +36,19 @@ \RequirePackage{framed} -\ifx\pdftexversion\undefined - \RequirePackage{graphicx} -\else - \RequirePackage[pdftex]{graphicx} -\fi - % Uncomment these two lines to ignore the paper size and make the page % size more like a typical published manual. %\renewcommand{\paperheight}{9in} %\renewcommand{\paperwidth}{8.5in} % typical squarish manual %\renewcommand{\paperwidth}{7in} % O'Reilly ``Programmming Python'' +% For graphicx, check if we are compiling under latex or pdflatex. +\ifx\pdftexversion\undefined + \usepackage{graphicx} +\else + \usepackage[pdftex]{graphicx} +\fi + % for PDF output, use maximal compression \newif\ifpdf\pdffalse \ifx\pdfoutput\undefined\else\ifcase\pdfoutput |
