diff --git a/doc/requirements.txt b/doc/requirements.txt index 0673b3d..e788495 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -4,3 +4,4 @@ openstackdocstheme>=2.2.1 # Apache-2.0 reno>=3.1.0 # Apache-2.0 sphinx>=2.0.0,!=2.1.0 # BSD +sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index e22265a..8693774 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,7 +23,8 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'openstackdocstheme' + 'openstackdocstheme', + 'sphinxcontrib.rsvgconverter' ] # openstackdocstheme options @@ -31,6 +32,7 @@ openstackdocs_repo_name = 'openstack/stackviz' openstackdocs_auto_name = False openstackdocs_bug_project = 'stackviz' openstackdocs_bug_tag = '' +openstackdocs_pdf_link = True # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. @@ -78,3 +80,19 @@ latex_documents = [ # Example configuration for intersphinx: refer to the Python standard library. #intersphinx_mapping = {'http://docs.python.org/': None} + +# -- Options for LaTeX output ------------------------------------------------- + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', 'doc-stackviz.tex', u'Stackviz', + u'OpenStack Foundation', 'manual'), +] + +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False +latex_elements = { + 'extraclassoptions': 'openany,oneside', +} diff --git a/tox.ini b/tox.ini index b9e0094..f424065 100644 --- a/tox.ini +++ b/tox.ini @@ -34,13 +34,20 @@ commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build sphinx-build -W -b html doc/source doc/build/html whitelist_externals = rm +[testenv:pdf-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:debug] commands = oslo_debug_helper {posargs}