Jan Ulrich Hasecke
2019-12-27 5a8608111ba668f3b090ce1feb12b2f53226d495
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
15e740 32 project = 'Benutzerhandbuch'
0a126d 33 copyright = '2019, Hostsharing eG'
JUH 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',
738de6 47     'sphinx_rtd_theme',
786c9f 48     'sphinx.ext.graphviz'
0a126d 49 ]
786c9f 50
JUH 51 todo_include_todos = True 
0a126d 52
JUH 53 # Add any paths that contain templates here, relative to this directory.
54 templates_path = ['_templates']
55
56 # The language for content autogenerated by Sphinx. Refer to documentation
57 # for a list of supported languages.
58 #
59 # This is also used if you do content translation via gettext catalogs.
60 # Usually you set "language" from the command line for these cases.
61 language = 'de'
62
63 # List of patterns, relative to source directory, that match files and
64 # directories to ignore when looking for source files.
65 # This pattern also affects html_static_path and html_extra_path.
66 exclude_patterns = []
67
68
69 # -- Options for HTML output -------------------------------------------------
70
71 # The theme to use for HTML and HTML Help pages.  See the documentation for
72 # a list of builtin themes.
73 #
74 html_theme = 'sphinx_rtd_theme'
75
76 # Add any paths that contain custom static files (such as style sheets) here,
77 # relative to this directory. They are copied after the builtin static files,
78 # so a file named "default.css" will overwrite the builtin "default.css".
79 html_static_path = ['_static']
4486d5 80 html_extra_path = ['_static/robots.txt']
15e740 81 latex_logo = '_static/logo.png'
786c9f 82 latex_basename = 'Hostsharing-Benutzerhandbuch-%s.tex' % changesetid
0a126d 83
JUH 84 latex_engine = 'lualatex'
85
86 latex_elements = {
87     'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
88     'fontpkg': r'''
939940 89         \setmainfont{TeX Gyre Heros}%
0a126d 90         \setsansfont{TeX Gyre Heros}%
JUH 91 %        \setmonofont[RawFeature=-tlig]{TeX Gyre Cursor}%
ad994f 92 %        \setmonofont[Ligatures={NoRequired, NoCommon, NoContextual}]{TeX Gyre Cursor}
JUH 93         \setmonofont{Courier New}[Scale=MatchLowercase,ScaleAgain=0.9]
0a126d 94         ''',
939940 95     'preamble': r'\input{./mystyle.sty}',
0a126d 96     'releasename': 'Version',
JUH 97     'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
98     'printindex': r'\footnotesize\raggedright\printindex',
939940 99     'maketitle' : r'\newcommand\sphinxbackoftitlepage{\vspace*{\fill}\noindent Herausgeber: \par Hostsharing eG \par Flughafenstraße 52a \par 22335 Hamburg}\sphinxmaketitle',
0a126d 100     'sphinxsetup': r'''
JUH 101          verbatimwithframe=false,
102          VerbatimColor={cmyk}{0,0,0,0.1},
103          VerbatimHighlightColor={cmyk}{0,0,0,0},
104          TitleColor={named}{Black},
105          hintBorderColor={named}{Grey},
106          attentionborder=2pt,
107          attentionBorderColor={named}{Grey},
108          attentionBgColor={cmyk}{0,0,0,0.1},
109          noteborder=2pt,
110          noteBorderColor={named}{Grey},
111          cautionborder=2pt,
112          cautionBorderColor={named}{Grey},
113          cautionBgColor={cmyk}{0,0,0,0.1},
114          InnerLinkColor={named}{Black},
115          OuterLinkColor={named}{Black},
116          shadowsize=3pt,
117          verbatimcontinuedalign=l,
118          verbatimcontinuesalign=r
119 ''',
120    'fvset': r'\fvset{fontsize=\footnotesize}',
121 }
122
939940 123 latex_additional_files = ['mystyle.sty']
JUH 124
125 latex_docclass = {'manual': 'book',}
126 latex_show_pagerefs = True
127 latex_show_urls = 'footnote'
128 latex_use_xindy = False
129
786c9f 130 latex_documents = [
15e740 131     ('index', latex_basename, project,
JUH 132      author, 'manual'),
786c9f 133     ]
JUH 134
0a126d 135 def setup(app):
JUH 136     app.add_object_type('role', 'role',
137     objname='Rolle',
138     indextemplate='pair: %s; Rolle')