Skip to content

Commit 4a02a84

Browse files
committed
Create tox environment to build pdf documentation
This patch enables building .pdf documentation using new 'pdf-docs' tox environment. The newly created tox environment creates latex source codes using sphinx-build and then builds the pdf documentation using make. Also, this patch makes minor changes in the documentation source code to make sure that the .pdf and .html documentation looks good. Story: 2006070 Task: 35454 Change-Id: I74a151163812a3dc8fde9f85739882a54ad11fd3
1 parent a883b9c commit 4a02a84

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

doc/source/conf.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
openstackdocs_repo_name = 'openstack-dev/bashate'
5555
openstackdocs_bug_project = 'bashate'
5656
openstackdocs_bug_tag = ''
57+
openstackdocs_pdf_link = True
5758

5859
# Grouping the document tree for man pages.
5960
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
@@ -80,10 +81,14 @@
8081
# [howto/manual]).
8182
latex_documents = [
8283
('index',
83-
'%s.tex' % project,
84-
u'%s Documentation' % project,
84+
'doc-%s.tex' % project,
85+
u'Bashate Documentation',
8586
u'Bashate Authors', 'manual'),
8687
]
8788

8889
# Example configuration for intersphinx: refer to the Python standard library.
8990
#intersphinx_mapping = {'http://docs.python.org/': None}
91+
latex_use_xindy = False
92+
latex_elements = {
93+
'extraclassoptions': 'openany,oneside',
94+
}

doc/source/contributor/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
============
22
Contributing
33
============
4-
.. include:: ./contributing.rst
4+
5+
.. toctree::
6+
:maxdepth: 2
7+
8+
contributing.rst

doc/source/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Welcome to bashate's documentation!
33
===================================
44

5-
Contents:
6-
75
.. toctree::
86
:maxdepth: 2
97

doc/source/user/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Using bashate
33
=============
44

5-
6-
Contents:
7-
85
.. toctree::
96
:maxdepth: 2
107

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ commands = flake8
2222
deps = -r{toxinidir}/doc/requirements.txt
2323
commands = sphinx-build -a -W -E -b html doc/source doc/build/html
2424

25+
[testenv:pdf-docs]
26+
deps = {[testenv:docs]deps}
27+
whitelist_externals =
28+
make
29+
commands =
30+
sphinx-build -W -b latex doc/source doc/build/pdf
31+
make -C doc/build/pdf
32+
2533
[testenv:venv]
2634
commands = {posargs}
2735

0 commit comments

Comments
 (0)