From 47e0329f52d8d45fdd8f4312ca744789b919f695 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Wed, 18 Sep 2019 13:34:19 +0000 Subject: [PATCH] Generate PDF documentation Change-Id: I66add3b35283fdb6337b6dad9d79e852984d471f Story: 2006093 Task: 35073 --- doc/source/conf.py | 14 +++++++++++--- tox.ini | 11 +++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 7fca0a91..d2808802 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -229,15 +229,23 @@ latex_elements = { # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. - # 'preamble': '', + # openany: Skip blank pages in generated PDFs + 'extraclassoptions': 'openany,oneside', + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', } +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +# Some distros are missing xindy +latex_use_xindy = False + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Horizon.tex', u'Horizon Documentation', - u'OpenStack Foundation', 'manual'), + ('index', 'doc-magnum-ui.tex', u'Magnum UI Documentation', + u'OpenStack Foundation', 'howto', True), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/tox.ini b/tox.ini index 451e980d..19f2a4f3 100644 --- a/tox.ini +++ b/tox.ini @@ -109,6 +109,17 @@ deps = commands= sphinx-build -W -b html doc/source doc/build/html +[testenv:pdf-docs] +basepython = python3 +deps = {[testenv:docs]deps} +whitelist_externals = + make + rm +commands = + rm -rf doc/build/pdf + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [testenv:docs-local] basepython = python3 deps =