summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-12-05 06:20:45 +0000
committerGerrit Code Review <review@openstack.org>2019-12-05 06:20:45 +0000
commit55d7b1327a9f8201b3d5309898e04ae7e7a10af8 (patch)
tree0539700bd4a222116c126c3799588a72a98a6910
parent2becc6b273321fc01c8d9726d93a3263d97e0bcc (diff)
parentdebff05779ad12bcbee4e009cdd28c4dc5d30444 (diff)
downloadheat-55d7b1327a9f8201b3d5309898e04ae7e7a10af8.tar.gz
Merge "PDF documentation build"
-rw-r--r--doc/source/conf.py12
-rw-r--r--doc/source/configuration/sample_config.rst12
-rw-r--r--doc/source/ext/resources.py15
-rw-r--r--tox.ini9
4 files changed, 41 insertions, 7 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 1342c5be7..3c2cfba4b 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -259,7 +259,7 @@ htmlhelp_basename = 'Heatdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual])
latex_documents = [
- ('index', 'Heat.tex', u'Heat Documentation',
+ ('index', 'doc-heat.tex', u'Heat Documentation',
u'Heat Developers', 'manual'),
]
@@ -281,8 +281,16 @@ latex_documents = [
# latex_appendices = []
# If false, no module index is generated.
-# latex_domain_indices = True
+latex_domain_indices = False
+# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
+latex_use_xindy = False
+
+latex_elements = {
+ 'makeindex': '',
+ 'printindex': '',
+ 'preamble': r'\setcounter{tocdepth}{3}',
+}
# -- Options for manual page output -------------------------------------------
diff --git a/doc/source/configuration/sample_config.rst b/doc/source/configuration/sample_config.rst
index f572f4844..5e4b4fc1b 100644
--- a/doc/source/configuration/sample_config.rst
+++ b/doc/source/configuration/sample_config.rst
@@ -7,6 +7,14 @@ auto-generated from heat when this documentation is built, so if you are
having issues with an option, please compare your version of heat with the
version of this documentation.
-The sample configuration can also be downloaded in `file form <../_static/heat.conf.sample>`_.
+.. only:: html
-.. literalinclude:: ../_static/heat.conf.sample
+ The sample configuration can also be downloaded in
+ `file form <../_static/heat.conf.sample>`_.
+
+ .. literalinclude:: ../_static/heat.conf.sample
+
+.. only:: latex
+
+ See the online version of this documentation for the full example config
+ file.
diff --git a/doc/source/ext/resources.py b/doc/source/ext/resources.py
index 32a0dc3ff..50db470af 100644
--- a/doc/source/ext/resources.py
+++ b/doc/source/ext/resources.py
@@ -245,7 +245,10 @@ resources:
if not prop.implemented:
para = nodes.line('', _('Not implemented.'))
note = nodes.note('', para)
- definition.append(note)
+ if sub_prop:
+ definition.append(para)
+ else:
+ definition.append(note)
return
if sub_prop and prop.type not in (properties.Schema.LIST,
@@ -351,11 +354,14 @@ resources:
if not self.attrs_schemata:
return
section = self._section(parent, _('Attributes'), '%s-attrs')
+ definition_list = nodes.definition_list()
+ section.append(definition_list)
+
for prop_key, prop in sorted(self.attrs_schemata.items()):
if prop.support_status.status != support.HIDDEN:
description = prop.description
attr_section = self._prop_section(
- section, prop_key, '%s-attr-' + prop_key)
+ definition_list, prop_key, '%s-attr-' + prop_key)
self._status_str(prop.support_status, attr_section)
@@ -367,9 +373,12 @@ resources:
if not self.update_policy_schemata:
return
section = self._section(parent, _('update_policy'), '%s-updpolicy')
+ definition_list = nodes.definition_list()
+ section.append(definition_list)
+
for _key, _prop in sorted(self.update_policy_schemata.items(),
key=cmp_to_key(self.cmp_prop)):
- self.contribute_property(section, _key, _prop)
+ self.contribute_property(definition_list, _key, _prop)
class IntegrateResourcePages(ResourcePages):
diff --git a/tox.ini b/tox.ini
index 7e0663164..e5ca7e994 100644
--- a/tox.ini
+++ b/tox.ini
@@ -61,6 +61,15 @@ commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
+[testenv:pdf-docs]
+basepython = python3
+deps = {[testenv:docs]deps}
+whitelist_externals =
+ make
+commands =
+ sphinx-build -W -b latex doc/source doc/build/pdf
+ make -C doc/build/pdf
+
[testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish