diff --git a/doc/source/conf.py b/doc/source/conf.py index dc4ea76d0..d82dc5971 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -207,10 +207,10 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, # documentclass [howto/manual]). -# latex_documents = [ -# ('index', 'NeutronLib.tex', u'Neutron Library Documentation', -# u'Neutron development team', 'manual'), -# ] +latex_documents = [ + ('index', 'doc-neutron-lib.tex', u'Neutron Library Documentation', + u'Neutron development team', 'manual'), +] # The name of an image file (relative to this directory) to place at the top of # the title page. @@ -229,6 +229,13 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M' # If false, no module index is generated. #latex_use_modindex = True +latex_elements = { + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', +} + + # -- Options for openstackdocstheme ------------------------------------------- repository_name = 'openstack/neutron-lib' bug_project = 'neutron' @@ -236,7 +243,7 @@ bug_tag = 'doc' linkcheck_anchors_ignore = [ # skip gerrit anchors - '\/q\/.*', - 'q\,.*', - '\/c\/.*' + r'\/q\/.*', + r'q\,.*', + r'\/c\/.*' ] diff --git a/doc/source/index.rst b/doc/source/index.rst index 69c67f8b7..b2ce93e6a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -45,7 +45,9 @@ Enjoy! user/index contributor/index -.. toctree:: - :maxdepth: 1 +.. only:: html - reference/index + .. toctree:: + :maxdepth: 1 + + reference/index diff --git a/tox.ini b/tox.ini index f3e88dec4..3f28a3bc2 100644 --- a/tox.ini +++ b/tox.ini @@ -57,6 +57,16 @@ deps = -r{toxinidir}/doc/requirements.txt 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:api-ref] basepython = python3 whitelist_externals = rm