on 5cd37d8 help sign in
Idris-dev/docs/conf.py
436 lines 14 kB history raw
1# -*- coding: utf-8 -*-
2#
3# Idris Manual documentation build configuration file, created by
4# sphinx-quickstart on Sat Feb 28 20:41:47 2015.
5#
6# This file is execfile()d with the current directory set to its
7# containing dir.
8#
9# Note that not all possible configuration values are present in this
10# autogenerated file.
12# All configuration values have a default; values that are commented out
13# serve to show the default.
15import sys
16import os
18# True if the readthedocs theme is locally installed
19on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
21# If extensions (or modules to document with autodoc) are in another directory,
22# add these directories to sys.path here. If the directory is relative to the
23# documentation root, use os.path.abspath to make it absolute, like shown here.
24#sys.path.insert(0, os.path.abspath('.'))
26# -- General configuration ------------------------------------------------
28# If your documentation needs a minimal Sphinx version, state it here.
29#needs_sphinx = '1.0'
31# Add any Sphinx extension module names here, as strings. They can be
32# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33# ones.
34extensions = [
35 'sphinx.ext.todo',
36# 'sphinx.ext.pngmath', # imgmath is not supported on readthedocs.
37 'sphinx.ext.ifconfig',
40# Add any paths that contain templates here, relative to this directory.
41templates_path = ['_templates']
43# The suffix of source filenames.
44source_suffix = '.rst'
46# The encoding of source files.
47#source_encoding = 'utf-8-sig'
49# The master toctree document.
50master_doc = 'index'
52# General information about the project.
53project = u'Idris'
54copyright = u'2017, The Idris Community'
55author = u'The Idris Community'
57# The version info for the project you're documenting, acts as replacement for
58# |version| and |release|, also used in various other places throughout the
59# built documents.
61# The short X.Y version.
62version = '1.3'
63# The full version, including alpha/beta/rc tags.
64release = '1.3.1'
66# The language for content autogenerated by Sphinx. Refer to documentation
67# for a list of supported languages.
69# This is also used if you do content translation via gettext catalogs.
70# Usually you set "language" from the command line for these cases.
71language = None
73# There are two options for replacing |today|: either, you set today to some
74# non-false value, then it is used:
75#today = ''
76# Else, today_fmt is used as the format for a strftime call.
77#today_fmt = '%B %d, %Y'
79# List of patterns, relative to source directory, that match files and
80# directories to ignore when looking for source files.
81exclude_patterns = ['_build']
83# The reST default role (used for this markup: `text`) to use for all
84# documents.
85#default_role = None
87# If true, '()' will be appended to :func: etc. cross-reference text.
88#add_function_parentheses = True
90# If true, the current module name will be prepended to all description
91# unit titles (such as .. function::).
92#add_module_names = True
94# If true, sectionauthor and moduleauthor directives will be shown in the
95# output. They are ignored by default.
96#show_authors = False
98# The name of the Pygments (syntax highlighting) style to use.
99pygments_style = 'sphinx'
101# A list of ignored prefixes for module index sorting.
102#modindex_common_prefix = []
104# If true, keep warnings as "system message" paragraphs in the built documents.
105#keep_warnings = False
107# If true, `todo` and `todoList` produce output, else they produce nothing.
108todo_include_todos = True
111# -- Options for HTML output ----------------------------------------------
113# The theme to use for HTML and HTML Help pages. See the documentation for
114# a list of builtin themes.
115html_theme = "default"
117if not on_rtd: # only import and set the theme if we're building docs locally
118 try:
119 import sphinx_rtd_theme
120 html_theme = 'sphinx_rtd_theme'
121 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
122 except ImportError:
123 html_theme = "default"
125# Theme options are theme-specific and customize the look and feel of a theme
126# further. For a list of options available for each theme, see the
127# documentation.
128#html_theme_options = {}
130# Add any paths that contain custom themes here, relative to this directory.
131#html_theme_path = []
133# The name for this set of Sphinx documents. If None, it defaults to
134# "<project> v<release> documentation".
135#html_title = None
137# A shorter title for the navigation bar. Default is the same as html_title.
138#html_short_title = None
140# The name of an image file (relative to this directory) to place at the top
141# of the sidebar.
142#html_logo = None
144# The name of an image file (within the static path) to use as favicon of the
145# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
146# pixels large.
147#html_favicon = None
149# Add any paths that contain custom static files (such as style sheets) here,
150# relative to this directory. They are copied after the builtin static files,
151# so a file named "default.css" will overwrite the builtin "default.css".
152html_static_path = ['_static']
154html_context = {
155 'css_files': [
156 '_static/theme_overrides.css', # override wide tables in RTD theme
157 ],
158 }
160# Add any extra paths that contain custom files (such as robots.txt or
161# .htaccess) here, relative to this directory. These files are copied
162# directly to the root of the documentation.
163#html_extra_path = []
165# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
166# using the given strftime format.
167#html_last_updated_fmt = '%b %d, %Y'
169# If true, SmartyPants will be used to convert quotes and dashes to
170# typographically correct entities.
171#html_use_smartypants = True
173# Custom sidebar templates, maps document names to template names.
174#html_sidebars = {}
176# Additional templates that should be rendered to pages, maps page names to
177# template names.
178#html_additional_pages = {}
180# If false, no module index is generated.
181#html_domain_indices = True
183# If false, no index is generated.
184#html_use_index = True
186# If true, the index is split into individual pages for each letter.
187#html_split_index = False
189# If true, links to the reST sources are added to the pages.
190#html_show_sourcelink = True
192# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
193#html_show_sphinx = True
195# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
196#html_show_copyright = True
198# If true, an OpenSearch description file will be output, and all pages will
199# contain a <link> tag referring to it. The value of this option must be the
200# base URL from which the finished HTML is served.
201#html_use_opensearch = ''
203# This is the file name suffix for HTML files (e.g. ".xhtml").
204#html_file_suffix = None
206# Language to be used for generating the HTML full-text search index.
207# Sphinx supports the following languages:
208# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
209# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
210#html_search_language = 'en'
212# A dictionary with options for the search language support, empty by default.
213# Now only 'ja' uses this config value
214#html_search_options = {'type': 'default'}
216# The name of a javascript file (relative to the configuration directory) that
217# implements a search results scorer. If empty, the default will be used.
218#html_search_scorer = 'scorer.js'
220# Output file base name for HTML help builder.
221htmlhelp_basename = 'IdrisManualdoc'
223# -- Options for LaTeX output ---------------------------------------------
225latex_title_page = r'''
226\begin{titlepage}
227 \vspace*{\fill}
228 \begin{center}
229 \includegraphics[width=0.25\textwidth]{idris-512x512.png}\par
230 \vspace{1cm}
231 {\huge\sffamily\bfseries \makeatletter\@title\makeatother\par}
232 \vspace{1cm}
233 {\Large Version \version\par}
234 \end{center}
235 \vspace*{\fill}
236\end{titlepage}
237'''
239latex_elements = {
240# The paper size ('letterpaper' or 'a4paper').
241'papersize': 'a4paper',
243'fontpkg': '',
244'inputenc': '',
245'utf8extra': '',
246'releasename': 'Version',
248# The font size ('10pt', '11pt' or '12pt').
249'pointsize': '10pt',
251# Additional stuff for the LaTeX preamble.
252'preamble': r'''
253\usepackage{lmodern}
254\usepackage[T1]{fontenc}
255\usepackage[utf8x]{inputenc}
256\usepackage{titlesec}
258\usepackage{fancyhdr}
259\fancypagestyle{plain}{%
260 \renewcommand{\headrulewidth}{0pt}%
261 \fancyhf{}%
262 \fancyfoot[C]{\textsf{\thepage}}
264\pagestyle{fancy}
265\fancyhf{}
266\fancyhead[LE,RO]{\textsf{\bfseries{v\version}}}
267\fancyhead[LO,RE]{\textsf{\bfseries\leftmark}}
268%\fancyhead[LO]{\textsf{\bfseries{\leftmark}}}
269%\fancyhead[RO]{\textsf{\bfseries{v\version}}}
270%\fancyhead[RE]{\textsf{\bfseries{\leftmark}}}
271%\fancyhead[LE]{\textsf{\bfseries{v\version}}}
272\fancyfoot[C]{\textsf{\thepage}}
273\renewcommand{\footrulewidth}{0pt}
274\renewcommand{\headrulewidth}{0pt}
276\usepackage[font={small,it}]{caption}
277\titleformat{\section}
278 {\normalfont\sffamily\Large\bfseries\color{black}}
279 {\thesection}{1em}{}
280\titleformat{\subsection}
281 {\sffamily\large\bfseries\color{black}}
282 {\thesubsection}{1em}{}
283\titleformat{\subsubsection}
284 {\sffamily\normalsize\bfseries\color{black}}
285 {\thesubsubsection}{1em}{}
286\titleformat{\paragraph}{\normalfont\normalsize\slshape}{\theparagraph}{1em}{}
287\setlength{\parskip}{1em}
289\hypersetup{colorlinks = false}
290\definecolor{VerbatimBorderColor}{rgb}{1,1,1}
291''',
293'maketitle': latex_title_page,
294'tableofcontents': "\\tableofcontents"
295# Latex figure (float) alignment
296#'figure_align': 'htbp',
299# Grouping the document tree into LaTeX files. List of tuples
300# (source start file, target name, title,
301# author, documentclass [howto, manual, or own class]).
302latex_documents = [
303 ('index', 'idris-documentation-complete.tex', u'Documentation for the Idris Language', u'The Idris Community', 'report'),
304 ('tutorial/index', 'idris-tutorial.tex', u'The Idris Tutorial', u'The Idris Community', 'howto'),
308latex_show_pagerefs = True
309latex_show_url = 'footnote'
311# The name of an image file (relative to this directory) to place at the top of
312# the title page.
313latex_logo = '../icons/idris-512x512.png'
315# For "manual" documents, if this is true, then toplevel headings are parts,
316# not chapters.
317#latex_use_parts = True
319# If true, show page references after internal links.
320#latex_show_pagerefs = False
322# If true, show URL addresses after external links.
323#latex_show_urls = False
325# Documents to append as an appendix to all manuals.
326#latex_appendices = []
328# If false, no module index is generated.
329#latex_domain_indices = True
332# -- Options for manual page output ---------------------------------------
334# One entry per manual page. List of tuples
335# (source start file, name, description, authors, manual section).
336man_pages = [
337 (master_doc, 'idrismanual', u'Idris Manual Documentation',
338 [author], 1)
341# If true, show URL addresses after external links.
342#man_show_urls = False
345# -- Options for Texinfo output -------------------------------------------
347# Grouping the document tree into Texinfo files. List of tuples
348# (source start file, target name, title, author,
349# dir menu entry, description, category)
350texinfo_documents = [
351 (master_doc, 'IdrisManual', u'Idris Manual Documentation',
352 author, 'IdrisManual', 'One line description of project.',
353 'Miscellaneous'),
356# Documents to append as an appendix to all manuals.
357#texinfo_appendices = []
359# If false, no module index is generated.
360#texinfo_domain_indices = True
362# How to display URL addresses: 'footnote', 'no', or 'inline'.
363#texinfo_show_urls = 'footnote'
365# If true, do not generate a @detailmenu in the "Top" node's menu.
366#texinfo_no_detailmenu = False
369# -- Options for Epub output ----------------------------------------------
371# Bibliographic Dublin Core info.
372epub_title = project
373epub_author = author
374epub_publisher = author
375epub_copyright = copyright
377# The basename for the epub file. It defaults to the project name.
378#epub_basename = project
380# The HTML theme for the epub output. Since the default themes are not optimized
381# for small screen space, using the same theme for HTML and epub output is
382# usually not wise. This defaults to 'epub', a theme designed to save visual
383# space.
384#epub_theme = 'epub'
386# The language of the text. It defaults to the language option
387# or 'en' if the language is not set.
388#epub_language = ''
390# The scheme of the identifier. Typical schemes are ISBN or URL.
391#epub_scheme = ''
393# The unique identifier of the text. This can be a ISBN number
394# or the project homepage.
395#epub_identifier = ''
397# A unique identification for the text.
398#epub_uid = ''
400# A tuple containing the cover image and cover page html template filenames.
401#epub_cover = ()
403# A sequence of (type, uri, title) tuples for the guide element of content.opf.
404#epub_guide = ()
406# HTML files that should be inserted before the pages created by sphinx.
407# The format is a list of tuples containing the path and title.
408#epub_pre_files = []
410# HTML files shat should be inserted after the pages created by sphinx.
411# The format is a list of tuples containing the path and title.
412#epub_post_files = []
414# A list of files that should not be packed into the epub file.
415epub_exclude_files = ['search.html']
417# The depth of the table of contents in toc.ncx.
418#epub_tocdepth = 3
420# Allow duplicate toc entries.
421#epub_tocdup = True
423# Choose between 'default' and 'includehidden'.
424#epub_tocscope = 'default'
426# Fix unsupported image types using the Pillow.
427#epub_fix_images = False
429# Scale large images.
430#epub_max_image_width = 0
432# How to display URL addresses: 'footnote', 'no', or 'inline'.
433#epub_show_urls = 'inline'
435# If false, no index is generated.
436#epub_use_index = True