From 9a0859fea8b2f0d246234be4a4c4230feeeb3157 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 12 Jun 2010 20:04:01 +0200 Subject: [PATCH] Reverse latex appendix logic: Add appendices if docclass is not howto. Also fix docs: other docclasses can be given if you know what you do. --- doc/config.rst | 8 +++++--- sphinx/builders/latex.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index 4a036df85..bdfd05287 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -807,9 +807,11 @@ These options influence LaTeX output. * *author*: Author for the LaTeX document. The same LaTeX markup caveat as for *title* applies. Use ``\and`` to separate multiple authors, as in: ``'John \and Sarah'``. - * *documentclass*: Must be one of ``'manual'`` or ``'howto'``. Only "manual" - documents will get appendices. Also, howtos will have a simpler title - page. + * *documentclass*: Normally, one of ``'manual'`` or ``'howto'`` (provided by + Sphinx). Other document classes can be given, but they must include the + "sphinx" package in order to define Sphinx' custom LaTeX commands. + "howto" documents will not get appendices. Also, howtos will have a simpler + title page. * *toctree_only*: Must be ``True`` or ``False``. If ``True``, the *startdoc* document itself is not included in the output, only the documents referenced by it via TOC trees. With this option, you can put extra stuff diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py index 1fbdbb781..b2a3c4e74 100644 --- a/sphinx/builders/latex.py +++ b/sphinx/builders/latex.py @@ -96,7 +96,7 @@ class LaTeXBuilder(Builder): encoding='utf-8') self.info("processing " + targetname + "... ", nonl=1) doctree = self.assemble_doctree(docname, toctree_only, - appendices=((docclass == 'manual') and + appendices=((docclass != 'howto') and self.config.latex_appendices or [])) self.post_process_images(doctree) self.info("writing... ", nonl=1)