Commits

Anonymous committed c4e7aba

Several fixes in the latex processing.

  • Participants
  • Parent commits d2788f8

Comments (0)

Files changed (5)

 
 * sphinx.latexwriter: Include fncychap.sty which doesn't seem to be
   very common in TeX distributions.  Add a ``clean`` target in the
-  latex Makefile.
+  latex Makefile.  Really pass the correct paper and size options
+  to the LaTeX document class.
 
 * setup: On Python 2.4, don't egg-depend on docutils if a docutils is
   already installed -- else it will be overwritten.

File doc/Makefile

 SPHINXBUILD  = python ../sphinx-build.py
 PAPER        =
 
-ALLSPHINXOPTS = -d _build/doctrees -D latex_paper_size=$(PAPER) \
+PAPEROPT_a4      = -D latex_paper_size=a4
+PAPEROPT_letter  = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) \
                 $(SPHINXOPTS) .
 
 .PHONY: help clean html web htmlhelp latex changes linkcheck

File sphinx/quickstart.py

 #
 
 # You can set these variables from the command line.
-SPHINXOPTS   =
-SPHINXBUILD  = sphinx-build
-PAPER        =
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
 
-ALLSPHINXOPTS = -d %(rbuilddir)s/doctrees -D latex_paper_size=$(PAPER) \\
-                $(SPHINXOPTS) %(rsrcdir)s
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d %(rbuilddir)s/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) %(rsrcdir)
 
 .PHONY: help clean html web htmlhelp latex changes linkcheck
 

File sphinx/texinputs/howto.cls

 %
 
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{howto}
-             [1998/02/25 Document class (Python HOWTO)]
+\ProvidesClass{howto}[1998/02/25 Document class (Python HOWTO)]
 
 \RequirePackage{fancybox}
 
-% Change the options here to get a different set of basic options,  This
-% is where to add things like "a4paper" or "10pt".
-%
+% Pass all given class options to the parent class.
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ProcessOptions\relax
 \LoadClass[twoside]{article}
 
 \setcounter{secnumdepth}{1}
 % implement, and is used to put the chapter and section information in 
 % the footers.
 %
-\RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
+\RequirePackage{fancyhdr}
 
 
 % Required package:
 \RequirePackage{makeidx}
 
 
-% support for module synopsis sections:
+% Support for module synopsis sections:
 \newcommand{\py@ModSynopsisFilename}{\jobname.syn}
 
 
-% need to do one of these....
+% Need to do one of these....
 \newcommand{\py@doHorizontalRule}{\rule{\textwidth}{1pt}}
 
 

File sphinx/texinputs/manual.cls

 %
 
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{manual}
-             [1998/03/03 Document class (Python manual)]
+\ProvidesClass{manual}[1998/03/03 Document class (Python manual)]
 
 \RequirePackage{fancybox}
 
-% Change the options here to get a different set of basic options, but only
-% if you have to.
-%
+% Pass all given class options to the parent class.
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
+\ProcessOptions\relax
 \LoadClass[twoside,openright]{report}
 
 \setcounter{secnumdepth}{2}
 % implement, and is used to put the chapter and section information in 
 % the footers.
 %
-\RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
-
+\RequirePackage{fancyhdr}
 
 % Required packages:
 %
 % The "fncychap" package is used to get the nice chapter headers.  The
-% .sty file is distributed with Python, so you should not need to disable
+% .sty file is distributed with Sphinx, so you should not need to disable
 % it.  You'd also end up with a mixed page style; uglier than stock LaTeX!
 %
-\RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.}
+\RequirePackage[Bjarne]{fncychap}
 % Do horizontal rules it this way to match:
 \newcommand{\py@doHorizontalRule}{\mghrulefill{\RW}}
-%
-%
-% This gives us all the Python-specific markup that we really want.
+
+
+% This gives us all the Sphinx-specific markup that we really want.
 % This should come last.  Do not change this.
 %
 \RequirePackage{sphinx}
 \RequirePackage{makeidx}
 
 
-% support for module synopsis sections:
+% Support for module synopsis sections:
 \newcommand{\py@ModSynopsisFilename}{\jobname\thechapter.syn}
 \let\py@OldChapter=\chapter
 \renewcommand{\chapter}{