From 0a0fb835b89176aff666b377541ce98a7d36df19 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Fri, 28 Jun 2019 00:51:35 +0900 Subject: [PATCH] PDF documentation build Based on https://review.opendev.org/#/c/601659/ and https://review.opendev.org/#/c/664555/ The generated PDF file is found at the top directory of the job log. Story: 2006084 Task: 34864 Depends-On: https://review.opendev.org/664555 Change-Id: I5e25f1dfbec22b26d42eff3c6776a2d01e90bc60 --- doc/source/conf.py | 12 ++++++++++-- doc/source/index.rst | 6 ++++-- tox.ini | 10 ++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 960c89cea5..6235c6a661 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -236,7 +236,7 @@ htmlhelp_basename = 'Horizondoc' # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Horizon.tex', u'Horizon Documentation', + ('index', 'doc-horizon.tex', u'Horizon Documentation', u'OpenStack Foundation', 'manual'), ] @@ -258,8 +258,16 @@ latex_documents = [ # latex_appendices = [] # If false, no module index is generated. -# latex_domain_indices = True +latex_domain_indices = False +latex_elements = { + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', +} + +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False # -- Options for manual page output ------------------------------------------- diff --git a/doc/source/index.rst b/doc/source/index.rst index bf82de7a31..8308975566 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -68,5 +68,7 @@ Information glossary -* :ref:`genindex` -* :ref:`modindex` +.. only:: html + + * :ref:`genindex` + * :ref:`modindex` diff --git a/tox.ini b/tox.ini index 58a8e0d87c..73cef6f1a5 100644 --- a/tox.ini +++ b/tox.ini @@ -152,6 +152,16 @@ deps = commands = sphinx-build -W -b html doc/source doc/build/html +[testenv:pdf-docs] +basepython = python3 +envdir = {toxworkdir}/docs +deps = {[testenv:docs]deps} +whitelist_externals = + make +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [testenv:releasenotes] basepython = python3 envdir = {toxworkdir}/docs