Browse Source

Merge "PDF documentation build"

master
Zuul 1 week ago
parent
commit
d800a41f66
3 changed files with 29 additions and 10 deletions
  1. 14
    7
      doc/source/conf.py
  2. 5
    3
      doc/source/index.rst
  3. 10
    0
      tox.ini

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

@@ -207,10 +207,10 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M'
207 207
 # Grouping the document tree into LaTeX files. List of tuples
208 208
 # (source start file, target name, title, author,
209 209
 # documentclass [howto/manual]).
210
-# latex_documents = [
211
-#     ('index', 'NeutronLib.tex', u'Neutron Library Documentation',
212
-#      u'Neutron development team', 'manual'),
213
-# ]
210
+latex_documents = [
211
+    ('index', 'doc-neutron-lib.tex', u'Neutron Library Documentation',
212
+     u'Neutron development team', 'manual'),
213
+]
214 214
 
215 215
 # The name of an image file (relative to this directory) to place at the top of
216 216
 # the title page.
@@ -229,6 +229,13 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M'
229 229
 # If false, no module index is generated.
230 230
 #latex_use_modindex = True
231 231
 
232
+latex_elements = {
233
+    'makeindex': '',
234
+    'printindex': '',
235
+    'preamble': r'\setcounter{tocdepth}{3}',
236
+}
237
+
238
+
232 239
 # -- Options for openstackdocstheme -------------------------------------------
233 240
 repository_name = 'openstack/neutron-lib'
234 241
 bug_project = 'neutron'
@@ -236,7 +243,7 @@ bug_tag = 'doc'
236 243
 
237 244
 linkcheck_anchors_ignore = [
238 245
     # skip gerrit anchors
239
-    '\/q\/.*',
240
-    'q\,.*',
241
-    '\/c\/.*'
246
+    r'\/q\/.*',
247
+    r'q\,.*',
248
+    r'\/c\/.*'
242 249
 ]

+ 5
- 3
doc/source/index.rst View File

@@ -45,7 +45,9 @@ Enjoy!
45 45
    user/index
46 46
    contributor/index
47 47
 
48
-.. toctree::
49
-   :maxdepth: 1
48
+.. only:: html
49
+
50
+   .. toctree::
51
+      :maxdepth: 1
50 52
 
51
-   reference/index
53
+      reference/index

+ 10
- 0
tox.ini View File

@@ -57,6 +57,16 @@ deps =
57 57
   -r{toxinidir}/doc/requirements.txt
58 58
 commands = sphinx-build -W -b html doc/source doc/build/html
59 59
 
60
+[testenv:pdf-docs]
61
+basepython = python3
62
+envdir = {toxworkdir}/docs
63
+deps = {[testenv:docs]deps}
64
+whitelist_externals =
65
+  make
66
+commands =
67
+  sphinx-build -W -b latex doc/source doc/build/pdf
68
+  make -C doc/build/pdf
69
+
60 70
 [testenv:api-ref]
61 71
 basepython = python3
62 72
 whitelist_externals = rm

Loading…
Cancel
Save