source: rtems-docs/common/conf.py @ 5fc9f8b

5
Last change on this file since 5fc9f8b was 5fc9f8b, checked in by Sebastian Huber <sebastian.huber@…>, on 08/24/17 at 05:24:28

common: Remove obsolete latex_use_parts

This configuration is obsolete and no longer documented:

http://www.sphinx-doc.org/en/stable/config.html#options-for-latex-output

The use of parts at the top-level results in ugly documents.

  • Property mode set to 100644
File size: 6.9 KB
Line 
1import datetime
2
3def build_date():
4    now = datetime.date.today()
5    m = now.strftime('%B')
6    y = now.strftime('%Y')
7    if now.day == 11:
8        s = 'th'
9    elif now.day % 10 == 1:
10        s = 'st'
11    elif now.day == 12:
12        s = 'th'
13    elif now.day % 10 == 2:
14        s = 'nd'
15    elif now.day == 13:
16        s = 'th'
17    elif now.day == 3:
18        s = 'rd'
19    else:
20        s = 'th'
21    d = '%2d%s' % (now.day, s)
22    return '%s %s %s' % (d, m, y)
23
24extensions = [
25        "sphinx.ext.autodoc",
26        "sphinx.ext.coverage",
27        "sphinx.ext.doctest",
28        "sphinx.ext.graphviz",
29        "sphinx.ext.intersphinx",
30        "sphinx.ext.mathjax",
31        "sphinxcontrib.bibtex",
32        "rtemsext",
33        "rtemsdomain",
34]
35
36# Add any paths that contain templates here, relative to this directory.
37templates_path = ['build/_templates']
38
39# The suffix of source filenames.
40source_suffix = '.rst'
41
42# The encoding of source files.
43#source_encoding = 'utf-8-sig'
44
45# The master toctree document.
46master_doc = 'index'
47
48# General information about the project.
49project = u'RTEMS Documentation Project'
50copyright = u'2017, RTEMS Project (built %s)' % (build_date())
51
52# The version info for the project you're documenting, acts as replacement for
53# |version| and |release|, also used in various other places throughout the
54# built documents.
55#
56# The short X.Y version.
57#version = '@VERSION@'
58
59# The full version, including alpha/beta/rc tags.
60#release = '@RELEASE@'
61
62# The language for content autogenerated by Sphinx. Refer to documentation
63# for a list of supported languages.
64#language = None
65
66# There are two options for replacing |today|: either, you set today to some
67# non-false value, then it is used:
68#today = ''
69# Else, today_fmt is used as the format for a strftime call.
70#today_fmt = '%B %d, %Y'
71
72# List of patterns, relative to source directory, that match files and
73# directories to ignore when looking for source files.
74exclude_patterns = []
75
76# The reST default role (used for this markup: `text`) to use for all documents.
77#default_role = None
78
79# If true, '()' will be appended to :func: etc. cross-reference text.
80#add_function_parentheses = True
81
82# If true, the current module name will be prepended to all description
83# unit titles (such as .. function::).
84#add_module_names = True
85
86# If true, sectionauthor and moduleauthor directives will be shown in the
87# output. They are ignored by default.
88#show_authors = False
89
90# The name of the Pygments (syntax highlighting) style to use.
91pygments_style = 'sphinx'
92
93# A list of ignored prefixes for module index sorting.
94#modindex_common_prefix = []
95
96# -- Options for HTML output ---------------------------------------------------
97
98# The theme to use for HTML and HTML Help pages.  See the documentation for
99# a list of builtin themes.
100
101import sphinx_rtd_theme_rtems
102html_theme = "sphinx_rtd_theme_rtems"
103html_theme_path = [sphinx_rtd_theme_rtems.get_html_theme_path()]
104
105# Theme options are theme-specific and customize the look and feel of a theme
106# further.  For a list of options available for each theme, see the
107# documentation.
108html_theme_options = {
109    'collapse_navigation': False,
110    'display_version': True,
111    'sticky_navigation': True,
112    'genindex': True,
113}
114
115# Add any paths that contain custom themes here, relative to this directory.
116#html_theme_path = []
117
118# The name for this set of Sphinx documents.  If None, it defaults to
119# "<project> v<release> documentation".
120#html_title = None
121
122# A shorter title for the navigation bar.  Default is the same as html_title.
123#html_short_title = None
124
125# The name of an image file (relative to this directory) to place at the top
126# of the sidebar.
127#html_logo = None
128
129# The name of an image file (within the static path) to use as favicon of the
130# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
131# pixels large.
132#html_favicon = None
133
134# Add any paths that contain custom static files (such as style sheets) here,
135# relative to this directory. They are copied after the builtin static files,
136# so a file named "default.css" will overwrite the builtin "default.css".
137html_static_path = ['build/_static']
138
139# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
140# using the given strftime format.
141#html_last_updated_fmt = '%b %d, %Y'
142
143# If true, SmartyPants will be used to convert quotes and dashes to
144# typographically correct entities.
145#html_use_smartypants = True
146
147# Custom sidebar templates, maps document names to template names.
148#html_sidebars = {}
149
150html_sidebars = {
151#       'index':    ['sidebarlogo.html', 'sidebarintro.html', 'sourcelink.html','searchbox.html'],
152#       '**':       ['sidebarlogo.html', 'localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']
153}
154
155
156# Additional templates that should be rendered to pages, maps page names to
157# template names.
158#html_additional_pages = {}
159
160# If false, no module index is generated.
161#html_domain_indices = True
162
163# If false, no index is generated.
164#html_use_index = True
165
166# If true, the index is split into individual pages for each letter.
167#html_split_index = False
168
169# If true, links to the reST sources are added to the pages.
170html_show_sourcelink = False
171
172# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
173#html_show_sphinx = True
174
175# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
176#html_show_copyright = True
177
178# If true, an OpenSearch description file will be output, and all pages will
179# contain a <link> tag referring to it.  The value of this option must be the
180# base URL from which the finished HTML is served.
181#html_use_opensearch = ''
182
183# This is the file name suffix for HTML files (e.g. ".xhtml").
184#html_file_suffix = None
185
186# Output file base name for HTML help builder.
187htmlhelp_basename = 'rtemsdoc'
188
189
190# -- Options for LaTeX output --------------------------------------------------
191latex_paper_size = 'a4'
192
193# Grouping the document tree into LaTeX files. List of tuples
194# (source start file, target name, title, author, documentclass [howto/manual]).
195latex_documents = [] # must be overridden in local conf.py
196
197# Additional stuff for LaTeX
198#    'fontpkg':      r'\usepackage{mathpazo}',
199latex_elements = {
200    'papersize':    'a4paper',
201    'pointsize':    '11pt',
202    'preamble':     r'''
203\newcommand{\rtemscopyright}{%s}
204\usepackage{rtemsstyle}
205''' % (copyright)
206}
207
208
209latex_additional_files = ['../common/rtemsstyle.sty', '../common/minted.sty', '../common/logo.pdf']
210latex_use_modindex = False
211
212
213# The name of an image file (relative to this directory) to place at the top of
214# the title page.
215#latex_logo = None
216
217# If true, show page references after internal links.
218latex_show_pagerefs = False
219
220# If true, show URL addresses after external links.
221#latex_show_urls=True
222
223# Documents to append as an appendix to all manuals.
224#latex_appendices = []
225
226# If false, no module index is generated.
227#latex_domain_indices = True
228
229
230# Example configuration for intersphinx: refer to the Python standard library.
231#intersphinx_mapping = {'http://docs.python.org/': None}
232
233highlight_language = "c"
Note: See TracBrowser for help on using the repository browser.