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: I5f2caba62595946f8ade6db22a1aba080b927fc8
changes/07/666507/4
Kaifeng Wang 3 months ago
parent
commit
e3681c1390
2 changed files with 13 additions and 4 deletions
  1. 7
    4
      doc/source/conf.py
  2. 6
    0
      tox.ini

+ 7
- 4
doc/source/conf.py View File

@@ -29,6 +29,10 @@ try:
29 29
 except ImportError:
30 30
     openstackdocstheme = None
31 31
 
32
+# openstackdocstheme options
33
+repository_name = 'openstack/virtualbmc'
34
+use_storyboard = True
35
+
32 36
 # autodoc generation is a bit aggressive and a nuisance when doing heavy
33 37
 # text edit cycles.
34 38
 # execute "export SPHINX_DEBUG=1" in your terminal to disable
@@ -40,7 +44,6 @@ source_suffix = '.rst'
40 44
 master_doc = 'index'
41 45
 
42 46
 # General information about the project.
43
-project = u'virtualbmc'
44 47
 copyright = u'2016, OpenStack Foundation'
45 48
 
46 49
 # If true, '()' will be appended to :func: etc. cross-reference text.
@@ -66,15 +69,15 @@ else:
66 69
     html_theme = 'default'
67 70
 
68 71
 # Output file base name for HTML help builder.
69
-htmlhelp_basename = '%sdoc' % project
72
+htmlhelp_basename = 'virtualbmcdoc'
70 73
 
71 74
 # Grouping the document tree into LaTeX files. List of tuples
72 75
 # (source start file, target name, title, author, documentclass
73 76
 # [howto/manual]).
74 77
 latex_documents = [
75 78
     ('index',
76
-     '%s.tex' % project,
77
-     u'%s Documentation' % project,
79
+     'doc-virtualbmc.tex',
80
+     u'VirtualBMC Documentation',
78 81
      u'OpenStack Foundation', 'manual'),
79 82
 ]
80 83
 

+ 6
- 0
tox.ini View File

@@ -44,6 +44,12 @@ commands =
44 44
 basepython = python3
45 45
 commands = python setup.py build_sphinx
46 46
 
47
+[testenv:pdf-docs]
48
+basepython = python3
49
+whitelist_externals = make
50
+commands = sphinx-build -b latex doc/source doc/build/pdf
51
+           make -C doc/build/pdf
52
+
47 53
 [testenv:releasenotes]
48 54
 basepython = python3
49 55
 commands =

Loading…
Cancel
Save