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: I16953e68b398108b702afdaddbb4460874b08792
tags/1.4.0^0
Kaifeng Wang 3 months ago
parent
commit
75f09a9b77
2 changed files with 15 additions and 6 deletions
  1. 6
    6
      doc/source/conf.py
  2. 9
    0
      tox.ini

+ 6
- 6
doc/source/conf.py View File

@@ -49,7 +49,6 @@ source_suffix = '.rst'
49 49
 master_doc = 'index'
50 50
 
51 51
 # General information about the project.
52
-project = u'Networking Baremetal'
53 52
 copyright = u'2017, The Networking Baremetal team'
54 53
 
55 54
 config_generator_config_file = '../../tools/config/networking-baremetal-config-generator.conf'
@@ -79,19 +78,20 @@ html_theme = 'openstackdocs'
79 78
 
80 79
 # openstackdocstheme options
81 80
 repository_name = 'openstack/networking-baremetal'
82
-bug_project = 'networking-baremetal'
83
-bug_tag = ''
81
+use_storyboard = True
84 82
 
85 83
 # Output file base name for HTML help builder.
86
-htmlhelp_basename = '%sdoc' % project
84
+htmlhelp_basename = 'networking-baremetaldoc'
85
+
86
+latex_use_xindy = False
87 87
 
88 88
 # Grouping the document tree into LaTeX files. List of tuples
89 89
 # (source start file, target name, title, author, documentclass
90 90
 # [howto/manual]).
91 91
 latex_documents = [
92 92
     ('index',
93
-     '%s.tex' % project,
94
-     u'%s Documentation' % project,
93
+     'doc-networking-baremetal.tex',
94
+     u'Networking Baremetal Documentation',
95 95
      u'OpenStack Foundation', 'manual'),
96 96
 ]
97 97
 

+ 9
- 0
tox.ini View File

@@ -47,6 +47,15 @@ sitepackages = False
47 47
 commands =
48 48
   python setup.py build_sphinx
49 49
 
50
+[testenv:pdf-docs]
51
+basepython = python3
52
+whitelist_externals = make
53
+setenv = PYTHONHASHSEED=0
54
+sitepackages = False
55
+commands =
56
+  sphinx-build -b latex doc/source doc/build/pdf
57
+  make -C doc/build/pdf
58
+
50 59
 [testenv:releasenotes]
51 60
 basepython = python3
52 61
 commands =

Loading…
Cancel
Save