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: Iae3db530e906e36571951deb31f242b7e4fcb75d
This commit is contained in:
Kaifeng Wang 2019-06-19 14:31:48 +08:00
parent 6c59a5b507
commit f92968386b
3 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,3 @@
sphinx>=1.8.0 # BSD sphinx>=1.8.0 # BSD
reno!=2.3.1,>=1.8.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0 openstackdocstheme>=1.20.0 # Apache-2.0

View File

@ -26,6 +26,8 @@ try:
except ImportError: except ImportError:
openstackdocstheme = None openstackdocstheme = None
repository_name = 'openstack/tenks'
use_storyboard = True
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
@ -40,7 +42,6 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Tenks'
copyright = u'OpenStack Foundation' copyright = u'OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
@ -72,7 +73,7 @@ else:
html_theme = 'default' html_theme = 'default'
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project htmlhelp_basename = 'tenksdoc'
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
@ -81,8 +82,8 @@ htmlhelp_basename = '%sdoc' % project
latex_documents = [ latex_documents = [
( (
master_doc, master_doc,
'%s.tex' % project, 'doc-tenks.tex',
u'%s Documentation' % project, u'Tenks Documentation',
u'OpenStack Foundation', u'OpenStack Foundation',
'manual' 'manual'
), ),

View File

@ -37,6 +37,13 @@ deps =
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals = make
commands = sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:venv] [testenv:venv]
basepython = python3 basepython = python3
deps = deps =