Browse Source

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: If5446ce4ceee7e38a0052503aa8fc2b6c5d7de66
changes/04/666804/3
Kaifeng Wang 2 months ago
parent
commit
cef3bac3dc
2 changed files with 11 additions and 1 deletions
  1. 2
    1
      doc/source/conf.py
  2. 9
    0
      tox.ini

+ 2
- 1
doc/source/conf.py View File

@@ -61,6 +61,7 @@ bug_tag = ''
61 61
 # Output file base name for HTML help builder.
62 62
 htmlhelp_basename = 'Ironic Python Agentdoc' 
63 63
 
64
+latex_use_xindy = False
64 65
 
65 66
 # Grouping the document tree into LaTeX files. List of tuples
66 67
 # (source start file, target name, title, author, documentclass
@@ -68,7 +69,7 @@ htmlhelp_basename = 'Ironic Python Agentdoc'
68 69
 latex_documents = [
69 70
     (
70 71
         'index',
71
-        'Ironic Python Agent.tex',
72
+        'doc-ironic-python-agent.tex',
72 73
         u'Ironic Python Agent Documentation',
73 74
         u'OpenStack Foundation',
74 75
         'manual'

+ 9
- 0
tox.ini View File

@@ -71,6 +71,15 @@ sitepackages = False
71 71
 commands =
72 72
   python setup.py build_sphinx
73 73
 
74
+[testenv:pdf-docs]
75
+basepython = python3
76
+whitelist_externals = make
77
+setenv = PYTHONHASHSEED=0
78
+sitepackages = False
79
+commands =
80
+  sphinx-build -b latex doc/source doc/build/pdf
81
+  make -C doc/build/pdf
82
+
74 83
 [testenv:releasenotes]
75 84
 basepython = python3
76 85
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

Loading…
Cancel
Save