From 1f9ef03828112cfe05fcb853da5c0224de083347 Mon Sep 17 00:00:00 2001 From: agreentree Date: Thu, 29 Aug 2019 11:48:42 -0600 Subject: [PATCH] generate monasca pdf documentation https://storyboard.openstack.org/#!/story/2006097 Change-Id: Ia915b535cee5f80fe7c7bcc10c7c87ca3de3bc14 --- doc/source/conf.py | 12 ++++++++++-- doc/source/index.rst | 1 + tox.ini | 11 +++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 2667eada5..9cdca39fe 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -216,7 +216,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'MonitoringApi.tex', u'Monasca Documentation', + (master_doc, 'doc-monasca-api.tex', u'Monasca Documentation', [author], 'manual'), ] @@ -238,8 +238,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 48cb8dcdd..4b3cfc2d4 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -124,6 +124,7 @@ Configuration admin/index cli/index configuration/sample +.. only:: html glossary install/index user/index diff --git a/tox.ini b/tox.ini index 0c759f66c..9c92d0395 100644 --- a/tox.ini +++ b/tox.ini @@ -74,6 +74,17 @@ commands = {[testenv:api-ref]commands} {[testenv:releasenotes]commands} +[testenv:pdf-docs] +basepython = python3 +envdir = {toxworkdir}/docs +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:api-ref] basepython = python3 description = Called from CI scripts to test and publish the API Ref