diff --git a/doc/source/conf.py b/doc/source/conf.py index 8f100df..69bf188 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -184,23 +184,26 @@ htmlhelp_basename = '%sdoc' % project # -- Options for LaTeX output --------------------------------------------- +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False + +latex_domain_indices = False + latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', + 'maxlistdepth': 10, } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). +# NOTE(jacky06): Specify toctree_only=True for a better document structure of +# the generated PDF file. latex_documents = [ - ('index', 'kolla-cli.tex', u'kolla-cli Documentation', - u'Oracle', 'manual'), + ('index', 'doc-kolla-cli.tex', u'kolla-cli Documentation', + u'Oracle', 'manual', 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 fd6a658..05811bc 100644 --- a/tox.ini +++ b/tox.ini @@ -98,6 +98,19 @@ commands = rm -rf doc/build sphinx-build -W -b html doc/source doc/build/html +[testenv:pdf-docs] +basepython = python3 +whitelist_externals = + make + mkdir + rm +deps = {[testenv:docs]deps} +commands = + rm -rf doc/build/pdf + mkdir -p doc/build/pdf/_static + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [testenv:releasenotes] basepython = python3 whitelist_externals = rm