From f92968386b3ab079ca8c5f77cb5c565d60fbebaf Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Wed, 19 Jun 2019 14:31:48 +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: Iae3db530e906e36571951deb31f242b7e4fcb75d --- doc/requirements.txt | 2 +- doc/source/conf.py | 9 +++++---- tox.ini | 7 +++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index e8b8529..0663364 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,3 @@ sphinx>=1.8.0 # BSD reno!=2.3.1,>=1.8.0 # Apache-2.0 -openstackdocstheme>=1.18.1 # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 8a72c22..cc8eb9b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -26,6 +26,8 @@ try: except ImportError: openstackdocstheme = None +repository_name = 'openstack/tenks' +use_storyboard = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -40,7 +42,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Tenks' copyright = u'OpenStack Foundation' # The version info for the project you're documenting, acts as replacement for @@ -72,7 +73,7 @@ else: html_theme = 'default' # 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 @@ -81,8 +82,8 @@ htmlhelp_basename = '%sdoc' % project latex_documents = [ ( master_doc, - '%s.tex' % project, - u'%s Documentation' % project, + 'doc-tenks.tex', + u'Tenks Documentation', u'OpenStack Foundation', 'manual' ), diff --git a/tox.ini b/tox.ini index eb6578b..d1c1108 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,13 @@ deps = -r{toxinidir}/doc/requirements.txt 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] basepython = python3 deps =