Jan Ulrich Hasecke
2019-11-13 b4f1345b1177d7a6c52f2bdf72d59b40f49c99ca
commit | author | age
8d081a 1
0a126d 2 # Configuration file for the Sphinx documentation builder.
JUH 3 #
4 # This file only contains a selection of the most common options. For a full
5 # list see the documentation:
6 # https://www.sphinx-doc.org/en/master/usage/configuration.html
7
8 # -- Path setup --------------------------------------------------------------
9
10 # If extensions (or modules to document with autodoc) are in another directory,
11 # add these directories to sys.path here. If the directory is relative to the
12 # documentation root, use os.path.abspath to make it absolute, like shown here.
13 #
14 # import os
15 # import sys
16 # sys.path.insert(0, os.path.abspath('.'))
17
18 import datetime
19 import os
20 import sys
21 from subprocess import check_output
22 import sphinx_rtd_theme
23
939940 24 changesetid = check_output(["git", "rev-parse", "--short", "HEAD"]).decode("utf-8")[:7]
JUH 25
26 numfig = True
27 numfig_secnum_depth = 3
28 math_numfig = False
0a126d 29
JUH 30 # -- Project information -----------------------------------------------------
31
32 project = 'Hostsharing Benutzerhandbuch'
33 copyright = '2019, Hostsharing eG'
34 author = 'Hostsharing eG'
35
36 # The full version, including alpha/beta/rc tags
37 release = '1'
38
39
40 # -- General configuration ---------------------------------------------------
41
42 # Add any Sphinx extension module names here, as strings. They can be
43 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
44 # ones.
45 extensions = [
786c9f 46     'sphinx.ext.todo',
JUH 47     'sphinx.ext.graphviz'
0a126d 48 ]
786c9f 49
JUH 50 todo_include_todos = True 
0a126d 51
JUH 52 # Add any paths that contain templates here, relative to this directory.
53 templates_path = ['_templates']
54
55 # The language for content autogenerated by Sphinx. Refer to documentation
56 # for a list of supported languages.
57 #
58 # This is also used if you do content translation via gettext catalogs.
59 # Usually you set "language" from the command line for these cases.
60 language = 'de'
61
62 # List of patterns, relative to source directory, that match files and
63 # directories to ignore when looking for source files.
64 # This pattern also affects html_static_path and html_extra_path.
65 exclude_patterns = []
66
67
68 # -- Options for HTML output -------------------------------------------------
69
70 # The theme to use for HTML and HTML Help pages.  See the documentation for
71 # a list of builtin themes.
72 #
73 html_theme = 'sphinx_rtd_theme'
74
75 # Add any paths that contain custom static files (such as style sheets) here,
76 # relative to this directory. They are copied after the builtin static files,
77 # so a file named "default.css" will overwrite the builtin "default.css".
78 html_static_path = ['_static']
79
786c9f 80 latex_basename = 'Hostsharing-Benutzerhandbuch-%s.tex' % changesetid
0a126d 81
JUH 82 latex_engine = 'lualatex'
83
84 latex_elements = {
85     'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
86     'fontpkg': r'''
939940 87         \setmainfont{TeX Gyre Heros}%
0a126d 88         \setsansfont{TeX Gyre Heros}%
JUH 89 %        \setmonofont[RawFeature=-tlig]{TeX Gyre Cursor}%
ad994f 90 %        \setmonofont[Ligatures={NoRequired, NoCommon, NoContextual}]{TeX Gyre Cursor}
JUH 91         \setmonofont{Courier New}[Scale=MatchLowercase,ScaleAgain=0.9]
0a126d 92         ''',
939940 93     'preamble': r'\input{./mystyle.sty}',
0a126d 94     'releasename': 'Version',
JUH 95     'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
96     'printindex': r'\footnotesize\raggedright\printindex',
939940 97     'maketitle' : r'\newcommand\sphinxbackoftitlepage{\vspace*{\fill}\noindent Herausgeber: \par Hostsharing eG \par Flughafenstraße 52a \par 22335 Hamburg}\sphinxmaketitle',
0a126d 98     'sphinxsetup': r'''
JUH 99          verbatimwithframe=false,
100          VerbatimColor={cmyk}{0,0,0,0.1},
101          VerbatimHighlightColor={cmyk}{0,0,0,0},
102          TitleColor={named}{Black},
103          hintBorderColor={named}{Grey},
104          attentionborder=2pt,
105          attentionBorderColor={named}{Grey},
106          attentionBgColor={cmyk}{0,0,0,0.1},
107          noteborder=2pt,
108          noteBorderColor={named}{Grey},
109          cautionborder=2pt,
110          cautionBorderColor={named}{Grey},
111          cautionBgColor={cmyk}{0,0,0,0.1},
112          InnerLinkColor={named}{Black},
113          OuterLinkColor={named}{Black},
114          shadowsize=3pt,
115          verbatimcontinuedalign=l,
116          verbatimcontinuesalign=r
117 ''',
118    'fvset': r'\fvset{fontsize=\footnotesize}',
119 }
120
939940 121 latex_additional_files = ['mystyle.sty']
JUH 122
123 latex_docclass = {'manual': 'book',}
124 latex_show_pagerefs = True
125 latex_show_urls = 'footnote'
126 latex_use_xindy = False
127
786c9f 128 latex_documents = [
JUH 129     ('index', latex_basename, 'Hostsharing Benutzerhandbuch',
130      'Hostsharing eG', 'manual'),
131     ]
132
0a126d 133 def setup(app):
JUH 134     app.add_object_type('role', 'role',
135     objname='Rolle',
136     indextemplate='pair: %s; Rolle')