on 4162113 help sign in
Idris-dev/docs/conf.py
430 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.1'
63# The full version, including alpha/beta/rc tags.
64release = '1.1.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']
154# Add any extra paths that contain custom files (such as robots.txt or
155# .htaccess) here, relative to this directory. These files are copied
156# directly to the root of the documentation.
157#html_extra_path = []
159# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
160# using the given strftime format.
161#html_last_updated_fmt = '%b %d, %Y'
163# If true, SmartyPants will be used to convert quotes and dashes to
164# typographically correct entities.
165#html_use_smartypants = True
167# Custom sidebar templates, maps document names to template names.
168#html_sidebars = {}
170# Additional templates that should be rendered to pages, maps page names to
171# template names.
172#html_additional_pages = {}
174# If false, no module index is generated.
175#html_domain_indices = True
177# If false, no index is generated.
178#html_use_index = True
180# If true, the index is split into individual pages for each letter.
181#html_split_index = False
183# If true, links to the reST sources are added to the pages.
184#html_show_sourcelink = True
186# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
187#html_show_sphinx = True
189# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
190#html_show_copyright = True
192# If true, an OpenSearch description file will be output, and all pages will
193# contain a <link> tag referring to it. The value of this option must be the
194# base URL from which the finished HTML is served.
195#html_use_opensearch = ''
197# This is the file name suffix for HTML files (e.g. ".xhtml").
198#html_file_suffix = None
200# Language to be used for generating the HTML full-text search index.
201# Sphinx supports the following languages:
202# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
203# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
204#html_search_language = 'en'
206# A dictionary with options for the search language support, empty by default.
207# Now only 'ja' uses this config value
208#html_search_options = {'type': 'default'}
210# The name of a javascript file (relative to the configuration directory) that
211# implements a search results scorer. If empty, the default will be used.
212#html_search_scorer = 'scorer.js'
214# Output file base name for HTML help builder.
215htmlhelp_basename = 'IdrisManualdoc'
217# -- Options for LaTeX output ---------------------------------------------
219latex_title_page = r'''
220\begin{titlepage}
221 \vspace*{\fill}
222 \begin{center}
223 \includegraphics[width=0.25\textwidth]{idris-512x512.png}\par
224 \vspace{1cm}
225 {\huge\sffamily\bfseries \makeatletter\@title\makeatother\par}
226 \vspace{1cm}
227 {\Large Version \version\par}
228 \end{center}
229 \vspace*{\fill}
230\end{titlepage}
231'''
233latex_elements = {
234# The paper size ('letterpaper' or 'a4paper').
235'papersize': 'a4paper',
237'fontpkg': '',
238'inputenc': '',
239'utf8extra': '',
240'releasename': 'Version',
242# The font size ('10pt', '11pt' or '12pt').
243'pointsize': '10pt',
245# Additional stuff for the LaTeX preamble.
246'preamble': r'''
247\usepackage{lmodern}
248\usepackage[T1]{fontenc}
249\usepackage[utf8x]{inputenc}
250\usepackage{titlesec}
252\usepackage{fancyhdr}
253\fancypagestyle{plain}{%
254 \renewcommand{\headrulewidth}{0pt}%
255 \fancyhf{}%
256 \fancyfoot[C]{\textsf{\thepage}}
258\pagestyle{fancy}
259\fancyhf{}
260\fancyhead[LE,RO]{\textsf{\bfseries{v\version}}}
261\fancyhead[LO,RE]{\textsf{\bfseries\leftmark}}
262%\fancyhead[LO]{\textsf{\bfseries{\leftmark}}}
263%\fancyhead[RO]{\textsf{\bfseries{v\version}}}
264%\fancyhead[RE]{\textsf{\bfseries{\leftmark}}}
265%\fancyhead[LE]{\textsf{\bfseries{v\version}}}
266\fancyfoot[C]{\textsf{\thepage}}
267\renewcommand{\footrulewidth}{0pt}
268\renewcommand{\headrulewidth}{0pt}
270\usepackage[font={small,it}]{caption}
271\titleformat{\section}
272 {\normalfont\sffamily\Large\bfseries\color{black}}
273 {\thesection}{1em}{}
274\titleformat{\subsection}
275 {\sffamily\large\bfseries\color{black}}
276 {\thesubsection}{1em}{}
277\titleformat{\subsubsection}
278 {\sffamily\normalsize\bfseries\color{black}}
279 {\thesubsubsection}{1em}{}
280\titleformat{\paragraph}{\normalfont\normalsize\slshape}{\theparagraph}{1em}{}
281\setlength{\parskip}{1em}
283\hypersetup{colorlinks = false}
284\definecolor{VerbatimBorderColor}{rgb}{1,1,1}
285''',
287'maketitle': latex_title_page,
288'tableofcontents': "\\tableofcontents"
289# Latex figure (float) alignment
290#'figure_align': 'htbp',
293# Grouping the document tree into LaTeX files. List of tuples
294# (source start file, target name, title,
295# author, documentclass [howto, manual, or own class]).
296latex_documents = [
297 ('index', 'idris-documentation-complete.tex', u'Documentation for the Idris Language', u'The Idris Community', 'report'),
298 ('tutorial/index', 'idris-tutorial.tex', u'The Idris Tutorial', u'The Idris Community', 'howto'),
302latex_show_pagerefs = True
303latex_show_url = 'footnote'
305# The name of an image file (relative to this directory) to place at the top of
306# the title page.
307latex_logo = '../icons/idris-512x512.png'
309# For "manual" documents, if this is true, then toplevel headings are parts,
310# not chapters.
311#latex_use_parts = True
313# If true, show page references after internal links.
314#latex_show_pagerefs = False
316# If true, show URL addresses after external links.
317#latex_show_urls = False
319# Documents to append as an appendix to all manuals.
320#latex_appendices = []
322# If false, no module index is generated.
323#latex_domain_indices = True
326# -- Options for manual page output ---------------------------------------
328# One entry per manual page. List of tuples
329# (source start file, name, description, authors, manual section).
330man_pages = [
331 (master_doc, 'idrismanual', u'Idris Manual Documentation',
332 [author], 1)
335# If true, show URL addresses after external links.
336#man_show_urls = False
339# -- Options for Texinfo output -------------------------------------------
341# Grouping the document tree into Texinfo files. List of tuples
342# (source start file, target name, title, author,
343# dir menu entry, description, category)
344texinfo_documents = [
345 (master_doc, 'IdrisManual', u'Idris Manual Documentation',
346 author, 'IdrisManual', 'One line description of project.',
347 'Miscellaneous'),
350# Documents to append as an appendix to all manuals.
351#texinfo_appendices = []
353# If false, no module index is generated.
354#texinfo_domain_indices = True
356# How to display URL addresses: 'footnote', 'no', or 'inline'.
357#texinfo_show_urls = 'footnote'
359# If true, do not generate a @detailmenu in the "Top" node's menu.
360#texinfo_no_detailmenu = False
363# -- Options for Epub output ----------------------------------------------
365# Bibliographic Dublin Core info.
366epub_title = project
367epub_author = author
368epub_publisher = author
369epub_copyright = copyright
371# The basename for the epub file. It defaults to the project name.
372#epub_basename = project
374# The HTML theme for the epub output. Since the default themes are not optimized
375# for small screen space, using the same theme for HTML and epub output is
376# usually not wise. This defaults to 'epub', a theme designed to save visual
377# space.
378#epub_theme = 'epub'
380# The language of the text. It defaults to the language option
381# or 'en' if the language is not set.
382#epub_language = ''
384# The scheme of the identifier. Typical schemes are ISBN or URL.
385#epub_scheme = ''
387# The unique identifier of the text. This can be a ISBN number
388# or the project homepage.
389#epub_identifier = ''
391# A unique identification for the text.
392#epub_uid = ''
394# A tuple containing the cover image and cover page html template filenames.
395#epub_cover = ()
397# A sequence of (type, uri, title) tuples for the guide element of content.opf.
398#epub_guide = ()
400# HTML files that should be inserted before the pages created by sphinx.
401# The format is a list of tuples containing the path and title.
402#epub_pre_files = []
404# HTML files shat should be inserted after the pages created by sphinx.
405# The format is a list of tuples containing the path and title.
406#epub_post_files = []
408# A list of files that should not be packed into the epub file.
409epub_exclude_files = ['search.html']
411# The depth of the table of contents in toc.ncx.
412#epub_tocdepth = 3
414# Allow duplicate toc entries.
415#epub_tocdup = True
417# Choose between 'default' and 'includehidden'.
418#epub_tocscope = 'default'
420# Fix unsupported image types using the Pillow.
421#epub_fix_images = False
423# Scale large images.
424#epub_max_image_width = 0
426# How to display URL addresses: 'footnote', 'no', or 'inline'.
427#epub_show_urls = 'inline'
429# If false, no index is generated.
430#epub_use_index = True