From e3681c139072081410838bff4b9cad1475672e0f Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Thu, 20 Jun 2019 15:27:02 +0800 Subject: [PATCH] Build pdf doc The is one of community goals that each project could produce a single PDF file. The pdf should be in the output of openstack-tox-docs job. TeX packages are required to build PDF locally, following is recommended: * inkscape * texlive-latex-base * texlive-latex-extra * texlive-fonts-recommended More about the goal: https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html https://etherpad.openstack.org/p/train-pdf-support-goal https://etherpad.openstack.org/p/pdf-goal-train-common-problems Change-Id: I5f2caba62595946f8ade6db22a1aba080b927fc8 --- doc/source/conf.py | 11 +++++++---- tox.ini | 6 ++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index cf9289a..16d287f 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -29,6 +29,10 @@ try: except ImportError: openstackdocstheme = None +# openstackdocstheme options +repository_name = 'openstack/virtualbmc' +use_storyboard = True + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable @@ -40,7 +44,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'virtualbmc' copyright = u'2016, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. @@ -66,15 +69,15 @@ else: html_theme = 'default' # Output file base name for HTML help builder. -htmlhelp_basename = '%sdoc' % project +htmlhelp_basename = 'virtualbmcdoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ('index', - '%s.tex' % project, - u'%s Documentation' % project, + 'doc-virtualbmc.tex', + u'VirtualBMC Documentation', u'OpenStack Foundation', 'manual'), ] diff --git a/tox.ini b/tox.ini index bda5ef5..00c35b3 100644 --- a/tox.ini +++ b/tox.ini @@ -44,6 +44,12 @@ commands = basepython = python3 commands = python setup.py build_sphinx +[testenv:pdf-docs] +basepython = python3 +whitelist_externals = make +commands = sphinx-build -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [testenv:releasenotes] basepython = python3 commands =