diff options
author | Peter Mikus <pmikus@cisco.com> | 2017-07-28 13:06:56 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2017-07-31 18:13:02 +0000 |
commit | 196ed0599148d6c8ed0e2ca82ad03e129e26428a (patch) | |
tree | 0bf5e622c46eb78e2732d877a54c6a79c21ecd3d /resources/tools/report_gen/conf.py | |
parent | 63026fb66d761b13c4b44f4935ee30010f8856de (diff) |
CSIT-618 Add LaTeX support to release report
- Add option to generate PDF from release report.
- Conditional content
- Static plot conversion
Change-Id: I7c4f0b41898791d1cab446d0fc3b07220380e1b8
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/report_gen/conf.py')
-rw-r--r-- | resources/tools/report_gen/conf.py | 87 |
1 files changed, 85 insertions, 2 deletions
diff --git a/resources/tools/report_gen/conf.py b/resources/tools/report_gen/conf.py index 89dd45824f..87120a5baf 100644 --- a/resources/tools/report_gen/conf.py +++ b/resources/tools/report_gen/conf.py @@ -30,7 +30,8 @@ sys.path.insert(0, os.path.abspath('.')) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinxcontrib.programoutput'] +extensions = ['sphinxcontrib.programoutput', + 'sphinx.ext.ifconfig'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -109,7 +110,6 @@ todo_include_todos = False # pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Your Name'),] - # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -135,3 +135,86 @@ html_context = { '_static/theme_overrides.css', # overrides for wide tables in RTD theme ], } + +# -- Options for LaTeX output --------------------------------------------- + +latex_engine = 'pdflatex' + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + #'papersize': 'a4paper', + + # The font size ('10pt', '11pt' or '12pt'). + # + #'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + 'preamble': r''' + \usepackage{pdfpages} + \usepackage{svg} + \usepackage{charter} + \usepackage[defaultsans]{lato} + \usepackage{inconsolata} + ''', + + # Latex figure (float) alignment + # + 'figure_align': 'H', + + # Latex other setup + # + 'extraclassoptions': 'openany', + 'sphinxsetup': r''' + TitleColor={RGB}{225,38,40}, + InnerLinkColor={RGB}{62,62,63}, + OuterLinkColor={RGB}{225,38,40}, + shadowsep=0pt, + shadowsize=0pt, + shadowrule=0pt + ''', + 'fontpkg': r''' + \renewcommand{\familydefault}{\sfdefault} + ''' +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'csit.tex', u'CSIT Report', + u'', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# +latex_logo = 'fdio.pdf' + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# +latex_use_parts = True + +# If true, show page references after internal links. +# +latex_show_pagerefs = True + +# If true, show URL addresses after external links. +# +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# +# latex_appendices = [] + +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + +# If false, no module index is generated. +# +# latex_domain_indices = True |