[Python-checkins] r61932 - in doctools/trunk: CHANGES doc/Makefile sphinx/quickstart.py sphinx/texinputs/howto.cls sphinx/texinputs/manual.cls

georg.brandl python-checkins at python.org
Wed Mar 26 13:16:59 CET 2008


Author: georg.brandl
Date: Wed Mar 26 13:16:59 2008
New Revision: 61932

Modified:
   doctools/trunk/CHANGES
   doctools/trunk/doc/Makefile
   doctools/trunk/sphinx/quickstart.py
   doctools/trunk/sphinx/texinputs/howto.cls
   doctools/trunk/sphinx/texinputs/manual.cls
Log:
Several fixes in the latex processing.


Modified: doctools/trunk/CHANGES
==============================================================================
--- doctools/trunk/CHANGES	(original)
+++ doctools/trunk/CHANGES	Wed Mar 26 13:16:59 2008
@@ -23,7 +23,8 @@
 
 * 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.

Modified: doctools/trunk/doc/Makefile
==============================================================================
--- doctools/trunk/doc/Makefile	(original)
+++ doctools/trunk/doc/Makefile	Wed Mar 26 13:16:59 2008
@@ -6,7 +6,9 @@
 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

Modified: doctools/trunk/sphinx/quickstart.py
==============================================================================
--- doctools/trunk/sphinx/quickstart.py	(original)
+++ doctools/trunk/sphinx/quickstart.py	Wed Mar 26 13:16:59 2008
@@ -177,12 +177,14 @@
 #
 
 # You can set these variables from the command line.
-SPHINXOPTS   =
-SPHINXBUILD  = sphinx-build
-PAPER        =
-
-ALLSPHINXOPTS = -d %(rbuilddir)s/doctrees -D latex_paper_size=$(PAPER) \\
-                $(SPHINXOPTS) %(rsrcdir)s
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+
+# 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
 

Modified: doctools/trunk/sphinx/texinputs/howto.cls
==============================================================================
--- doctools/trunk/sphinx/texinputs/howto.cls	(original)
+++ doctools/trunk/sphinx/texinputs/howto.cls	Wed Mar 26 13:16:59 2008
@@ -3,14 +3,13 @@
 %
 
 \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}
@@ -26,7 +25,7 @@
 % 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:
@@ -41,11 +40,11 @@
 \RequirePackage{makeidx}
 
 
-% support for module synopsis sections:
+% Support for module synopsis sections:
 \newcommand{\py at ModSynopsisFilename}{\jobname.syn}
 
 
-% need to do one of these....
+% Need to do one of these....
 \newcommand{\py at doHorizontalRule}{\rule{\textwidth}{1pt}}
 
 

Modified: doctools/trunk/sphinx/texinputs/manual.cls
==============================================================================
--- doctools/trunk/sphinx/texinputs/manual.cls	(original)
+++ doctools/trunk/sphinx/texinputs/manual.cls	Wed Mar 26 13:16:59 2008
@@ -3,14 +3,13 @@
 %
 
 \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}
@@ -26,21 +25,20 @@
 % 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 at 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}
@@ -50,7 +48,7 @@
 \RequirePackage{makeidx}
 
 
-% support for module synopsis sections:
+% Support for module synopsis sections:
 \newcommand{\py at ModSynopsisFilename}{\jobname\thechapter.syn}
 \let\py at OldChapter=\chapter
 \renewcommand{\chapter}{


More information about the Python-checkins mailing list