From b7419e824c7721909b491dca52a35b6cd891e535 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sun, 8 Dec 2019 00:47:53 +0000 Subject: [PATCH] PDF documentation build Change-Id: I1e79fda924fc52680c66a76e899c910d6cfacc24 Implements: blueprint pdfdocs --- doc/source/conf.py | 22 ++++++++++++++++++++++ doc/source/index.rst | 13 +++++++------ doc/source/readme.rst | 5 ----- tox.ini | 10 ++++++++++ 4 files changed, 39 insertions(+), 11 deletions(-) delete mode 100644 doc/source/readme.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 4a88da1c..3aec3a4a 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -62,3 +62,25 @@ html_theme = 'openstackdocs' # Output file base name for HTML help builder. htmlhelp_basename = 'zunclientdoc' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', + 'doc-python-zunclient.tex', + u'Python Zun Client Documentation', + u'Zun development team', 'manual'), +] + +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False + +latex_domain_indices = False + +latex_elements = { + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', + 'extraclassoptions': 'openany', +} diff --git a/doc/source/index.rst b/doc/source/index.rst index 20e50d07..a85f7adf 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -7,15 +7,16 @@ Contents .. toctree:: :maxdepth: 2 - readme install/index contributor/index cli/index user/index -Indices and tables ------------------- +.. only:: html -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + Indices and tables + ------------------ + + * :ref:`genindex` + * :ref:`modindex` + * :ref:`search` diff --git a/doc/source/readme.rst b/doc/source/readme.rst deleted file mode 100644 index 5c280588..00000000 --- a/doc/source/readme.rst +++ /dev/null @@ -1,5 +0,0 @@ -============ -Introduction -============ - -.. include:: ../../README.rst diff --git a/tox.ini b/tox.ini index 857db9bd..e6454a25 100644 --- a/tox.ini +++ b/tox.ini @@ -53,6 +53,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:pep8] basepython = python3 commands =