2018-04-14 09:15:31 -05:00
|
|
|
|
.. highlight:: python
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2010-03-09 12:32:59 -06:00
|
|
|
|
.. _build-config:
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
=============
|
|
|
|
|
Configuration
|
|
|
|
|
=============
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
|
|
|
|
.. module:: conf
|
|
|
|
|
:synopsis: Build configuration file.
|
|
|
|
|
|
2008-05-02 05:32:08 -05:00
|
|
|
|
The :term:`configuration directory` must contain a file named :file:`conf.py`.
|
2017-10-19 02:23:41 -05:00
|
|
|
|
This file (containing Python code) is called the "build configuration file"
|
|
|
|
|
and contains (almost) all configuration needed to customize Sphinx input
|
|
|
|
|
and output behavior.
|
|
|
|
|
|
|
|
|
|
An optional file `docutils.conf`_ can be added to the configuration
|
2018-03-31 07:18:55 -05:00
|
|
|
|
directory to adjust `Docutils`_ configuration if not otherwise overridden or
|
2017-10-31 14:31:56 -05:00
|
|
|
|
set by Sphinx.
|
2017-10-19 02:23:41 -05:00
|
|
|
|
|
|
|
|
|
.. _`docutils`: http://docutils.sourceforge.net/
|
|
|
|
|
.. _`docutils.conf`: http://docutils.sourceforge.net/docs/user/config.html
|
|
|
|
|
|
2008-10-25 10:34:12 -05:00
|
|
|
|
The configuration file is executed as Python code at build time (using
|
2008-05-02 05:32:08 -05:00
|
|
|
|
:func:`execfile`, and with the current directory set to its containing
|
|
|
|
|
directory), and therefore can execute arbitrarily complex code. Sphinx then
|
|
|
|
|
reads simple names from the file's namespace as its configuration.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2008-05-02 05:32:08 -05:00
|
|
|
|
Important points to note:
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2008-05-02 05:32:08 -05:00
|
|
|
|
* If not otherwise documented, values must be strings, and their default is the
|
|
|
|
|
empty string.
|
2008-05-02 04:05:30 -05:00
|
|
|
|
|
2008-05-02 05:32:08 -05:00
|
|
|
|
* The term "fully-qualified name" refers to a string that names an importable
|
|
|
|
|
Python object inside a module; for example, the FQN
|
2008-11-29 13:04:11 -06:00
|
|
|
|
``"sphinx.builders.Builder"`` means the ``Builder`` class in the
|
|
|
|
|
``sphinx.builders`` module.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
* Remember that document names use ``/`` as the path separator and don't
|
|
|
|
|
contain the file name extension.
|
2008-05-02 05:32:08 -05:00
|
|
|
|
|
2008-06-17 02:46:33 -05:00
|
|
|
|
* Since :file:`conf.py` is read as a Python file, the usual rules apply for
|
|
|
|
|
encodings and Unicode support: declare the encoding using an encoding cookie
|
|
|
|
|
(a comment like ``# -*- coding: utf-8 -*-``) and use Unicode string literals
|
|
|
|
|
when you include non-ASCII characters in configuration values.
|
|
|
|
|
|
2008-05-02 05:32:08 -05:00
|
|
|
|
* The contents of the config namespace are pickled (so that Sphinx can find out
|
|
|
|
|
when configuration changes), so it may not contain unpickleable values --
|
|
|
|
|
delete them from the namespace with ``del`` if appropriate. Modules are
|
|
|
|
|
removed automatically, so you don't need to ``del`` your imports after use.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2016-10-26 16:49:49 -05:00
|
|
|
|
.. _conf-tags:
|
2014-01-12 15:40:50 -06:00
|
|
|
|
|
2009-02-19 14:56:34 -06:00
|
|
|
|
* There is a special object named ``tags`` available in the config file.
|
|
|
|
|
It can be used to query and change the tags (see :ref:`tags`). Use
|
|
|
|
|
``tags.has('tag')`` to query, ``tags.add('tag')`` and ``tags.remove('tag')``
|
2013-09-19 14:48:54 -05:00
|
|
|
|
to change. Only tags set via the ``-t`` command-line option or via
|
|
|
|
|
``tags.add('tag')`` can be queried using ``tags.has('tag')``.
|
2014-08-24 23:37:18 -05:00
|
|
|
|
Note that the current builder tag is not available in ``conf.py``, as it is
|
|
|
|
|
created *after* the builder is initialized.
|
2009-02-19 14:56:34 -06:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
|
|
|
|
General configuration
|
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
.. confval:: extensions
|
|
|
|
|
|
2017-11-03 15:58:21 -05:00
|
|
|
|
A list of strings that are module names of :doc:`extensions
|
|
|
|
|
<extensions/index>`. These can be extensions coming with Sphinx (named
|
|
|
|
|
``sphinx.ext.*``) or custom ones.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
|
|
|
|
Note that you can extend :data:`sys.path` within the conf file if your
|
2008-05-02 05:32:08 -05:00
|
|
|
|
extensions live in another directory -- but make sure you use absolute paths.
|
|
|
|
|
If your extension path is relative to the :term:`configuration directory`,
|
|
|
|
|
use :func:`os.path.abspath` like so::
|
2008-03-21 09:26:21 -05:00
|
|
|
|
|
|
|
|
|
import sys, os
|
|
|
|
|
|
|
|
|
|
sys.path.append(os.path.abspath('sphinxext'))
|
|
|
|
|
|
|
|
|
|
extensions = ['extname']
|
|
|
|
|
|
2008-05-02 05:32:08 -05:00
|
|
|
|
That way, you can load an extension called ``extname`` from the subdirectory
|
|
|
|
|
``sphinxext``.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The configuration file itself can be an extension; for that, you only need
|
|
|
|
|
to provide a :func:`setup` function in it.
|
2008-04-06 12:38:55 -05:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: source_suffix
|
|
|
|
|
|
2018-01-21 21:33:55 -06:00
|
|
|
|
The file extensions of source files. Sphinx considers the files with this
|
|
|
|
|
suffix as sources. This value can be a dictionary mapping file extensions
|
|
|
|
|
to file types. For example::
|
|
|
|
|
|
|
|
|
|
source_suffix = {
|
|
|
|
|
'.rst': 'restructuredtext',
|
|
|
|
|
'.txt': 'restructuredtext',
|
|
|
|
|
'.md': 'markdown',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
By default, Sphinx only supports ``'restrcturedtext'`` file type. You can
|
|
|
|
|
add a new file type using source parser extensions. Please read a document
|
|
|
|
|
of the extension to know what file type the extension supports.
|
|
|
|
|
|
|
|
|
|
This also allows a list of file extensions. In that case, Sphinx conciders
|
|
|
|
|
that all they are ``'restructuredtext'``. Default is
|
|
|
|
|
``{'.rst': 'restructuredtext'}``.
|
|
|
|
|
|
|
|
|
|
.. note:: file extensions have to start with dot (like ``.rst``).
|
2015-02-08 12:18:38 -06:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.3
|
|
|
|
|
Can now be a list of extensions.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2018-01-25 10:29:52 -06:00
|
|
|
|
.. versionchanged:: 1.8
|
2018-01-21 21:33:55 -06:00
|
|
|
|
Support file type mapping
|
|
|
|
|
|
2008-10-16 14:21:06 -05:00
|
|
|
|
.. confval:: source_encoding
|
|
|
|
|
|
|
|
|
|
The encoding of all reST source files. The recommended encoding, and the
|
2009-05-31 11:58:28 -05:00
|
|
|
|
default value, is ``'utf-8-sig'``.
|
2008-10-16 14:21:06 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
Previously, Sphinx accepted only UTF-8 encoded sources.
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2015-03-08 07:11:28 -05:00
|
|
|
|
.. confval:: source_parsers
|
|
|
|
|
|
|
|
|
|
If given, a dictionary of parser classes for different source suffices. The
|
|
|
|
|
keys are the suffix, the values can be either a class or a string giving a
|
2016-01-02 01:38:17 -06:00
|
|
|
|
fully-qualified name of a parser class. The parser class can be either
|
|
|
|
|
``docutils.parsers.Parser`` or :class:`sphinx.parsers.Parser`. Files with a
|
|
|
|
|
suffix that is not in the dictionary will be parsed with the default
|
|
|
|
|
reStructuredText parser.
|
|
|
|
|
|
2015-03-08 07:11:28 -05:00
|
|
|
|
For example::
|
|
|
|
|
|
2017-01-29 03:58:22 -06:00
|
|
|
|
source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
2017-11-03 15:13:16 -05:00
|
|
|
|
Refer to :doc:`/usage/markdown` for more information on using Markdown
|
|
|
|
|
with Sphinx.
|
2015-03-08 07:11:28 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2017-10-29 23:46:12 -05:00
|
|
|
|
.. deprecated:: 1.8
|
2018-06-25 01:23:15 -05:00
|
|
|
|
Now Sphinx provides an API :meth:`.Sphinx.add_source_parser` to register
|
2017-10-29 23:46:12 -05:00
|
|
|
|
a source parser. Please use it instead.
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: master_doc
|
|
|
|
|
|
|
|
|
|
The document name of the "master" document, that is, the document that
|
2018-09-03 07:38:31 -05:00
|
|
|
|
contains the root :rst:dir:`toctree` directive. Default is ``'index'``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 2.0
|
|
|
|
|
The defualt is changed to ``'index'`` from ``'contents'``.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2010-01-06 08:48:39 -06:00
|
|
|
|
.. confval:: exclude_patterns
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A list of glob-style patterns that should be excluded when looking for
|
|
|
|
|
source files. [1]_ They are matched against the source file names relative
|
|
|
|
|
to the source directory, using slashes as directory separators on all
|
|
|
|
|
platforms.
|
2010-01-06 08:48:39 -06:00
|
|
|
|
|
|
|
|
|
Example patterns:
|
|
|
|
|
|
|
|
|
|
- ``'library/xml.rst'`` -- ignores the ``library/xml.rst`` file (replaces
|
2010-10-20 04:55:11 -05:00
|
|
|
|
entry in :confval:`unused_docs`)
|
2017-12-19 07:28:54 -06:00
|
|
|
|
- ``'library/xml'`` -- ignores the ``library/xml`` directory
|
2010-01-06 08:48:39 -06:00
|
|
|
|
- ``'library/xml*'`` -- ignores all files and directories starting with
|
|
|
|
|
``library/xml``
|
2017-12-19 07:28:54 -06:00
|
|
|
|
- ``'**/.svn'`` -- ignores all ``.svn`` directories
|
2010-01-06 08:48:39 -06:00
|
|
|
|
|
|
|
|
|
:confval:`exclude_patterns` is also consulted when looking for static files
|
2016-01-15 05:44:03 -06:00
|
|
|
|
in :confval:`html_static_path` and :confval:`html_extra_path`.
|
2010-01-06 08:48:39 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2008-08-10 12:10:31 -05:00
|
|
|
|
.. confval:: templates_path
|
|
|
|
|
|
|
|
|
|
A list of paths that contain extra templates (or templates that overwrite
|
2009-02-15 04:03:16 -06:00
|
|
|
|
builtin/theme-specific templates). Relative paths are taken as relative to
|
|
|
|
|
the configuration directory.
|
2008-08-10 12:10:31 -05:00
|
|
|
|
|
2014-08-22 19:04:21 -05:00
|
|
|
|
.. versionchanged:: 1.3
|
|
|
|
|
As these files are not meant to be built, they are automatically added to
|
|
|
|
|
:confval:`exclude_patterns`.
|
|
|
|
|
|
2008-08-10 12:10:31 -05:00
|
|
|
|
.. confval:: template_bridge
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A string with the fully-qualified name of a callable (or simply a class)
|
|
|
|
|
that returns an instance of :class:`~sphinx.application.TemplateBridge`.
|
|
|
|
|
This instance is then used to render HTML documents, and possibly the output
|
|
|
|
|
of other builders (currently the changes builder). (Note that the template
|
2009-02-15 04:03:16 -06:00
|
|
|
|
bridge must be made theme-aware if HTML themes are to be used.)
|
2008-08-10 12:10:31 -05:00
|
|
|
|
|
2009-02-07 12:41:10 -06:00
|
|
|
|
.. confval:: rst_epilog
|
|
|
|
|
|
|
|
|
|
.. index:: pair: global; substitutions
|
|
|
|
|
|
|
|
|
|
A string of reStructuredText that will be included at the end of every source
|
2018-04-14 03:51:06 -05:00
|
|
|
|
file that is read. This is a possible place to add substitutions that should
|
|
|
|
|
be available in every file (another being :confval:`rst_prolog`). An
|
|
|
|
|
example::
|
2009-02-07 12:41:10 -06:00
|
|
|
|
|
2009-02-14 08:11:25 -06:00
|
|
|
|
rst_epilog = """
|
2009-02-07 12:41:10 -06:00
|
|
|
|
.. |psf| replace:: Python Software Foundation
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
2009-02-19 16:31:34 -06:00
|
|
|
|
|
2010-04-07 06:03:34 -05:00
|
|
|
|
.. confval:: rst_prolog
|
|
|
|
|
|
2018-04-14 03:51:06 -05:00
|
|
|
|
.. index:: pair: global; substitutions
|
|
|
|
|
|
2010-04-07 06:03:34 -05:00
|
|
|
|
A string of reStructuredText that will be included at the beginning of every
|
2018-04-14 03:51:06 -05:00
|
|
|
|
source file that is read. This is a possible place to add substitutions that
|
|
|
|
|
should be available in every file (another being :confval:`rst_epilog`). An
|
|
|
|
|
example::
|
|
|
|
|
|
|
|
|
|
rst_prolog = """
|
|
|
|
|
.. |psf| replace:: Python Software Foundation
|
|
|
|
|
"""
|
2010-04-07 06:03:34 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2010-05-23 09:48:54 -05:00
|
|
|
|
.. confval:: primary_domain
|
2010-03-01 07:22:14 -06:00
|
|
|
|
|
|
|
|
|
.. index:: default; domain
|
2010-05-23 09:48:54 -05:00
|
|
|
|
primary; domain
|
2010-03-01 07:22:14 -06:00
|
|
|
|
|
2017-11-03 15:20:36 -05:00
|
|
|
|
The name of the default :doc:`domain </usage/restructuredtext/domains>`.
|
|
|
|
|
Can also be ``None`` to disable a default domain. The default is ``'py'``.
|
|
|
|
|
Those objects in other domains (whether the domain name is given explicitly,
|
|
|
|
|
or selected by a :rst:dir:`default-domain` directive) will have the domain
|
|
|
|
|
name explicitly prepended when named (e.g., when the default domain is C,
|
|
|
|
|
Python functions will be named "Python function", not just "function").
|
2010-03-01 07:22:14 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2008-08-10 12:10:31 -05:00
|
|
|
|
.. confval:: default_role
|
|
|
|
|
|
2009-02-07 12:41:10 -06:00
|
|
|
|
.. index:: default; role
|
|
|
|
|
|
2008-08-10 12:10:31 -05:00
|
|
|
|
The name of a reST role (builtin or Sphinx extension) to use as the default
|
|
|
|
|
role, that is, for text marked up ```like this```. This can be set to
|
2010-02-28 07:45:43 -06:00
|
|
|
|
``'py:obj'`` to make ```filter``` a cross-reference to the Python function
|
|
|
|
|
"filter". The default is ``None``, which doesn't reassign the default role.
|
2008-08-10 12:10:31 -05:00
|
|
|
|
|
|
|
|
|
The default role can always be set within individual documents using the
|
2010-04-17 03:39:51 -05:00
|
|
|
|
standard reST :rst:dir:`default-role` directive.
|
2008-08-10 12:10:31 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4
|
|
|
|
|
|
|
|
|
|
.. confval:: keep_warnings
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
If true, keep warnings as "system message" paragraphs in the built
|
|
|
|
|
documents. Regardless of this setting, warnings are always written to the
|
|
|
|
|
standard error stream when ``sphinx-build`` is run.
|
2008-08-10 12:10:31 -05:00
|
|
|
|
|
|
|
|
|
The default is ``False``, the pre-0.5 behavior was to always keep them.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
|
2016-02-20 09:12:31 -06:00
|
|
|
|
.. confval:: suppress_warnings
|
|
|
|
|
|
|
|
|
|
A list of warning types to suppress arbitrary warning messages.
|
|
|
|
|
|
|
|
|
|
Sphinx supports following warning types:
|
|
|
|
|
|
2016-04-14 21:44:12 -05:00
|
|
|
|
* app.add_node
|
|
|
|
|
* app.add_directive
|
|
|
|
|
* app.add_role
|
|
|
|
|
* app.add_generic_role
|
2016-04-23 21:41:22 -05:00
|
|
|
|
* app.add_source_parser
|
2017-02-08 21:55:07 -06:00
|
|
|
|
* download.not_readable
|
|
|
|
|
* image.not_readable
|
2016-02-20 09:12:31 -06:00
|
|
|
|
* ref.term
|
|
|
|
|
* ref.ref
|
|
|
|
|
* ref.numref
|
|
|
|
|
* ref.keyword
|
2016-02-20 09:46:50 -06:00
|
|
|
|
* ref.option
|
2016-02-20 09:12:31 -06:00
|
|
|
|
* ref.citation
|
2017-03-18 02:19:21 -05:00
|
|
|
|
* ref.footnote
|
2016-02-20 09:12:31 -06:00
|
|
|
|
* ref.doc
|
2017-06-16 20:47:35 -05:00
|
|
|
|
* ref.python
|
2016-12-03 00:25:15 -06:00
|
|
|
|
* misc.highlighting_failure
|
2017-01-02 10:08:27 -06:00
|
|
|
|
* toc.secnum
|
2016-12-10 09:42:57 -06:00
|
|
|
|
* epub.unknown_project_files
|
2016-02-20 09:12:31 -06:00
|
|
|
|
|
|
|
|
|
You can choose from these types.
|
|
|
|
|
|
|
|
|
|
Now, this option should be considered *experimental*.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
2016-12-03 00:25:15 -06:00
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
|
|
|
|
|
Added ``misc.highlighting_failure``
|
|
|
|
|
|
2016-12-10 09:42:57 -06:00
|
|
|
|
.. versionchanged:: 1.5.1
|
|
|
|
|
|
|
|
|
|
Added ``epub.unknown_project_files``
|
|
|
|
|
|
2017-03-18 02:19:21 -05:00
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
|
|
|
|
|
Added ``ref.footnote``
|
|
|
|
|
|
2010-02-28 05:13:55 -06:00
|
|
|
|
.. confval:: needs_sphinx
|
2009-06-16 14:53:53 -05:00
|
|
|
|
|
2010-02-28 05:13:55 -06:00
|
|
|
|
If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will
|
2018-03-31 07:18:55 -05:00
|
|
|
|
compare it with its version and refuse to build if it is too old. Default
|
|
|
|
|
is no requirement.
|
2009-06-16 14:53:53 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2016-01-20 22:51:17 -06:00
|
|
|
|
.. versionchanged:: 1.4
|
|
|
|
|
also accepts micro version string
|
|
|
|
|
|
2014-09-04 01:57:36 -05:00
|
|
|
|
.. confval:: needs_extensions
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
This value can be a dictionary specifying version requirements for
|
|
|
|
|
extensions in :confval:`extensions`, e.g. ``needs_extensions =
|
2014-09-04 01:57:36 -05:00
|
|
|
|
{'sphinxcontrib.something': '1.5'}``. The version strings should be in the
|
|
|
|
|
form ``major.minor``. Requirements do not have to be specified for all
|
|
|
|
|
extensions, only for those you want to check.
|
|
|
|
|
|
|
|
|
|
This requires that the extension specifies its version to Sphinx (see
|
|
|
|
|
:ref:`dev-extensions` for how to do that).
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2018-01-11 12:20:26 -06:00
|
|
|
|
.. confval:: manpages_url
|
|
|
|
|
|
|
|
|
|
A URL to cross-reference :rst:role:`manpage` directives. If this is
|
|
|
|
|
defined to ``https://manpages.debian.org/{path}``, the
|
2018-05-12 23:15:11 -05:00
|
|
|
|
:literal:`:manpage:`man(1)`` role will link to
|
2018-01-11 12:20:26 -06:00
|
|
|
|
<https://manpages.debian.org/man(1)>. The patterns available are:
|
|
|
|
|
|
|
|
|
|
* ``page`` - the manual page (``man``)
|
|
|
|
|
* ``section`` - the manual section (``1``)
|
|
|
|
|
* ``path`` - the original manual page and section specified (``man(1)``)
|
|
|
|
|
|
|
|
|
|
This also supports manpages specified as ``man.1``.
|
|
|
|
|
|
|
|
|
|
.. note:: This currently affects only HTML writers but could be
|
|
|
|
|
expanded in the future.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.7
|
|
|
|
|
|
2010-02-28 05:13:55 -06:00
|
|
|
|
.. confval:: nitpicky
|
2010-01-17 11:24:35 -06:00
|
|
|
|
|
2010-02-28 05:13:55 -06:00
|
|
|
|
If true, Sphinx will warn about *all* references where the target cannot be
|
|
|
|
|
found. Default is ``False``. You can activate this mode temporarily using
|
2016-01-11 22:36:12 -06:00
|
|
|
|
the :option:`-n <sphinx-build -n>` command-line switch.
|
2010-01-17 11:24:35 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2011-01-08 11:36:52 -06:00
|
|
|
|
.. confval:: nitpick_ignore
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A list of ``(type, target)`` tuples (by default empty) that should be
|
|
|
|
|
ignored when generating warnings in "nitpicky mode". Note that ``type``
|
|
|
|
|
should include the domain name if present. Example entries would be
|
|
|
|
|
``('py:func', 'int')`` or ``('envvar', 'LD_LIBRARY_PATH')``.
|
2011-01-08 11:36:52 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2014-10-07 21:03:14 -05:00
|
|
|
|
.. confval:: numfig
|
|
|
|
|
|
|
|
|
|
If true, figures, tables and code-blocks are automatically numbered if they
|
2017-12-16 04:05:33 -06:00
|
|
|
|
have a caption. The :rst:role:`numref` role is enabled.
|
|
|
|
|
Obeyed so far only by HTML and LaTeX builders. Default is ``False``.
|
2016-05-27 09:40:01 -05:00
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The LaTeX builder always assigns numbers whether this option is enabled
|
|
|
|
|
or not.
|
2014-10-08 11:41:51 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
2014-10-07 21:03:14 -05:00
|
|
|
|
|
2014-10-09 10:19:17 -05:00
|
|
|
|
.. confval:: numfig_format
|
2014-10-07 21:03:14 -05:00
|
|
|
|
|
2016-06-20 22:39:37 -05:00
|
|
|
|
A dictionary mapping ``'figure'``, ``'table'``, ``'code-block'`` and
|
2016-09-17 00:58:43 -05:00
|
|
|
|
``'section'`` to strings that are used for format of figure numbers.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
As a special character, ``%s`` will be replaced to figure number.
|
2016-09-17 00:58:43 -05:00
|
|
|
|
|
|
|
|
|
Default is to use ``'Fig. %s'`` for ``'figure'``, ``'Table %s'`` for
|
|
|
|
|
``'table'``, ``'Listing %s'`` for ``'code-block'`` and ``'Section'`` for
|
|
|
|
|
``'section'``.
|
2014-10-07 21:03:14 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
|
|
|
|
.. confval:: numfig_secnum_depth
|
|
|
|
|
|
2017-12-17 10:56:03 -06:00
|
|
|
|
- if set to ``0``, figures, tables and code-blocks are continuously numbered
|
|
|
|
|
starting at ``1``.
|
|
|
|
|
- if ``1`` (default) numbers will be ``x.1``, ``x.2``, ... with ``x``
|
|
|
|
|
the section number (top level sectioning; no ``x.`` if no section).
|
2017-12-16 17:23:54 -06:00
|
|
|
|
This naturally applies only if section numbering has been activated via
|
2017-12-17 10:56:03 -06:00
|
|
|
|
the ``:numbered:`` option of the :rst:dir:`toctree` directive.
|
|
|
|
|
- ``2`` means that numbers will be ``x.y.1``, ``x.y.2``, ... if located in
|
|
|
|
|
a sub-section (but still ``x.1``, ``x.2``, ... if located directly under a
|
|
|
|
|
section and ``1``, ``2``, ... if not in any top level section.)
|
|
|
|
|
- etc...
|
2014-10-07 21:03:14 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2017-12-16 17:23:54 -06:00
|
|
|
|
.. versionchanged:: 1.7
|
|
|
|
|
The LaTeX builder obeys this setting (if :confval:`numfig` is set to
|
|
|
|
|
``True``).
|
|
|
|
|
|
2018-01-05 08:06:10 -06:00
|
|
|
|
.. confval:: smartquotes
|
|
|
|
|
|
|
|
|
|
If true, the `Docutils Smart Quotes transform`__, originally based on
|
|
|
|
|
`SmartyPants`__ (limited to English) and currently applying to many
|
|
|
|
|
languages, will be used to convert quotes and dashes to typographically
|
|
|
|
|
correct entities. Default: ``True``.
|
|
|
|
|
|
|
|
|
|
__ http://docutils.sourceforge.net/docs/user/smartquotes.html
|
|
|
|
|
__ https://daringfireball.net/projects/smartypants/
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6.6
|
|
|
|
|
It replaces deprecated :confval:`html_use_smartypants`.
|
|
|
|
|
It applies by default to all builders except ``man`` and ``text``
|
|
|
|
|
(see :confval:`smartquotes_excludes`.)
|
|
|
|
|
|
|
|
|
|
A `docutils.conf`__ file located in the configuration directory (or a
|
|
|
|
|
global :file:`~/.docutils` file) is obeyed unconditionally if it
|
|
|
|
|
*deactivates* smart quotes via the corresponding `Docutils option`__. But
|
|
|
|
|
if it *activates* them, then :confval:`smartquotes` does prevail.
|
|
|
|
|
|
|
|
|
|
__ http://docutils.sourceforge.net/docs/user/config.html
|
|
|
|
|
__ http://docutils.sourceforge.net/docs/user/config.html#smart-quotes
|
|
|
|
|
|
|
|
|
|
.. confval:: smartquotes_action
|
|
|
|
|
|
|
|
|
|
This string, for use with Docutils ``0.14`` or later, customizes the Smart
|
|
|
|
|
Quotes transform. See the file :file:`smartquotes.py` at the `Docutils
|
|
|
|
|
repository`__ for details. The default ``'qDe'`` educates normal **q**\
|
|
|
|
|
uote characters ``"``, ``'``, em- and en-**D**\ ashes ``---``, ``--``, and
|
|
|
|
|
**e**\ llipses ``...``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6.6
|
|
|
|
|
|
|
|
|
|
__ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/
|
|
|
|
|
|
|
|
|
|
.. confval:: smartquotes_excludes
|
|
|
|
|
|
|
|
|
|
This is a ``dict`` whose default is::
|
|
|
|
|
|
|
|
|
|
{'languages': ['ja'], 'builders': ['man', 'text']}
|
|
|
|
|
|
|
|
|
|
Each entry gives a sufficient condition to ignore the
|
|
|
|
|
:confval:`smartquotes` setting and deactivate the Smart Quotes transform.
|
|
|
|
|
Accepted keys are as above ``'builders'`` or ``'languages'``.
|
|
|
|
|
The values are lists.
|
|
|
|
|
|
|
|
|
|
.. note:: Currently, in case of invocation of :program:`make` with multiple
|
|
|
|
|
targets, the first target name is the only one which is tested against
|
|
|
|
|
the ``'builders'`` entry and it decides for all. Also, a ``make text``
|
|
|
|
|
following ``make html`` needs to be issued in the form ``make text
|
|
|
|
|
O="-E"`` to force re-parsing of source files, as the cached ones are
|
|
|
|
|
already transformed. On the other hand the issue does not arise with
|
|
|
|
|
direct usage of :program:`sphinx-build` as it caches
|
|
|
|
|
(in its default usage) the parsed source files in per builder locations.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6.6
|
|
|
|
|
|
2016-11-16 08:23:18 -06:00
|
|
|
|
.. confval:: tls_verify
|
|
|
|
|
|
|
|
|
|
If true, Sphinx verifies server certifications. Default is ``True``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
.. confval:: tls_cacerts
|
|
|
|
|
|
|
|
|
|
A path to a certification file of CA or a path to directory which
|
|
|
|
|
contains the certificates. This also allows a dictionary mapping
|
|
|
|
|
hostname to the path to certificate file.
|
|
|
|
|
The certificates are used to verify server certifications.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-08-10 12:10:31 -05:00
|
|
|
|
Project information
|
|
|
|
|
-------------------
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: project
|
|
|
|
|
|
|
|
|
|
The documented project's name.
|
|
|
|
|
|
2018-01-29 08:29:26 -06:00
|
|
|
|
.. confval:: author
|
|
|
|
|
|
|
|
|
|
The author name(s) of the document. The default value is ``'unknown'``.
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: copyright
|
|
|
|
|
|
|
|
|
|
A copyright statement in the style ``'2008, Author Name'``.
|
|
|
|
|
|
|
|
|
|
.. confval:: version
|
|
|
|
|
|
|
|
|
|
The major project version, used as the replacement for ``|version|``. For
|
|
|
|
|
example, for the Python documentation, this may be something like ``2.6``.
|
|
|
|
|
|
|
|
|
|
.. confval:: release
|
|
|
|
|
|
|
|
|
|
The full project version, used as the replacement for ``|release|`` and
|
|
|
|
|
e.g. in the HTML templates. For example, for the Python documentation, this
|
|
|
|
|
may be something like ``2.6.0rc1``.
|
|
|
|
|
|
|
|
|
|
If you don't need the separation provided between :confval:`version` and
|
|
|
|
|
:confval:`release`, just set them both to the same value.
|
|
|
|
|
|
|
|
|
|
.. confval:: today
|
|
|
|
|
today_fmt
|
|
|
|
|
|
|
|
|
|
These values determine how to format the current date, used as the
|
|
|
|
|
replacement for ``|today|``.
|
|
|
|
|
|
|
|
|
|
* If you set :confval:`today` to a non-empty value, it is used.
|
2016-04-01 20:23:13 -05:00
|
|
|
|
* Otherwise, the current time is formatted using :func:`time.strftime` and
|
|
|
|
|
the format given in :confval:`today_fmt`.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The default is now :confval:`today` and a :confval:`today_fmt` of ``'%B %d,
|
2016-04-01 20:23:13 -05:00
|
|
|
|
%Y'`` (or, if translation is enabled with :confval:`language`, an equivalent
|
|
|
|
|
format for the selected locale).
|
2016-02-14 05:07:28 -06:00
|
|
|
|
|
2008-09-09 14:10:09 -05:00
|
|
|
|
.. confval:: highlight_language
|
|
|
|
|
|
|
|
|
|
The default language to highlight source code in. The default is
|
2016-02-14 02:21:35 -06:00
|
|
|
|
``'python3'``. The value should be a valid Pygments lexer name, see
|
2008-09-09 14:10:09 -05:00
|
|
|
|
:ref:`code-examples` for more details.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2016-02-14 02:21:35 -06:00
|
|
|
|
.. versionchanged:: 1.4
|
2016-02-18 18:36:43 -06:00
|
|
|
|
The default is now ``'default'``. It is similar to ``'python3'``;
|
2018-03-31 07:18:55 -05:00
|
|
|
|
it is mostly a superset of ``'python'`` but it fallbacks to
|
2016-02-18 18:36:43 -06:00
|
|
|
|
``'none'`` without warning if failed. ``'python3'`` and other
|
|
|
|
|
languages will emit warning if failed. If you prefer Python 2
|
|
|
|
|
only highlighting, you can set it back to ``'python'``.
|
2016-02-14 02:21:35 -06:00
|
|
|
|
|
2015-01-05 11:49:06 -06:00
|
|
|
|
.. confval:: highlight_options
|
|
|
|
|
|
2015-01-05 22:22:19 -06:00
|
|
|
|
A dictionary of options that modify how the lexer specified by
|
|
|
|
|
:confval:`highlight_language` generates highlighted source code. These are
|
|
|
|
|
lexer-specific; for the options understood by each, see the
|
|
|
|
|
`Pygments documentation <http://pygments.org/docs/lexers/>`_.
|
2015-01-05 11:49:06 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: pygments_style
|
|
|
|
|
|
2015-01-06 09:51:54 -06:00
|
|
|
|
The style name to use for Pygments highlighting of source code. If not set,
|
2018-03-31 07:18:55 -05:00
|
|
|
|
either the theme's default style or ``'sphinx'`` is selected for HTML
|
|
|
|
|
output.
|
2008-05-02 04:05:30 -05:00
|
|
|
|
|
2008-05-04 12:57:11 -05:00
|
|
|
|
.. versionchanged:: 0.3
|
2008-05-02 04:05:30 -05:00
|
|
|
|
If the value is a fully-qualified name of a custom Pygments style class,
|
|
|
|
|
this is then used as custom style.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2008-05-02 04:15:59 -05:00
|
|
|
|
.. confval:: add_function_parentheses
|
|
|
|
|
|
|
|
|
|
A boolean that decides whether parentheses are appended to function and
|
|
|
|
|
method role text (e.g. the content of ``:func:`input```) to signify that the
|
|
|
|
|
name is callable. Default is ``True``.
|
|
|
|
|
|
|
|
|
|
.. confval:: add_module_names
|
|
|
|
|
|
|
|
|
|
A boolean that decides whether module names are prepended to all
|
2009-10-27 13:58:40 -05:00
|
|
|
|
:term:`object` names (for object types where a "module" of some kind is
|
2010-08-05 06:39:23 -05:00
|
|
|
|
defined), e.g. for :rst:dir:`py:function` directives. Default is ``True``.
|
2008-05-02 04:15:59 -05:00
|
|
|
|
|
|
|
|
|
.. confval:: show_authors
|
|
|
|
|
|
2010-08-05 06:39:23 -05:00
|
|
|
|
A boolean that decides whether :rst:dir:`codeauthor` and
|
|
|
|
|
:rst:dir:`sectionauthor` directives produce any output in the built files.
|
2008-05-02 04:15:59 -05:00
|
|
|
|
|
2010-02-28 05:13:55 -06:00
|
|
|
|
.. confval:: modindex_common_prefix
|
|
|
|
|
|
|
|
|
|
A list of prefixes that are ignored for sorting the Python module index
|
|
|
|
|
(e.g., if this is set to ``['foo.']``, then ``foo.bar`` is shown under ``B``,
|
|
|
|
|
not ``F``). This can be handy if you document a project that consists of a
|
|
|
|
|
single package. Works only for the HTML builder currently. Default is
|
|
|
|
|
``[]``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
2009-01-26 16:38:02 -06:00
|
|
|
|
.. confval:: trim_footnote_reference_space
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
Trim spaces before footnote references that are necessary for the reST
|
|
|
|
|
parser to recognize the footnote, but do not look too nice in the output.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2009-01-26 16:38:02 -06:00
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
2010-02-28 05:13:55 -06:00
|
|
|
|
.. confval:: trim_doctest_flags
|
|
|
|
|
|
|
|
|
|
If true, doctest flags (comments looking like ``# doctest: FLAG, ...``) at
|
2011-01-09 14:43:22 -06:00
|
|
|
|
the ends of lines and ``<BLANKLINE>`` markers are removed for all code
|
|
|
|
|
blocks showing interactive Python sessions (i.e. doctests). Default is
|
2014-06-18 11:34:28 -05:00
|
|
|
|
``True``. See the extension :mod:`~sphinx.ext.doctest` for more
|
|
|
|
|
possibilities of including doctests.
|
2010-02-28 05:13:55 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
2011-01-09 14:43:22 -06:00
|
|
|
|
.. versionchanged:: 1.1
|
|
|
|
|
Now also removes ``<BLANKLINE>``.
|
2010-02-28 05:13:55 -06:00
|
|
|
|
|
2009-02-19 16:31:34 -06:00
|
|
|
|
|
2010-08-26 18:02:49 -05:00
|
|
|
|
.. _intl-options:
|
|
|
|
|
|
|
|
|
|
Options for internationalization
|
|
|
|
|
--------------------------------
|
|
|
|
|
|
2014-06-19 11:14:47 -05:00
|
|
|
|
These options influence Sphinx's *Native Language Support*. See the
|
2010-08-26 18:02:49 -05:00
|
|
|
|
documentation on :ref:`intl` for details.
|
|
|
|
|
|
|
|
|
|
.. confval:: language
|
|
|
|
|
|
|
|
|
|
The code for the language the docs are written in. Any text automatically
|
|
|
|
|
generated by Sphinx will be in that language. Also, Sphinx will try to
|
|
|
|
|
substitute individual paragraphs from your documents with the translation
|
2016-01-26 10:36:43 -06:00
|
|
|
|
sets obtained from :confval:`locale_dirs`. Sphinx will search
|
|
|
|
|
language-specific figures named by `figure_language_filename` and substitute
|
|
|
|
|
them for original figures. In the LaTeX builder, a suitable language will
|
|
|
|
|
be selected as an option for the *Babel* package. Default is ``None``,
|
|
|
|
|
which means that no translation will be done.
|
2010-08-26 18:02:49 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
|
2016-01-26 10:36:43 -06:00
|
|
|
|
.. versionchanged:: 1.4
|
|
|
|
|
|
|
|
|
|
Support figure substitution
|
|
|
|
|
|
2010-08-26 18:02:49 -05:00
|
|
|
|
Currently supported languages by Sphinx are:
|
|
|
|
|
|
|
|
|
|
* ``bn`` -- Bengali
|
|
|
|
|
* ``ca`` -- Catalan
|
|
|
|
|
* ``cs`` -- Czech
|
|
|
|
|
* ``da`` -- Danish
|
|
|
|
|
* ``de`` -- German
|
|
|
|
|
* ``en`` -- English
|
|
|
|
|
* ``es`` -- Spanish
|
2011-09-21 02:28:49 -05:00
|
|
|
|
* ``et`` -- Estonian
|
2013-02-07 11:50:09 -06:00
|
|
|
|
* ``eu`` -- Basque
|
2010-10-22 06:24:17 -05:00
|
|
|
|
* ``fa`` -- Iranian
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``fi`` -- Finnish
|
|
|
|
|
* ``fr`` -- French
|
2014-08-11 07:57:06 -05:00
|
|
|
|
* ``he`` -- Hebrew
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``hr`` -- Croatian
|
2012-01-29 03:03:09 -06:00
|
|
|
|
* ``hu`` -- Hungarian
|
2013-09-16 02:02:06 -05:00
|
|
|
|
* ``id`` -- Indonesian
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``it`` -- Italian
|
2011-01-15 08:47:36 -06:00
|
|
|
|
* ``ja`` -- Japanese
|
2011-09-21 02:25:37 -05:00
|
|
|
|
* ``ko`` -- Korean
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``lt`` -- Lithuanian
|
2011-05-15 04:27:01 -05:00
|
|
|
|
* ``lv`` -- Latvian
|
2013-09-16 02:02:06 -05:00
|
|
|
|
* ``mk`` -- Macedonian
|
2012-10-28 12:19:54 -05:00
|
|
|
|
* ``nb_NO`` -- Norwegian Bokmal
|
2011-06-07 10:17:54 -05:00
|
|
|
|
* ``ne`` -- Nepali
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``nl`` -- Dutch
|
|
|
|
|
* ``pl`` -- Polish
|
|
|
|
|
* ``pt_BR`` -- Brazilian Portuguese
|
2014-08-11 07:57:06 -05:00
|
|
|
|
* ``pt_PT`` -- European Portuguese
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``ru`` -- Russian
|
2013-09-16 02:02:06 -05:00
|
|
|
|
* ``si`` -- Sinhala
|
2012-01-29 03:04:29 -06:00
|
|
|
|
* ``sk`` -- Slovak
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``sl`` -- Slovenian
|
|
|
|
|
* ``sv`` -- Swedish
|
|
|
|
|
* ``tr`` -- Turkish
|
|
|
|
|
* ``uk_UA`` -- Ukrainian
|
2014-08-11 07:57:06 -05:00
|
|
|
|
* ``vi`` -- Vietnamese
|
2010-08-26 18:02:49 -05:00
|
|
|
|
* ``zh_CN`` -- Simplified Chinese
|
|
|
|
|
* ``zh_TW`` -- Traditional Chinese
|
|
|
|
|
|
|
|
|
|
.. confval:: locale_dirs
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
|
|
|
|
|
Directories in which to search for additional message catalogs (see
|
|
|
|
|
:confval:`language`), relative to the source directory. The directories on
|
|
|
|
|
this path are searched by the standard :mod:`gettext` module.
|
2010-09-03 10:10:22 -05:00
|
|
|
|
|
2010-08-26 18:02:49 -05:00
|
|
|
|
Internal messages are fetched from a text domain of ``sphinx``; so if you
|
2016-01-01 13:54:30 -06:00
|
|
|
|
add the directory :file:`./locale` to this setting, the message catalogs
|
2010-08-26 18:02:49 -05:00
|
|
|
|
(compiled from ``.po`` format using :program:`msgfmt`) must be in
|
|
|
|
|
:file:`./locale/{language}/LC_MESSAGES/sphinx.mo`. The text domain of
|
2011-10-03 06:20:53 -05:00
|
|
|
|
individual documents depends on :confval:`gettext_compact`.
|
2010-08-26 18:02:49 -05:00
|
|
|
|
|
2016-04-24 20:39:25 -05:00
|
|
|
|
The default is ``['locales']``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Use ``locales`` directory as a default value
|
2010-08-26 18:02:49 -05:00
|
|
|
|
|
2011-10-03 06:20:53 -05:00
|
|
|
|
.. confval:: gettext_compact
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
|
|
|
|
If true, a document's text domain is its docname if it is a top-level
|
|
|
|
|
project file and its very base directory otherwise.
|
|
|
|
|
|
|
|
|
|
By default, the document ``markup/code.rst`` ends up in the ``markup`` text
|
|
|
|
|
domain. With this option set to ``False``, it is ``markup/code``.
|
|
|
|
|
|
2014-01-31 11:34:09 -06:00
|
|
|
|
.. confval:: gettext_uuid
|
|
|
|
|
|
2014-03-01 01:25:22 -06:00
|
|
|
|
If true, Sphinx generates uuid information for version tracking in message
|
2014-10-05 07:50:44 -05:00
|
|
|
|
catalogs. It is used for:
|
2014-01-31 11:34:09 -06:00
|
|
|
|
|
2014-10-05 07:50:44 -05:00
|
|
|
|
* Add uid line for each msgids in .pot files.
|
|
|
|
|
* Calculate similarity between new msgids and previously saved old msgids.
|
2014-10-08 07:36:33 -05:00
|
|
|
|
This calculation takes a long time.
|
2014-10-05 07:50:44 -05:00
|
|
|
|
|
2014-10-08 07:36:33 -05:00
|
|
|
|
If you want to accelerate the calculation, you can use
|
|
|
|
|
``python-levenshtein`` 3rd-party package written in C by using
|
2014-10-05 08:25:50 -05:00
|
|
|
|
:command:`pip install python-levenshtein`.
|
|
|
|
|
|
2014-10-05 07:50:44 -05:00
|
|
|
|
The default is ``False``.
|
2014-03-01 01:25:22 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2014-01-31 11:34:09 -06:00
|
|
|
|
.. confval:: gettext_location
|
|
|
|
|
|
2014-03-01 01:25:22 -06:00
|
|
|
|
If true, Sphinx generates location information for messages in message
|
|
|
|
|
catalogs.
|
2014-01-31 11:34:09 -06:00
|
|
|
|
|
2014-06-18 11:34:28 -05:00
|
|
|
|
The default is ``True``.
|
2010-08-26 18:02:49 -05:00
|
|
|
|
|
2014-03-01 01:25:22 -06:00
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2014-08-03 02:22:08 -05:00
|
|
|
|
.. confval:: gettext_auto_build
|
|
|
|
|
|
|
|
|
|
If true, Sphinx builds mo file for each translation catalog files.
|
|
|
|
|
|
|
|
|
|
The default is ``True``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2015-02-21 08:48:18 -06:00
|
|
|
|
.. confval:: gettext_additional_targets
|
2014-09-28 07:19:54 -05:00
|
|
|
|
|
|
|
|
|
To specify names to enable gettext extracting and translation applying for
|
2015-02-21 08:48:18 -06:00
|
|
|
|
i18n additionally. You can specify below names:
|
2014-09-28 07:19:54 -05:00
|
|
|
|
|
|
|
|
|
:index: index terms
|
2015-02-21 22:51:02 -06:00
|
|
|
|
:literal-block: literal blocks: ``::`` and ``code-block``.
|
2015-02-22 00:36:43 -06:00
|
|
|
|
:doctest-block: doctest block
|
|
|
|
|
:raw: raw content
|
2015-02-22 04:24:14 -06:00
|
|
|
|
:image: image/figure uri and alt
|
|
|
|
|
|
|
|
|
|
For example: ``gettext_additional_targets = ['literal-block', 'image']``.
|
2014-09-28 07:19:54 -05:00
|
|
|
|
|
|
|
|
|
The default is ``[]``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
2014-03-01 01:25:22 -06:00
|
|
|
|
|
2016-01-29 00:05:43 -06:00
|
|
|
|
.. confval:: figure_language_filename
|
|
|
|
|
|
|
|
|
|
The filename format for language-specific figures. The default value is
|
|
|
|
|
``{root}.{language}{ext}``. It will be expanded to
|
|
|
|
|
``dirname/filename.en.png`` from ``.. image:: dirname/filename.png``.
|
2016-10-12 22:34:19 -05:00
|
|
|
|
The available format tokens are:
|
|
|
|
|
|
|
|
|
|
* ``{root}`` - the filename, including any path component, without the file
|
|
|
|
|
extension, e.g. ``dirname/filename``
|
|
|
|
|
* ``{path}`` - the directory path component of the filename, with a trailing
|
|
|
|
|
slash if non-empty, e.g. ``dirname/``
|
|
|
|
|
* ``{basename}`` - the filename without the directory path or file extension
|
|
|
|
|
components, e.g. ``filename``
|
|
|
|
|
* ``{ext}`` - the file extension, e.g. ``.png``
|
|
|
|
|
* ``{language}`` - the translation language, e.g. ``en``
|
|
|
|
|
|
|
|
|
|
For example, setting this to ``{path}{language}/{basename}{ext}`` will
|
|
|
|
|
expand to ``dirname/en/filename.png`` instead.
|
2016-01-29 00:05:43 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
2016-10-12 22:34:19 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Added ``{path}`` and ``{basename}`` tokens.
|
2016-01-29 00:05:43 -06:00
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2018-06-17 22:58:32 -05:00
|
|
|
|
.. _math-options:
|
|
|
|
|
|
|
|
|
|
Options for Math
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
These options influence Math notations.
|
|
|
|
|
|
|
|
|
|
.. confval:: math_number_all
|
|
|
|
|
|
|
|
|
|
Set this option to ``True`` if you want all displayed math to be numbered.
|
|
|
|
|
The default is ``False``.
|
|
|
|
|
|
|
|
|
|
.. confval:: math_eqref_format
|
|
|
|
|
|
|
|
|
|
A string that are used for format of label of references to equations.
|
|
|
|
|
As a special character, ``{number}`` will be replaced to equaition number.
|
|
|
|
|
|
|
|
|
|
Example: ``'Eq.{number}'`` is rendered as ``Eq.10``
|
|
|
|
|
|
|
|
|
|
.. confval:: math_numfig
|
|
|
|
|
|
|
|
|
|
If ``True``, displayed math equations are numbered across pages when
|
|
|
|
|
:confval:`numfig` is enabled. The :confval:`numfig_secnum_depth` setting
|
|
|
|
|
is respected. The :rst:role:`eq`, not :rst:role:`numref`, role
|
|
|
|
|
must be used to reference equation numbers. Default is ``True``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.7
|
|
|
|
|
|
|
|
|
|
|
2008-03-16 06:19:26 -05:00
|
|
|
|
.. _html-options:
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
Options for HTML output
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
These options influence HTML as well as HTML Help output, and other builders
|
2014-06-19 11:14:47 -05:00
|
|
|
|
that use Sphinx's HTMLWriter class.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2009-02-15 03:45:46 -06:00
|
|
|
|
.. confval:: html_theme
|
|
|
|
|
|
|
|
|
|
The "theme" that the HTML output should use. See the :doc:`section about
|
2018-03-31 07:18:55 -05:00
|
|
|
|
theming </theming>`. The default is ``'alabaster'``.
|
2009-02-15 03:45:46 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
|
|
|
|
.. confval:: html_theme_options
|
|
|
|
|
|
|
|
|
|
A dictionary of options that influence the look and feel of the selected
|
|
|
|
|
theme. These are theme-specific. For the options understood by the builtin
|
|
|
|
|
themes, see :ref:`this section <builtin-themes>`.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
|
|
|
|
.. confval:: html_theme_path
|
|
|
|
|
|
|
|
|
|
A list of paths that contain custom themes, either as subdirectories or as
|
|
|
|
|
zip files. Relative paths are taken as relative to the configuration
|
|
|
|
|
directory.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
2009-02-15 04:03:16 -06:00
|
|
|
|
.. confval:: html_style
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The style sheet to use for HTML pages. A file of that name must exist
|
|
|
|
|
either in Sphinx's :file:`static/` path, or in one of the custom paths given
|
|
|
|
|
in :confval:`html_static_path`. Default is the stylesheet given by the
|
|
|
|
|
selected theme. If you only want to add or override a few things compared
|
|
|
|
|
to the theme's stylesheet, use CSS ``@import`` to import the theme's
|
|
|
|
|
stylesheet.
|
2009-02-15 04:03:16 -06:00
|
|
|
|
|
2008-04-19 16:28:24 -05:00
|
|
|
|
.. confval:: html_title
|
|
|
|
|
|
2014-06-19 11:14:47 -05:00
|
|
|
|
The "title" for HTML documentation generated with Sphinx's own templates.
|
2008-04-19 16:28:24 -05:00
|
|
|
|
This is appended to the ``<title>`` tag of individual pages, and used in the
|
|
|
|
|
navigation bar as the "topmost" element. It defaults to :samp:`'{<project>}
|
2015-12-31 19:35:42 -06:00
|
|
|
|
v{<revision>} documentation'`.
|
2008-04-19 16:28:24 -05:00
|
|
|
|
|
2008-05-24 13:03:56 -05:00
|
|
|
|
.. confval:: html_short_title
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A shorter "title" for the HTML docs. This is used in for links in the
|
|
|
|
|
header and in the HTML Help docs. If not given, it defaults to the value of
|
2008-05-24 13:03:56 -05:00
|
|
|
|
:confval:`html_title`.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4
|
|
|
|
|
|
2018-06-06 07:18:17 -05:00
|
|
|
|
.. confval:: html_baseurl
|
|
|
|
|
|
|
|
|
|
The URL which points to the root of the HTML documentation. It is used to
|
|
|
|
|
indicate the location of document like ``canonical_url``.
|
|
|
|
|
|
2011-01-08 14:59:49 -06:00
|
|
|
|
.. confval:: html_context
|
|
|
|
|
|
|
|
|
|
A dictionary of values to pass into the template engine's context for all
|
|
|
|
|
pages. Single values can also be put in this dictionary using the
|
2016-01-11 22:36:12 -06:00
|
|
|
|
:option:`-A <sphinx-build -A>` command-line option of ``sphinx-build``.
|
2011-01-08 14:59:49 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
|
2008-04-27 14:43:45 -05:00
|
|
|
|
.. confval:: html_logo
|
|
|
|
|
|
2014-01-20 09:37:37 -06:00
|
|
|
|
If given, this must be the name of an image file (path relative to the
|
2014-01-20 12:27:52 -06:00
|
|
|
|
:term:`configuration directory`) that is the logo of the docs. It is placed
|
|
|
|
|
at the top of the sidebar; its width should therefore not exceed 200 pixels.
|
|
|
|
|
Default: ``None``.
|
Merged revisions 64703-64708,64710-64712 via svnmerge from
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x
........
r64703 | georg.brandl | 2008-07-04 19:24:00 +0200 (Fri, 04 Jul 2008) | 2 lines
Fix linkcheck builder crash for malformed URLs.
........
r64704 | georg.brandl | 2008-07-04 19:32:40 +0200 (Fri, 04 Jul 2008) | 2 lines
Add 0.5 compatibility for more admonitions.
........
r64705 | georg.brandl | 2008-07-04 19:38:37 +0200 (Fri, 04 Jul 2008) | 2 lines
Remove silly "rubric" restriction in latex writer.
........
r64706 | georg.brandl | 2008-07-04 19:41:44 +0200 (Fri, 04 Jul 2008) | 2 lines
Document rubric:: Footnotes behavior.
........
r64707 | georg.brandl | 2008-07-04 19:45:28 +0200 (Fri, 04 Jul 2008) | 2 lines
Fix XHTML.
........
r64708 | georg.brandl | 2008-07-04 19:50:56 +0200 (Fri, 04 Jul 2008) | 2 lines
More XHTML fixes.
........
r64710 | georg.brandl | 2008-07-04 19:59:56 +0200 (Fri, 04 Jul 2008) | 2 lines
Copy the html_logo to the output static dir.
........
r64711 | georg.brandl | 2008-07-04 20:37:43 +0200 (Fri, 04 Jul 2008) | 2 lines
Fix latex code for module names with underscores that have platforms.
........
r64712 | georg.brandl | 2008-07-04 20:46:40 +0200 (Fri, 04 Jul 2008) | 2 lines
Fix a crash with nonlocal image URIs.
........
2008-07-04 13:49:39 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4.1
|
|
|
|
|
The image file will be copied to the ``_static`` directory of the output
|
2014-01-20 09:37:37 -06:00
|
|
|
|
HTML, but only if the file does not already exist there.
|
2008-04-27 14:43:45 -05:00
|
|
|
|
|
2008-06-15 03:48:06 -05:00
|
|
|
|
.. confval:: html_favicon
|
|
|
|
|
|
2014-01-20 09:37:37 -06:00
|
|
|
|
If given, this must be the name of an image file (path relative to the
|
2014-06-18 10:53:25 -05:00
|
|
|
|
:term:`configuration directory`) that is the favicon of the docs. Modern
|
|
|
|
|
browsers use this as the icon for tabs, windows and bookmarks. It should
|
|
|
|
|
be a Windows-style icon file (``.ico``), which is 16x16 or 32x32
|
|
|
|
|
pixels large. Default: ``None``.
|
2008-06-15 03:48:06 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4
|
2014-01-20 09:37:37 -06:00
|
|
|
|
The image file will be copied to the ``_static`` directory of the output
|
|
|
|
|
HTML, but only if the file does not already exist there.
|
2008-06-15 03:48:06 -05:00
|
|
|
|
|
2018-02-08 06:46:59 -06:00
|
|
|
|
.. confval:: html_css_files
|
|
|
|
|
|
|
|
|
|
A list of CSS files. The entry must be a *filename* string or a tuple
|
|
|
|
|
containing the *filename* string and the *attributes* dictionary. The
|
|
|
|
|
*filename* must be relative to the :confval:`html_static_path`, or a full URI
|
|
|
|
|
with scheme like ``http://example.org/style.css``. The *attributes* is used
|
|
|
|
|
for attributes of ``<link>`` tag. It defaults to an empty list.
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
html_css_files = ['custom.css'
|
|
|
|
|
'https://example.com/css/custom.css',
|
|
|
|
|
('print.css', {'media': 'print'})]
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
|
2018-02-08 06:46:59 -06:00
|
|
|
|
.. confval:: html_js_files
|
|
|
|
|
|
|
|
|
|
A list of JavaScript *filename*. The entry must be a *filename* string or a
|
|
|
|
|
tuple containing the *filename* string and the *attributes* dictionary. The
|
|
|
|
|
*filename* must be relative to the :confval:`html_static_path`, or a full
|
|
|
|
|
URI with scheme like ``http://example.org/script.js``. The *attributes* is
|
|
|
|
|
used for attributes of ``<script>`` tag. It defaults to an empty list.
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
html_js_files = ['script.js',
|
|
|
|
|
'https://example.com/scripts/custom.js',
|
|
|
|
|
('custom.js', {'async': 'async'})]
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: html_static_path
|
|
|
|
|
|
2013-08-22 02:51:06 -05:00
|
|
|
|
A list of paths that contain custom static files (such as style
|
|
|
|
|
sheets or script files). Relative paths are taken as relative to
|
|
|
|
|
the configuration directory. They are copied to the output's
|
|
|
|
|
:file:`_static` directory after the theme's static files, so a file
|
|
|
|
|
named :file:`default.css` will overwrite the theme's
|
2008-03-09 16:32:24 -05:00
|
|
|
|
:file:`default.css`.
|
|
|
|
|
|
2018-04-27 08:23:59 -05:00
|
|
|
|
As these files are not meant to be built, they are automatically excluded
|
|
|
|
|
from source files.
|
|
|
|
|
|
2018-04-20 21:02:46 -05:00
|
|
|
|
.. note::
|
|
|
|
|
|
2018-05-03 03:40:32 -05:00
|
|
|
|
For security reasons, dotfiles under ``html_static_path`` will
|
|
|
|
|
not be copied. If you would like to copy them intentionally, please
|
|
|
|
|
add each filepath to this setting::
|
2018-04-20 21:02:46 -05:00
|
|
|
|
|
|
|
|
|
html_static_path = ['_static', '_static/.htaccess']
|
|
|
|
|
|
|
|
|
|
Another way to do that, you can also use
|
|
|
|
|
:confval:`html_extra_path`. It allows to copy dotfiles under
|
|
|
|
|
the directories.
|
|
|
|
|
|
2008-05-24 11:40:11 -05:00
|
|
|
|
.. versionchanged:: 0.4
|
|
|
|
|
The paths in :confval:`html_static_path` can now contain subdirectories.
|
|
|
|
|
|
2010-01-07 09:20:52 -06:00
|
|
|
|
.. versionchanged:: 1.0
|
|
|
|
|
The entries in :confval:`html_static_path` can now be single files.
|
|
|
|
|
|
2018-04-27 08:23:59 -05:00
|
|
|
|
.. versionchanged:: 1.8
|
|
|
|
|
The files under :confval:`html_static_path` are excluded from source
|
|
|
|
|
files.
|
|
|
|
|
|
2013-08-22 02:51:06 -05:00
|
|
|
|
.. confval:: html_extra_path
|
|
|
|
|
|
2013-08-22 03:20:47 -05:00
|
|
|
|
A list of paths that contain extra files not directly related to
|
|
|
|
|
the documentation, such as :file:`robots.txt` or :file:`.htaccess`.
|
|
|
|
|
Relative paths are taken as relative to the configuration
|
|
|
|
|
directory. They are copied to the output directory. They will
|
|
|
|
|
overwrite any existing file of the same name.
|
|
|
|
|
|
2018-04-27 08:23:59 -05:00
|
|
|
|
As these files are not meant to be built, they are automatically excluded
|
|
|
|
|
from source files.
|
2013-08-22 02:51:06 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2016-01-15 05:44:03 -06:00
|
|
|
|
.. versionchanged:: 1.4
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The dotfiles in the extra directory will be copied to the output
|
|
|
|
|
directory. And it refers :confval:`exclude_patterns` on copying extra
|
|
|
|
|
files and directories, and ignores if path matches to patterns.
|
2016-01-15 05:44:03 -06:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: html_last_updated_fmt
|
|
|
|
|
|
2015-03-05 05:27:40 -06:00
|
|
|
|
If this is not None, a 'Last updated on:' timestamp is inserted
|
2016-04-01 20:23:13 -05:00
|
|
|
|
at every page bottom, using the given :func:`strftime` format.
|
|
|
|
|
The empty string is equivalent to ``'%b %d, %Y'`` (or a
|
2015-03-05 05:27:40 -06:00
|
|
|
|
locale-dependent equivalent).
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
|
|
|
|
.. confval:: html_use_smartypants
|
|
|
|
|
|
2018-01-05 08:06:10 -06:00
|
|
|
|
If true, quotes and dashes are converted to typographically correct
|
2014-06-19 11:14:47 -05:00
|
|
|
|
entities. Default: ``True``.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2017-04-17 06:15:28 -05:00
|
|
|
|
.. deprecated:: 1.6
|
2018-01-05 08:06:10 -06:00
|
|
|
|
To disable smart quotes, use rather :confval:`smartquotes`.
|
2017-04-17 06:15:28 -05:00
|
|
|
|
|
2008-11-30 13:38:59 -06:00
|
|
|
|
.. confval:: html_add_permalinks
|
|
|
|
|
|
2010-12-11 02:25:59 -06:00
|
|
|
|
Sphinx will add "permalinks" for each heading and description environment as
|
|
|
|
|
paragraph signs that become visible when the mouse hovers over them.
|
|
|
|
|
|
|
|
|
|
This value determines the text for the permalink; it defaults to ``"¶"``.
|
|
|
|
|
Set it to ``None`` or the empty string to disable permalinks.
|
2008-11-30 13:38:59 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
Previously, this was always activated.
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2010-12-11 02:25:59 -06:00
|
|
|
|
.. versionchanged:: 1.1
|
|
|
|
|
This can now be a string to select the actual text of the link.
|
|
|
|
|
Previously, only boolean values were accepted.
|
2010-12-01 15:54:54 -06:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: html_sidebars
|
|
|
|
|
|
|
|
|
|
Custom sidebar templates, must be a dictionary that maps document names to
|
2010-01-07 10:56:09 -06:00
|
|
|
|
template names.
|
|
|
|
|
|
|
|
|
|
The keys can contain glob-style patterns [1]_, in which case all matching
|
|
|
|
|
documents will get the specified sidebars. (A warning is emitted when a
|
|
|
|
|
more than one glob-style pattern matches for any document.)
|
|
|
|
|
|
|
|
|
|
The values can be either lists or single strings.
|
|
|
|
|
|
|
|
|
|
* If a value is a list, it specifies the complete list of sidebar templates
|
|
|
|
|
to include. If all or some of the default sidebars are to be included,
|
|
|
|
|
they must be put into this list as well.
|
|
|
|
|
|
2017-10-22 01:12:31 -05:00
|
|
|
|
The default sidebars (for documents that don't match any pattern) are
|
|
|
|
|
defined by theme itself. Builtin themes are using these templates by
|
|
|
|
|
default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
2010-01-07 10:56:09 -06:00
|
|
|
|
'searchbox.html']``.
|
|
|
|
|
|
|
|
|
|
* If a value is a single string, it specifies a custom sidebar to be added
|
|
|
|
|
between the ``'sourcelink.html'`` and ``'searchbox.html'`` entries. This
|
|
|
|
|
is for compatibility with Sphinx versions before 1.0.
|
|
|
|
|
|
2017-10-22 01:25:47 -05:00
|
|
|
|
.. deprecated:: 1.7
|
|
|
|
|
|
|
|
|
|
a single string value for ``html_sidebars`` will be removed in 2.0
|
|
|
|
|
|
2010-01-07 10:56:09 -06:00
|
|
|
|
Builtin sidebar templates that can be rendered are:
|
|
|
|
|
|
2014-06-18 10:53:25 -05:00
|
|
|
|
* **localtoc.html** -- a fine-grained table of contents of the current
|
|
|
|
|
document
|
2010-01-07 10:56:09 -06:00
|
|
|
|
* **globaltoc.html** -- a coarse-grained table of contents for the whole
|
|
|
|
|
documentation set, collapsed
|
|
|
|
|
* **relations.html** -- two links to the previous and next documents
|
|
|
|
|
* **sourcelink.html** -- a link to the source of the current document, if
|
|
|
|
|
enabled in :confval:`html_show_sourcelink`
|
|
|
|
|
* **searchbox.html** -- the "quick search" box
|
|
|
|
|
|
|
|
|
|
Example::
|
2008-03-25 14:57:09 -05:00
|
|
|
|
|
|
|
|
|
html_sidebars = {
|
2010-01-07 10:56:09 -06:00
|
|
|
|
'**': ['globaltoc.html', 'sourcelink.html', 'searchbox.html'],
|
|
|
|
|
'using/windows': ['windowssidebar.html', 'searchbox.html'],
|
2008-03-25 14:57:09 -05:00
|
|
|
|
}
|
|
|
|
|
|
2010-01-07 10:56:09 -06:00
|
|
|
|
This will render the custom template ``windowssidebar.html`` and the quick
|
|
|
|
|
search box within the sidebar of the given document, and render the default
|
|
|
|
|
sidebars for all other pages (except that the local TOC is replaced by the
|
|
|
|
|
global TOC).
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
The ability to use globbing keys and to specify multiple sidebars.
|
|
|
|
|
|
|
|
|
|
Note that this value only has no effect if the chosen theme does not possess
|
|
|
|
|
a sidebar, like the builtin **scrolls** and **haiku** themes.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
|
|
|
|
.. confval:: html_additional_pages
|
|
|
|
|
|
|
|
|
|
Additional templates that should be rendered to HTML pages, must be a
|
|
|
|
|
dictionary that maps document names to template names.
|
|
|
|
|
|
2008-03-25 14:57:09 -05:00
|
|
|
|
Example::
|
2008-05-23 09:01:53 -05:00
|
|
|
|
|
2008-03-25 14:57:09 -05:00
|
|
|
|
html_additional_pages = {
|
|
|
|
|
'download': 'customdownload.html',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
This will render the template ``customdownload.html`` as the page
|
|
|
|
|
``download.html``.
|
|
|
|
|
|
2010-02-19 18:13:23 -06:00
|
|
|
|
.. confval:: html_domain_indices
|
|
|
|
|
|
|
|
|
|
If true, generate domain-specific indices in addition to the general index.
|
|
|
|
|
For e.g. the Python domain, this is the global module index. Default is
|
|
|
|
|
``True``.
|
|
|
|
|
|
|
|
|
|
This value can be a bool or a list of index names that should be generated.
|
|
|
|
|
To find out the index name for a specific index, look at the HTML file name.
|
|
|
|
|
For example, the Python module index has the name ``'py-modindex'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2008-05-23 09:01:53 -05:00
|
|
|
|
.. confval:: html_use_index
|
|
|
|
|
|
|
|
|
|
If true, add an index to the HTML documents. Default is ``True``.
|
|
|
|
|
|
2008-05-24 11:28:06 -05:00
|
|
|
|
.. versionadded:: 0.4
|
2008-05-23 09:01:53 -05:00
|
|
|
|
|
2008-06-17 04:01:26 -05:00
|
|
|
|
.. confval:: html_split_index
|
|
|
|
|
|
|
|
|
|
If true, the index is generated twice: once as a single page with all the
|
|
|
|
|
entries, and once as one page per starting letter. Default is ``False``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4
|
2008-08-08 05:54:00 -05:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: html_copy_source
|
|
|
|
|
|
|
|
|
|
If true, the reST sources are included in the HTML build as
|
2008-04-27 13:08:55 -05:00
|
|
|
|
:file:`_sources/{name}`. The default is ``True``.
|
|
|
|
|
|
2008-12-15 06:38:39 -06:00
|
|
|
|
.. confval:: html_show_sourcelink
|
|
|
|
|
|
|
|
|
|
If true (and :confval:`html_copy_source` is true as well), links to the
|
|
|
|
|
reST sources will be added to the sidebar. The default is ``True``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
2016-05-17 02:34:01 -05:00
|
|
|
|
.. confval:: html_sourcelink_suffix
|
2016-03-29 05:52:21 -05:00
|
|
|
|
|
2016-05-17 02:34:01 -05:00
|
|
|
|
Suffix to be appended to source links (see :confval:`html_show_sourcelink`),
|
|
|
|
|
unless they have this suffix already. Default is ``'.txt'``.
|
2016-03-29 05:52:21 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2008-04-27 13:08:55 -05:00
|
|
|
|
.. confval:: html_use_opensearch
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
If nonempty, an `OpenSearch <http://www.opensearch.org/Home>`_ description
|
|
|
|
|
file will be output, and all pages will contain a ``<link>`` tag referring
|
|
|
|
|
to it. Since OpenSearch doesn't support relative URLs for its search page
|
|
|
|
|
location, the value of this option must be the base URL from which these
|
|
|
|
|
documents are served (without trailing slash), e.g.
|
|
|
|
|
``"https://docs.python.org"``. The default is ``''``.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2008-05-06 09:25:29 -05:00
|
|
|
|
.. confval:: html_file_suffix
|
|
|
|
|
|
2010-07-17 12:45:54 -05:00
|
|
|
|
This is the file name suffix for generated HTML files. The default is
|
|
|
|
|
``".html"``.
|
2008-05-06 09:25:29 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4
|
|
|
|
|
|
2008-12-25 10:59:32 -06:00
|
|
|
|
.. confval:: html_link_suffix
|
|
|
|
|
|
|
|
|
|
Suffix for generated links to HTML files. The default is whatever
|
|
|
|
|
:confval:`html_file_suffix` is set to; it can be set differently (e.g. to
|
|
|
|
|
support different web server setups).
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2009-04-09 14:04:44 -05:00
|
|
|
|
.. confval:: html_show_copyright
|
|
|
|
|
|
2014-06-18 10:53:25 -05:00
|
|
|
|
If true, "(C) Copyright ..." is shown in the HTML footer. Default is
|
|
|
|
|
``True``.
|
2009-04-09 14:04:44 -05:00
|
|
|
|
|
2009-04-29 05:55:03 -05:00
|
|
|
|
.. versionadded:: 1.0
|
2009-04-09 14:04:44 -05:00
|
|
|
|
|
2008-05-24 13:03:56 -05:00
|
|
|
|
.. confval:: html_show_sphinx
|
|
|
|
|
|
|
|
|
|
If true, "Created using Sphinx" is shown in the HTML footer. Default is
|
|
|
|
|
``True``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.4
|
|
|
|
|
|
2009-06-16 15:19:51 -05:00
|
|
|
|
.. confval:: html_output_encoding
|
|
|
|
|
|
|
|
|
|
Encoding of HTML output files. Default is ``'utf-8'``. Note that this
|
|
|
|
|
encoding name must both be a valid Python encoding name and a valid HTML
|
|
|
|
|
``charset`` value.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2010-04-07 06:02:03 -05:00
|
|
|
|
.. confval:: html_compact_lists
|
|
|
|
|
|
2017-03-02 07:25:55 -06:00
|
|
|
|
If true, a list all whose items consist of a single paragraph and/or a
|
|
|
|
|
sub-list all whose items etc... (recursive definition) will not use the
|
|
|
|
|
``<p>`` element for any of its items. This is standard docutils behavior.
|
|
|
|
|
Default: ``True``.
|
2010-04-07 06:02:03 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
|
|
|
|
.. confval:: html_secnumber_suffix
|
|
|
|
|
|
|
|
|
|
Suffix for section numbers. Default: ``". "``. Set to ``" "`` to suppress
|
|
|
|
|
the final dot on section numbers.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2011-01-04 05:40:19 -06:00
|
|
|
|
.. confval:: html_search_language
|
|
|
|
|
|
|
|
|
|
Language to be used for generating the HTML full-text search index. This
|
|
|
|
|
defaults to the global language selected with :confval:`language`. If there
|
|
|
|
|
is no support for this language, ``"en"`` is used which selects the English
|
|
|
|
|
language.
|
|
|
|
|
|
|
|
|
|
Support is present for these languages:
|
|
|
|
|
|
2014-01-22 02:34:14 -06:00
|
|
|
|
* ``da`` -- Danish
|
|
|
|
|
* ``nl`` -- Dutch
|
2011-01-04 05:40:19 -06:00
|
|
|
|
* ``en`` -- English
|
2014-01-22 02:34:14 -06:00
|
|
|
|
* ``fi`` -- Finnish
|
|
|
|
|
* ``fr`` -- French
|
|
|
|
|
* ``de`` -- German
|
|
|
|
|
* ``hu`` -- Hungarian
|
|
|
|
|
* ``it`` -- Italian
|
2011-01-04 05:40:19 -06:00
|
|
|
|
* ``ja`` -- Japanese
|
2014-01-22 02:34:14 -06:00
|
|
|
|
* ``no`` -- Norwegian
|
2015-09-11 05:46:27 -05:00
|
|
|
|
* ``pt`` -- Portuguese
|
2014-01-22 02:34:14 -06:00
|
|
|
|
* ``ro`` -- Romanian
|
|
|
|
|
* ``ru`` -- Russian
|
|
|
|
|
* ``es`` -- Spanish
|
|
|
|
|
* ``sv`` -- Swedish
|
|
|
|
|
* ``tr`` -- Turkish
|
2015-12-13 03:07:11 -06:00
|
|
|
|
* ``zh`` -- Chinese
|
2011-01-04 05:40:19 -06:00
|
|
|
|
|
2014-06-19 11:14:47 -05:00
|
|
|
|
.. admonition:: Accelerating build speed
|
2014-01-22 04:12:04 -06:00
|
|
|
|
|
|
|
|
|
Each language (except Japanese) provides its own stemming algorithm.
|
2014-03-04 12:10:19 -06:00
|
|
|
|
Sphinx uses a Python implementation by default. You can use a C
|
|
|
|
|
implementation to accelerate building the index file.
|
2014-01-22 04:12:04 -06:00
|
|
|
|
|
2018-04-18 21:51:48 -05:00
|
|
|
|
* `PorterStemmer <https://pypi.org/project/PorterStemmer/>`_ (``en``)
|
|
|
|
|
* `PyStemmer <https://pypi.org/project/PyStemmer/>`_ (all languages)
|
2011-01-04 05:40:19 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
2014-03-04 12:10:19 -06:00
|
|
|
|
With support for ``en`` and ``ja``.
|
2011-01-04 05:40:19 -06:00
|
|
|
|
|
2014-01-22 02:34:14 -06:00
|
|
|
|
.. versionchanged:: 1.3
|
2014-03-04 12:10:19 -06:00
|
|
|
|
Added additional languages.
|
2011-01-04 05:40:19 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: html_search_options
|
|
|
|
|
|
|
|
|
|
A dictionary with options for the search language support, empty by default.
|
|
|
|
|
The meaning of these options depends on the language selected.
|
|
|
|
|
|
|
|
|
|
The English support has no options.
|
|
|
|
|
|
|
|
|
|
The Japanese support has these options:
|
|
|
|
|
|
2016-02-14 04:13:38 -06:00
|
|
|
|
:type:
|
2018-03-31 07:18:55 -05:00
|
|
|
|
_`type` is dotted module path string to specify Splitter implementation
|
|
|
|
|
which should be derived from :class:`sphinx.search.ja.BaseSplitter`. If
|
|
|
|
|
not specified or None is specified,
|
|
|
|
|
``'sphinx.search.ja.DefaultSplitter'`` will be used.
|
2016-02-14 04:13:38 -06:00
|
|
|
|
|
|
|
|
|
You can choose from these modules:
|
|
|
|
|
|
|
|
|
|
:'sphinx.search.ja.DefaultSplitter':
|
|
|
|
|
TinySegmenter algorithm. This is default splitter.
|
2018-09-03 02:18:24 -05:00
|
|
|
|
:'sphinx.search.ja.MecabSplitter':
|
2018-03-31 07:18:55 -05:00
|
|
|
|
MeCab binding. To use this splitter, 'mecab' python binding or dynamic
|
|
|
|
|
link library ('libmecab.so' for linux, 'libmecab.dll' for windows) is
|
|
|
|
|
required.
|
2016-02-14 04:13:38 -06:00
|
|
|
|
:'sphinx.search.ja.JanomeSplitter':
|
|
|
|
|
Janome binding. To use this splitter,
|
2018-04-18 21:51:48 -05:00
|
|
|
|
`Janome <https://pypi.org/project/Janome/>`_ is required.
|
2016-02-14 04:13:38 -06:00
|
|
|
|
|
2018-04-28 00:34:49 -05:00
|
|
|
|
.. deprecated:: 1.6
|
|
|
|
|
``'mecab'``, ``'janome'`` and ``'default'`` is deprecated.
|
|
|
|
|
To keep compatibility, ``'mecab'``, ``'janome'`` and ``'default'`` are
|
|
|
|
|
also acceptable.
|
2016-02-14 04:13:38 -06:00
|
|
|
|
|
|
|
|
|
Other option values depend on splitter value which you choose.
|
|
|
|
|
|
|
|
|
|
Options for ``'mecab'``:
|
|
|
|
|
:dic_enc:
|
|
|
|
|
_`dic_enc option` is the encoding for the MeCab algorithm.
|
|
|
|
|
:dict:
|
|
|
|
|
_`dict option` is the dictionary to use for the MeCab algorithm.
|
|
|
|
|
:lib:
|
2018-03-31 07:18:55 -05:00
|
|
|
|
_`lib option` is the library name for finding the MeCab library via
|
|
|
|
|
ctypes if the Python binding is not installed.
|
2016-02-14 04:13:38 -06:00
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
html_search_options = {
|
2016-02-14 18:45:04 -06:00
|
|
|
|
'type': 'mecab',
|
|
|
|
|
'dic_enc': 'utf-8',
|
|
|
|
|
'dict': '/path/to/mecab.dic',
|
|
|
|
|
'lib': '/path/to/libmecab.so',
|
|
|
|
|
}
|
2016-02-14 04:13:38 -06:00
|
|
|
|
|
|
|
|
|
Options for ``'janome'``:
|
2018-03-31 07:18:55 -05:00
|
|
|
|
:user_dic:
|
|
|
|
|
_`user_dic option` is the user dictionary file path for Janome.
|
2016-02-14 04:13:38 -06:00
|
|
|
|
:user_dic_enc:
|
2018-03-31 07:18:55 -05:00
|
|
|
|
_`user_dic_enc option` is the encoding for the user dictionary file
|
|
|
|
|
specified by ``user_dic`` option. Default is 'utf8'.
|
2011-01-04 05:40:19 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2016-02-14 04:13:38 -06:00
|
|
|
|
.. versionchanged:: 1.4
|
2018-03-31 07:18:55 -05:00
|
|
|
|
html_search_options for Japanese is re-organized and any custom splitter
|
|
|
|
|
can be used by `type`_ settings.
|
2015-12-13 03:07:11 -06:00
|
|
|
|
|
|
|
|
|
The Chinese support has these options:
|
|
|
|
|
|
|
|
|
|
* ``dict`` -- the ``jieba`` dictionary path if want to use
|
|
|
|
|
custom dictionary.
|
|
|
|
|
|
2013-01-04 04:17:32 -06:00
|
|
|
|
.. confval:: html_search_scorer
|
|
|
|
|
|
2014-06-19 11:14:47 -05:00
|
|
|
|
The name of a JavaScript file (relative to the configuration directory) that
|
2013-01-04 04:17:32 -06:00
|
|
|
|
implements a search results scorer. If empty, the default will be used.
|
|
|
|
|
|
|
|
|
|
.. XXX describe interface for scorer here
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2015-02-22 07:04:20 -06:00
|
|
|
|
.. confval:: html_scaled_image_link
|
|
|
|
|
|
|
|
|
|
If true, images itself links to the original image if it doesn't have
|
|
|
|
|
'target' option or scale related options: 'scale', 'width', 'height'.
|
|
|
|
|
The default is ``True``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2018-06-17 22:58:32 -05:00
|
|
|
|
.. confval:: html_math_renderer
|
|
|
|
|
|
|
|
|
|
The name of math_renderer extension for HTML output. The default is
|
|
|
|
|
``'mathjax'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
|
2017-02-24 10:56:01 -06:00
|
|
|
|
.. confval:: html_experimental_html5_writer
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
Output is processed with HTML5 writer. This feature needs docutils 0.13 or
|
|
|
|
|
newer. Default is ``False``.
|
2017-02-24 10:56:01 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2018-08-04 05:05:21 -05:00
|
|
|
|
Options for Single HTML output
|
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
|
|
.. confval:: singlehtml_sidebars
|
|
|
|
|
|
|
|
|
|
Custom sidebar templates, must be a dictionary that maps document names to
|
|
|
|
|
template names. And it only allows a key named `'index'`. All other keys
|
|
|
|
|
are ignored. For more information, refer to :confval:`html_sidebars`. By
|
|
|
|
|
default, it is same as :confval:`html_sidebars`.
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2018-02-18 19:37:06 -06:00
|
|
|
|
.. _htmlhelp-options:
|
|
|
|
|
|
|
|
|
|
Options for HTML help output
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
|
|
.. confval:: htmlhelp_basename
|
|
|
|
|
|
|
|
|
|
Output file base name for HTML help builder. Default is ``'pydoc'``.
|
|
|
|
|
|
2018-09-05 10:04:47 -05:00
|
|
|
|
.. confval:: htmlhelp_file_suffix
|
|
|
|
|
|
|
|
|
|
This is the file name suffix for generated HTML help files. The
|
|
|
|
|
default is ``".html"``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 2.0
|
|
|
|
|
|
|
|
|
|
.. confval:: htmlhelp_link_suffix
|
|
|
|
|
|
|
|
|
|
Suffix for generated links to HTML files. The default is ``".html"``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 2.0
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2015-01-14 06:45:04 -06:00
|
|
|
|
.. _applehelp-options:
|
|
|
|
|
|
|
|
|
|
Options for Apple Help output
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
2015-01-15 07:11:58 -06:00
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
2015-01-14 06:45:04 -06:00
|
|
|
|
These options influence the Apple Help output. This builder derives from the
|
|
|
|
|
HTML builder, so the HTML options also apply where appropriate.
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
Apple Help output will only work on Mac OS X 10.6 and higher, as it
|
|
|
|
|
requires the :program:`hiutil` and :program:`codesign` command line tools,
|
|
|
|
|
neither of which are Open Source.
|
|
|
|
|
|
2015-01-15 07:11:58 -06:00
|
|
|
|
You can disable the use of these tools using
|
|
|
|
|
:confval:`applehelp_disable_external_tools`, but the result will not be a
|
|
|
|
|
valid help book until the indexer is run over the ``.lproj`` folders within
|
|
|
|
|
the bundle.
|
|
|
|
|
|
2015-01-14 06:45:04 -06:00
|
|
|
|
.. confval:: applehelp_bundle_name
|
|
|
|
|
|
|
|
|
|
The basename for the Apple Help Book. Defaults to the :confval:`project`
|
|
|
|
|
name.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_bundle_id
|
|
|
|
|
|
2015-01-15 07:11:58 -06:00
|
|
|
|
The bundle ID for the help book bundle.
|
|
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
|
|
You *must* set this value in order to generate Apple Help.
|
2015-01-14 06:45:04 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_dev_region
|
|
|
|
|
|
|
|
|
|
The development region. Defaults to ``'en-us'``, which is Apple’s
|
|
|
|
|
recommended setting.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_bundle_version
|
|
|
|
|
|
|
|
|
|
The bundle version (as a string). Defaults to ``'1'``.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_icon
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The help bundle icon file, or ``None`` for no icon. According to Apple's
|
|
|
|
|
documentation, this should be a 16-by-16 pixel version of the application's
|
2015-01-14 06:45:04 -06:00
|
|
|
|
icon with a transparent background, saved as a PNG file.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_kb_product
|
|
|
|
|
|
|
|
|
|
The product tag for use with :confval:`applehelp_kb_url`. Defaults to
|
|
|
|
|
:samp:`'{<project>}-{<release>}'`.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_kb_url
|
|
|
|
|
|
|
|
|
|
The URL for your knowledgebase server,
|
|
|
|
|
e.g. ``https://example.com/kbsearch.py?p='product'&q='query'&l='lang'``.
|
|
|
|
|
Help Viewer will replace the values ``'product'``, ``'query'`` and
|
|
|
|
|
``'lang'`` at runtime with the contents of :confval:`applehelp_kb_product`,
|
2018-03-31 07:18:55 -05:00
|
|
|
|
the text entered by the user in the search box and the user's system
|
2015-01-14 06:45:04 -06:00
|
|
|
|
language respectively.
|
|
|
|
|
|
|
|
|
|
Defaults to ``None`` for no remote search.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_remote_url
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The URL for remote content. You can place a copy of your Help Book's
|
2015-01-14 06:45:04 -06:00
|
|
|
|
``Resources`` folder at this location and Help Viewer will attempt to use
|
|
|
|
|
it to fetch updated content.
|
|
|
|
|
|
|
|
|
|
e.g. if you set it to ``https://example.com/help/Foo/`` and Help Viewer
|
|
|
|
|
wants a copy of ``index.html`` for an English speaking customer, it will
|
|
|
|
|
look at ``https://example.com/help/Foo/en.lproj/index.html``.
|
|
|
|
|
|
|
|
|
|
Defaults to ``None`` for no remote content.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_index_anchors
|
|
|
|
|
|
|
|
|
|
If ``True``, tell the help indexer to index anchors in the generated HTML.
|
|
|
|
|
This can be useful for jumping to a particular topic using the
|
|
|
|
|
``AHLookupAnchor`` function or the ``openHelpAnchor:inBook:`` method in
|
|
|
|
|
your code. It also allows you to use ``help:anchor`` URLs; see the Apple
|
|
|
|
|
documentation for more information on this topic.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_min_term_length
|
|
|
|
|
|
|
|
|
|
Controls the minimum term length for the help indexer. Defaults to
|
|
|
|
|
``None``, which means the default will be used.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_stopwords
|
|
|
|
|
|
|
|
|
|
Either a language specification (to use the built-in stopwords), or the
|
2015-01-14 06:49:21 -06:00
|
|
|
|
path to a stopwords plist, or ``None`` if you do not want to use stopwords.
|
2015-01-14 06:45:04 -06:00
|
|
|
|
The default stopwords plist can be found at
|
|
|
|
|
``/usr/share/hiutil/Stopwords.plist`` and contains, at time of writing,
|
|
|
|
|
stopwords for the following languages:
|
|
|
|
|
|
|
|
|
|
========= ====
|
|
|
|
|
Language Code
|
|
|
|
|
========= ====
|
|
|
|
|
English en
|
|
|
|
|
German de
|
|
|
|
|
Spanish es
|
|
|
|
|
French fr
|
|
|
|
|
Swedish sv
|
|
|
|
|
Hungarian hu
|
|
|
|
|
Italian it
|
|
|
|
|
========= ====
|
|
|
|
|
|
|
|
|
|
Defaults to :confval:`language`, or if that is not set, to :confval:`en`.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_locale
|
|
|
|
|
|
|
|
|
|
Specifies the locale to generate help for. This is used to determine
|
|
|
|
|
the name of the ``.lproj`` folder inside the Help Book’s ``Resources``, and
|
|
|
|
|
is passed to the help indexer.
|
|
|
|
|
|
|
|
|
|
Defaults to :confval:`language`, or if that is not set, to :confval:`en`.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_title
|
|
|
|
|
|
|
|
|
|
Specifies the help book title. Defaults to :samp:`'{<project>} Help'`.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_codesign_identity
|
|
|
|
|
|
|
|
|
|
Specifies the identity to use for code signing, or ``None`` if code signing
|
|
|
|
|
is not to be performed.
|
|
|
|
|
|
|
|
|
|
Defaults to the value of the environment variable ``CODE_SIGN_IDENTITY``,
|
|
|
|
|
which is set by Xcode for script build phases, or ``None`` if that variable
|
|
|
|
|
is not set.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_codesign_flags
|
|
|
|
|
|
2015-01-15 07:11:58 -06:00
|
|
|
|
A *list* of additional arguments to pass to :program:`codesign` when
|
|
|
|
|
signing the help book.
|
2015-01-14 06:45:04 -06:00
|
|
|
|
|
|
|
|
|
Defaults to a list based on the value of the environment variable
|
|
|
|
|
``OTHER_CODE_SIGN_FLAGS``, which is set by Xcode for script build phases,
|
|
|
|
|
or the empty list if that variable is not set.
|
|
|
|
|
|
2015-01-15 07:11:58 -06:00
|
|
|
|
.. confval:: applehelp_indexer_path
|
|
|
|
|
|
|
|
|
|
The path to the :program:`hiutil` program. Defaults to
|
|
|
|
|
``'/usr/bin/hiutil'``.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_codesign_path
|
|
|
|
|
|
|
|
|
|
The path to the :program:`codesign` program. Defaults to
|
|
|
|
|
``'/usr/bin/codesign'``.
|
|
|
|
|
|
|
|
|
|
.. confval:: applehelp_disable_external_tools
|
|
|
|
|
|
|
|
|
|
If ``True``, the builder will not run the indexer or the code signing tool,
|
|
|
|
|
no matter what other settings are specified.
|
|
|
|
|
|
|
|
|
|
This is mainly useful for testing, or where you want to run the Sphinx
|
|
|
|
|
build on a non-Mac OS X platform and then complete the final steps on OS X
|
|
|
|
|
for some reason.
|
|
|
|
|
|
|
|
|
|
Defaults to ``False``.
|
|
|
|
|
|
2015-01-14 06:45:04 -06:00
|
|
|
|
|
2009-12-28 10:09:09 -06:00
|
|
|
|
.. _epub-options:
|
|
|
|
|
|
|
|
|
|
Options for epub output
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
These options influence the epub output. As this builder derives from the HTML
|
|
|
|
|
builder, the HTML options also apply where appropriate. The actual values for
|
|
|
|
|
some of the options is not really important, they just have to be entered into
|
2009-12-28 10:09:09 -06:00
|
|
|
|
the `Dublin Core metadata <http://dublincore.org/>`_.
|
|
|
|
|
|
|
|
|
|
.. confval:: epub_basename
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
The basename for the epub file. It defaults to the :confval:`project` name.
|
|
|
|
|
|
|
|
|
|
.. confval:: epub_theme
|
|
|
|
|
|
|
|
|
|
The HTML theme for the epub output. Since the default themes are not
|
|
|
|
|
optimized for small screen space, using the same theme for HTML and epub
|
2018-03-31 07:18:55 -05:00
|
|
|
|
output is usually not wise. This defaults to ``'epub'``, a theme designed
|
|
|
|
|
to save visual space.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
2011-05-23 14:09:51 -05:00
|
|
|
|
.. confval:: epub_theme_options
|
|
|
|
|
|
|
|
|
|
A dictionary of options that influence the look and feel of the selected
|
|
|
|
|
theme. These are theme-specific. For the options understood by the builtin
|
|
|
|
|
themes, see :ref:`this section <builtin-themes>`.
|
|
|
|
|
|
2012-02-18 01:05:41 -06:00
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2009-12-28 10:09:09 -06:00
|
|
|
|
.. confval:: epub_title
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
The title of the document. It defaults to the :confval:`html_title` option
|
|
|
|
|
but can be set independently for epub creation.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
2016-09-30 10:17:19 -05:00
|
|
|
|
.. confval:: epub_description
|
2016-01-17 07:59:59 -06:00
|
|
|
|
|
2017-02-26 06:51:03 -06:00
|
|
|
|
The description of the document. The default value is ``'unknown'``.
|
2016-01-17 07:59:59 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
2016-09-30 10:17:19 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Renamed from ``epub3_description``
|
|
|
|
|
|
2009-12-28 10:09:09 -06:00
|
|
|
|
.. confval:: epub_author
|
|
|
|
|
|
2018-01-29 08:29:26 -06:00
|
|
|
|
The author of the document. This is put in the Dublin Core metadata. It
|
|
|
|
|
defaults to the :confval:`author` option.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
2016-09-30 10:17:19 -05:00
|
|
|
|
.. confval:: epub_contributor
|
2016-01-17 07:59:59 -06:00
|
|
|
|
|
|
|
|
|
The name of a person, organization, etc. that played a secondary role in
|
|
|
|
|
the creation of the content of an EPUB Publication. The default value is
|
|
|
|
|
``'unknown'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
2016-09-30 10:17:19 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Renamed from ``epub3_contributor``
|
|
|
|
|
|
2009-12-28 10:09:09 -06:00
|
|
|
|
.. confval:: epub_language
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
The language of the document. This is put in the Dublin Core metadata. The
|
|
|
|
|
default is the :confval:`language` option or ``'en'`` if unset.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_publisher
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The publisher of the document. This is put in the Dublin Core metadata.
|
|
|
|
|
You may use any sensible string, e.g. the project homepage. The defaults to
|
|
|
|
|
the :confval:`author` option.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_copyright
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
The copyright of the document. It defaults to the :confval:`copyright`
|
|
|
|
|
option but can be set independently for epub creation.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_identifier
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
An identifier for the document. This is put in the Dublin Core metadata.
|
|
|
|
|
For published documents this is the ISBN number, but you can also use an
|
|
|
|
|
alternative scheme, e.g. the project homepage. The default value is
|
|
|
|
|
``'unknown'``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_scheme
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
The publication scheme for the :confval:`epub_identifier`. This is put in
|
|
|
|
|
the Dublin Core metadata. For published books the scheme is ``'ISBN'``. If
|
|
|
|
|
you use the project homepage, ``'URL'`` seems reasonable. The default value
|
|
|
|
|
is ``'unknown'``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_uid
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
A unique identifier for the document. This is put in the Dublin Core
|
2017-06-29 11:21:16 -05:00
|
|
|
|
metadata. You may use a
|
2018-03-31 07:18:55 -05:00
|
|
|
|
`XML's Name format <https://www.w3.org/TR/REC-xml/#NT-NameStartChar>`_
|
|
|
|
|
string. You can't use hyphen, period, numbers as a first character. The
|
|
|
|
|
default value is ``'unknown'``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
2010-08-06 15:50:41 -05:00
|
|
|
|
.. confval:: epub_cover
|
|
|
|
|
|
|
|
|
|
The cover page information. This is a tuple containing the filenames of
|
|
|
|
|
the cover image and the html template. The rendered html cover page is
|
|
|
|
|
inserted as the first item in the spine in :file:`content.opf`. If the
|
|
|
|
|
template filename is empty, no html cover page is created. No cover at all
|
|
|
|
|
is created if the tuple is empty. Examples::
|
|
|
|
|
|
|
|
|
|
epub_cover = ('_static/cover.png', 'epub-cover.html')
|
|
|
|
|
epub_cover = ('_static/cover.png', '')
|
|
|
|
|
epub_cover = ()
|
|
|
|
|
|
|
|
|
|
The default value is ``()``.
|
|
|
|
|
|
2010-08-26 11:23:18 -05:00
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2018-02-11 08:14:54 -06:00
|
|
|
|
.. confval:: epub_css_files
|
|
|
|
|
|
|
|
|
|
A list of CSS files. The entry must be a *filename* string or a tuple
|
|
|
|
|
containing the *filename* string and the *attributes* dictionary. For more
|
|
|
|
|
information, see :confval:`html_css_files`.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
|
2012-02-28 14:59:57 -06:00
|
|
|
|
.. confval:: epub_guide
|
|
|
|
|
|
|
|
|
|
Meta data for the guide element of :file:`content.opf`. This is a
|
|
|
|
|
sequence of tuples containing the *type*, the *uri* and the *title* of
|
|
|
|
|
the optional guide information. See the OPF documentation
|
|
|
|
|
at `<http://idpf.org/epub>`_ for details. If possible, default entries
|
|
|
|
|
for the *cover* and *toc* types are automatically inserted. However,
|
2014-06-18 10:19:01 -05:00
|
|
|
|
the types can be explicitly overwritten if the default entries are not
|
2012-02-28 14:59:57 -06:00
|
|
|
|
appropriate. Example::
|
|
|
|
|
|
|
|
|
|
epub_guide = (('cover', 'cover.html', u'Cover Page'),)
|
|
|
|
|
|
|
|
|
|
The default value is ``()``.
|
|
|
|
|
|
2009-12-28 10:09:09 -06:00
|
|
|
|
.. confval:: epub_pre_files
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
Additional files that should be inserted before the text generated by
|
|
|
|
|
Sphinx. It is a list of tuples containing the file name and the title.
|
2010-08-05 16:08:55 -05:00
|
|
|
|
If the title is empty, no entry is added to :file:`toc.ncx`. Example::
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
epub_pre_files = [
|
2009-12-29 05:32:42 -06:00
|
|
|
|
('index.html', 'Welcome'),
|
2009-12-28 10:09:09 -06:00
|
|
|
|
]
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
The default value is ``[]``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_post_files
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
Additional files that should be inserted after the text generated by Sphinx.
|
2010-06-07 15:27:13 -05:00
|
|
|
|
It is a list of tuples containing the file name and the title. This option
|
2010-08-05 16:08:55 -05:00
|
|
|
|
can be used to add an appendix. If the title is empty, no entry is added
|
|
|
|
|
to :file:`toc.ncx`. The default value is ``[]``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
|
|
|
|
.. confval:: epub_exclude_files
|
|
|
|
|
|
2009-12-29 05:32:42 -06:00
|
|
|
|
A list of files that are generated/copied in the build directory but should
|
|
|
|
|
not be included in the epub file. The default value is ``[]``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
2010-01-09 04:19:41 -06:00
|
|
|
|
.. confval:: epub_tocdepth
|
|
|
|
|
|
|
|
|
|
The depth of the table of contents in the file :file:`toc.ncx`. It should
|
|
|
|
|
be an integer greater than zero. The default value is 3. Note: A deeply
|
|
|
|
|
nested table of contents may be difficult to navigate.
|
|
|
|
|
|
2010-07-10 09:33:43 -05:00
|
|
|
|
.. confval:: epub_tocdup
|
|
|
|
|
|
|
|
|
|
This flag determines if a toc entry is inserted again at the beginning of
|
2014-06-18 11:52:32 -05:00
|
|
|
|
its nested toc listing. This allows easier navigation to the top of
|
2014-06-18 10:19:01 -05:00
|
|
|
|
a chapter, but can be confusing because it mixes entries of different
|
2010-07-10 09:33:43 -05:00
|
|
|
|
depth in one list. The default value is ``True``.
|
2009-12-28 10:09:09 -06:00
|
|
|
|
|
2013-03-06 13:48:00 -06:00
|
|
|
|
.. confval:: epub_tocscope
|
|
|
|
|
|
|
|
|
|
This setting control the scope of the epub table of contents. The setting
|
|
|
|
|
can have the following values:
|
|
|
|
|
|
|
|
|
|
* ``'default'`` -- include all toc entries that are not hidden (default)
|
|
|
|
|
* ``'includehidden'`` -- include all toc entries
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
2011-01-04 14:41:05 -06:00
|
|
|
|
|
2011-02-27 15:02:30 -06:00
|
|
|
|
.. confval:: epub_fix_images
|
|
|
|
|
|
|
|
|
|
This flag determines if sphinx should try to fix image formats that are not
|
|
|
|
|
supported by some epub readers. At the moment palette images with a small
|
2014-12-03 08:13:21 -06:00
|
|
|
|
color table are upgraded. You need the Python Image Library (Pillow the
|
|
|
|
|
successor of the PIL) installed to use this option. The default value is
|
|
|
|
|
``False`` because the automatic conversion may lose information.
|
2011-02-27 15:02:30 -06:00
|
|
|
|
|
2012-02-18 01:05:41 -06:00
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2011-02-28 14:17:52 -06:00
|
|
|
|
.. confval:: epub_max_image_width
|
|
|
|
|
|
|
|
|
|
This option specifies the maximum width of images. If it is set to a value
|
|
|
|
|
greater than zero, images with a width larger than the given value are
|
|
|
|
|
scaled accordingly. If it is zero, no scaling is performed. The default
|
2014-12-03 08:13:21 -06:00
|
|
|
|
value is ``0``. You need the Python Image Library (Pillow) installed to use
|
2011-02-28 14:17:52 -06:00
|
|
|
|
this option.
|
|
|
|
|
|
2012-02-18 01:05:41 -06:00
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2013-02-06 08:32:12 -06:00
|
|
|
|
.. confval:: epub_show_urls
|
|
|
|
|
|
2013-02-09 08:01:42 -06:00
|
|
|
|
Control whether to display URL addresses. This is very useful for
|
|
|
|
|
readers that have no other means to display the linked URL. The
|
|
|
|
|
settings can have the following values:
|
2013-02-06 08:32:12 -06:00
|
|
|
|
|
2013-02-09 08:01:42 -06:00
|
|
|
|
* ``'inline'`` -- display URLs inline in parentheses (default)
|
2013-03-11 15:59:53 -05:00
|
|
|
|
* ``'footnote'`` -- display URLs in footnotes
|
2013-02-09 08:01:42 -06:00
|
|
|
|
* ``'no'`` -- do not display URLs
|
2013-02-06 08:32:12 -06:00
|
|
|
|
|
2013-06-06 14:53:59 -05:00
|
|
|
|
The display of inline URLs can be customized by adding CSS rules for the
|
|
|
|
|
class ``link-target``.
|
|
|
|
|
|
2013-02-09 10:44:56 -06:00
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2013-03-06 11:43:21 -06:00
|
|
|
|
.. confval:: epub_use_index
|
|
|
|
|
|
|
|
|
|
If true, add an index to the epub document. It defaults to the
|
|
|
|
|
:confval:`html_use_index` option but can be set independently for epub
|
|
|
|
|
creation.
|
2011-02-28 14:17:52 -06:00
|
|
|
|
|
2013-03-29 06:49:53 -05:00
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2016-09-30 10:17:19 -05:00
|
|
|
|
.. confval:: epub_writing_mode
|
2016-08-30 11:40:31 -05:00
|
|
|
|
|
|
|
|
|
It specifies writing direction. It can accept ``'horizontal'`` (default) and
|
|
|
|
|
``'vertical'``
|
|
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
:header-rows: 1
|
|
|
|
|
:stub-columns: 1
|
|
|
|
|
|
2016-09-30 10:17:19 -05:00
|
|
|
|
- * ``epub_writing_mode``
|
2016-08-30 11:40:31 -05:00
|
|
|
|
* ``'horizontal'``
|
|
|
|
|
* ``'vertical'``
|
|
|
|
|
- * writing-mode [#]_
|
|
|
|
|
* ``horizontal-tb``
|
|
|
|
|
* ``vertical-rl``
|
|
|
|
|
- * page progression
|
|
|
|
|
* left to right
|
|
|
|
|
* right to left
|
|
|
|
|
- * iBook's Scroll Theme support
|
|
|
|
|
* scroll-axis is vertical.
|
|
|
|
|
* scroll-axis is horizontal.
|
|
|
|
|
|
|
|
|
|
.. [#] https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-03-16 06:19:26 -05:00
|
|
|
|
.. _latex-options:
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
Options for LaTeX output
|
|
|
|
|
------------------------
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
These options influence LaTeX output. Refer to :doc:`/latex` for more
|
|
|
|
|
information.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2016-07-12 23:25:12 -05:00
|
|
|
|
.. confval:: latex_engine
|
|
|
|
|
|
|
|
|
|
The LaTeX engine to build the docs. The setting can have the following
|
|
|
|
|
values:
|
|
|
|
|
|
2016-10-26 15:56:58 -05:00
|
|
|
|
* ``'pdflatex'`` -- PDFLaTeX (default)
|
|
|
|
|
* ``'xelatex'`` -- XeLaTeX
|
|
|
|
|
* ``'lualatex'`` -- LuaLaTeX
|
|
|
|
|
* ``'platex'`` -- pLaTeX (default if :confval:`language` is ``'ja'``)
|
2016-07-12 23:25:12 -05:00
|
|
|
|
|
2017-10-22 04:45:28 -05:00
|
|
|
|
PDFLaTeX's support for Unicode characters covers those from the document
|
|
|
|
|
language (the LaTeX ``babel`` and ``inputenc`` packages map them to glyph
|
|
|
|
|
slots in the document font, at various encodings allowing each only 256
|
|
|
|
|
characters; Sphinx uses by default (except for Cyrillic languages) the
|
|
|
|
|
``times`` package), but stray characters from other scripts or special
|
|
|
|
|
symbols may require adding extra LaTeX packages or macros to the LaTeX
|
|
|
|
|
preamble.
|
|
|
|
|
|
|
|
|
|
If your project uses such extra Unicode characters, switching the engine to
|
2018-08-02 03:06:31 -05:00
|
|
|
|
XeLaTeX or LuaLaTeX and setting up the document to use an OpenType font
|
|
|
|
|
with wide-enough glyph coverage is often easier than sticking with PDFLaTeX
|
|
|
|
|
and trying to get it to work with the Unicode characters.
|
|
|
|
|
|
|
|
|
|
The :confval:`latex_elements` ``'fontpkg'`` key allows to set up the
|
|
|
|
|
document fonts, see :ref:`this example <latex-basic>`. Currently, for
|
|
|
|
|
XeLaTeX and LuaLaTeX, Sphinx leaves this key empty and LaTeX then defaults
|
|
|
|
|
to the `Latin Modern`_ font family (from the TeX distribution fonts). This
|
|
|
|
|
font family provides good coverage of Latin scripts (European languages,
|
|
|
|
|
Vietnamese) but Cyrillic requires some other OpenType font; for example
|
|
|
|
|
Computer Modern Unicode (see `babel-russian`_ documentation on how to load
|
|
|
|
|
it in the LaTeX document). In future, it is planned Sphinx will provide
|
|
|
|
|
another default choice of OpenType font than `Latin Modern`_, perhaps
|
|
|
|
|
`Libertinus`_, which is included in recent TeX distributions and supports
|
|
|
|
|
Latin and Cyrillic and also has an accompanying math font.
|
|
|
|
|
|
|
|
|
|
With XeLaTeX and LuaLaTeX, Sphinx configures the LaTeX document to use
|
|
|
|
|
`polyglossia`_. For some languages the `babel`_ support appears
|
|
|
|
|
preferable; Sphinx uses currently `babel`_ for French and perhaps will also
|
|
|
|
|
for some more languages in future. One can use the
|
|
|
|
|
:confval:`latex_elements` ``'babel'`` key to override Sphinx's default.
|
|
|
|
|
|
|
|
|
|
.. _`Latin Modern`: http://www.gust.org.pl/projects/e-foundry/latin-modern
|
|
|
|
|
.. _`polyglossia`: https://ctan.org/pkg/polyglossia
|
|
|
|
|
.. _`babel`: https://ctan.org/pkg/babel
|
|
|
|
|
.. _`babel-russian`: https://ctan.org/pkg/babel-russian
|
|
|
|
|
.. _`Libertinus`: https://ctan.org/pkg/libertinus
|
2017-10-22 04:45:28 -05:00
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: latex_documents
|
|
|
|
|
|
2008-03-18 13:19:21 -05:00
|
|
|
|
This value determines how to group the document tree into LaTeX source files.
|
|
|
|
|
It must be a list of tuples ``(startdocname, targetname, title, author,
|
2008-05-04 16:35:03 -05:00
|
|
|
|
documentclass, toctree_only)``, where the items are:
|
2008-03-18 13:19:21 -05:00
|
|
|
|
|
2018-07-01 09:10:51 -05:00
|
|
|
|
*startdocname*
|
2018-07-19 14:10:16 -05:00
|
|
|
|
String that specifies the :term:`document name` of the LaTeX file's master
|
|
|
|
|
document. All documents referenced by the *startdoc* document in TOC trees
|
2018-07-01 09:10:51 -05:00
|
|
|
|
will be included in the LaTeX file. (If you want to use the default master
|
|
|
|
|
document for your LaTeX build, provide your :confval:`master_doc` here.)
|
|
|
|
|
|
|
|
|
|
*targetname*
|
|
|
|
|
File name of the LaTeX file in the output directory.
|
|
|
|
|
|
|
|
|
|
*title*
|
2018-07-19 14:10:16 -05:00
|
|
|
|
LaTeX document title. Can be empty to use the title of the *startdoc*
|
|
|
|
|
document. This is inserted as LaTeX markup, so special characters like a
|
2008-10-16 14:37:57 -05:00
|
|
|
|
backslash or ampersand must be represented by the proper LaTeX commands if
|
|
|
|
|
they are to be inserted literally.
|
2018-07-01 09:10:51 -05:00
|
|
|
|
|
2018-07-19 14:10:16 -05:00
|
|
|
|
*author*
|
|
|
|
|
Author for the LaTeX document. The same LaTeX markup caveat as for *title*
|
|
|
|
|
applies. Use ``\\and`` to separate multiple authors, as in:
|
|
|
|
|
``'John \\and Sarah'`` (backslashes must be Python-escaped to reach LaTeX).
|
2018-07-01 09:10:51 -05:00
|
|
|
|
|
|
|
|
|
*documentclass*
|
2018-07-19 14:10:16 -05:00
|
|
|
|
Normally, one of ``'manual'`` or ``'howto'`` (provided by Sphinx and based
|
|
|
|
|
on ``'report'``, resp. ``'article'``; Japanese documents use ``'jsbook'``,
|
|
|
|
|
resp. ``'jreport'``.) "howto" (non-Japanese) documents will not get
|
|
|
|
|
appendices. Also they have a simpler title page. Other document classes
|
|
|
|
|
can be given. Independently of the document class, the "sphinx" package is
|
|
|
|
|
always loaded in order to define Sphinx's custom LaTeX commands.
|
2013-09-23 06:54:18 -05:00
|
|
|
|
|
2018-07-01 09:10:51 -05:00
|
|
|
|
*toctree_only*
|
2018-07-19 14:10:16 -05:00
|
|
|
|
Must be ``True`` or ``False``. If true, the *startdoc* document itself is
|
|
|
|
|
not included in the output, only the documents referenced by it via TOC
|
|
|
|
|
trees. With this option, you can put extra stuff in the master document
|
|
|
|
|
that shows up in the HTML, but not the LaTeX output.
|
2008-05-04 16:35:03 -05:00
|
|
|
|
|
2013-09-23 06:54:18 -05:00
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
In the past including your own document class required you to prepend the
|
|
|
|
|
document class name with the string "sphinx". This is not necessary
|
|
|
|
|
anymore.
|
|
|
|
|
|
2008-05-04 16:35:03 -05:00
|
|
|
|
.. versionadded:: 0.3
|
|
|
|
|
The 6th item ``toctree_only``. Tuples with 5 items are still accepted.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2008-04-27 14:43:45 -05:00
|
|
|
|
.. confval:: latex_logo
|
|
|
|
|
|
|
|
|
|
If given, this must be the name of an image file (relative to the
|
2008-05-02 05:32:08 -05:00
|
|
|
|
configuration directory) that is the logo of the docs. It is placed at the
|
|
|
|
|
top of the title page. Default: ``None``.
|
2008-04-27 14:43:45 -05:00
|
|
|
|
|
2016-02-23 10:30:17 -06:00
|
|
|
|
.. confval:: latex_toplevel_sectioning
|
|
|
|
|
|
|
|
|
|
This value determines the topmost sectioning unit. It should be chosen from
|
2017-12-18 04:15:51 -06:00
|
|
|
|
``'part'``, ``'chapter'`` or ``'section'``. The default is ``None``;
|
|
|
|
|
the topmost
|
|
|
|
|
sectioning unit is switched by documentclass: ``section`` is used if
|
2016-02-23 10:30:17 -06:00
|
|
|
|
documentclass will be ``howto``, otherwise ``chapter`` will be used.
|
|
|
|
|
|
2017-12-18 04:15:51 -06:00
|
|
|
|
Note that if LaTeX uses ``\part`` command, then the numbering of sectioning
|
|
|
|
|
units one level deep gets off-sync with HTML numbering, because LaTeX
|
|
|
|
|
numbers continuously ``\chapter`` (or ``\section`` for ``howto``.)
|
|
|
|
|
|
2016-02-23 10:30:17 -06:00
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
2008-03-09 16:32:24 -05:00
|
|
|
|
.. confval:: latex_appendices
|
|
|
|
|
|
2008-06-17 02:46:33 -05:00
|
|
|
|
A list of document names to append as an appendix to all manuals.
|
2008-03-09 16:32:24 -05:00
|
|
|
|
|
2010-02-19 18:13:23 -06:00
|
|
|
|
.. confval:: latex_domain_indices
|
|
|
|
|
|
|
|
|
|
If true, generate domain-specific indices in addition to the general index.
|
|
|
|
|
For e.g. the Python domain, this is the global module index. Default is
|
|
|
|
|
``True``.
|
|
|
|
|
|
|
|
|
|
This value can be a bool or a list of index names that should be generated,
|
|
|
|
|
like for :confval:`html_domain_indices`.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2010-05-24 08:59:05 -05:00
|
|
|
|
.. confval:: latex_show_pagerefs
|
|
|
|
|
|
|
|
|
|
If true, add page references after internal references. This is very useful
|
|
|
|
|
for printed copies of the manual. Default is ``False``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
|
|
|
|
.. confval:: latex_show_urls
|
|
|
|
|
|
2011-01-06 11:29:37 -06:00
|
|
|
|
Control whether to display URL addresses. This is very useful for printed
|
|
|
|
|
copies of the manual. The setting can have the following values:
|
|
|
|
|
|
|
|
|
|
* ``'no'`` -- do not display URLs (default)
|
|
|
|
|
* ``'footnote'`` -- display URLs in footnotes
|
|
|
|
|
* ``'inline'`` -- display URLs inline in parentheses
|
2010-05-24 08:59:05 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
2011-01-06 11:29:37 -06:00
|
|
|
|
.. versionchanged:: 1.1
|
|
|
|
|
This value is now a string; previously it was a boolean value, and a true
|
|
|
|
|
value selected the ``'inline'`` display. For backwards compatibility,
|
|
|
|
|
``True`` is still accepted.
|
2010-05-24 08:59:05 -05:00
|
|
|
|
|
2017-02-20 08:54:00 -06:00
|
|
|
|
.. confval:: latex_use_latex_multicolumn
|
|
|
|
|
|
2017-05-11 03:24:10 -05:00
|
|
|
|
The default is ``False``: it means that Sphinx's own macros are used for
|
|
|
|
|
merged cells from grid tables. They allow general contents (literal blocks,
|
|
|
|
|
lists, blockquotes, ...) but may have problems if the
|
|
|
|
|
:rst:dir:`tabularcolumns` directive was used to inject LaTeX mark-up of the
|
|
|
|
|
type ``>{..}``, ``<{..}``, ``@{..}`` as column specification.
|
|
|
|
|
|
|
|
|
|
Setting to ``True`` means to use LaTeX's standard ``\multicolumn``; this is
|
|
|
|
|
incompatible with literal blocks in the horizontally merged cell, and also
|
2017-05-11 03:25:49 -05:00
|
|
|
|
with multiple paragraphs in such cell if the table is rendered using
|
2017-05-11 03:24:10 -05:00
|
|
|
|
``tabulary``.
|
2017-02-20 08:54:00 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6
|
|
|
|
|
|
2018-06-30 16:37:26 -05:00
|
|
|
|
.. confval:: latex_use_xindy
|
|
|
|
|
|
2018-07-06 12:05:38 -05:00
|
|
|
|
If ``True``, the PDF build from the LaTeX files created by Sphinx
|
|
|
|
|
will use :program:`xindy` (doc__) rather than :program:`makeindex`
|
|
|
|
|
for preparing the index of general terms (from :rst:dir:`index`
|
|
|
|
|
usage). This means that words with UTF-8 characters will get
|
|
|
|
|
ordered correctly for the :confval:`language`.
|
2018-06-30 16:37:26 -05:00
|
|
|
|
|
|
|
|
|
__ http://xindy.sourceforge.net/
|
|
|
|
|
|
2018-07-06 12:05:38 -05:00
|
|
|
|
- This option is ignored if :confval:`latex_engine` is ``'platex'``
|
2018-07-26 07:07:21 -05:00
|
|
|
|
(Japanese documents; :program:`mendex` replaces :program:`makeindex`
|
|
|
|
|
then).
|
2018-07-06 12:05:38 -05:00
|
|
|
|
|
|
|
|
|
- The default is ``True`` for ``'xelatex'`` or ``'lualatex'`` as
|
|
|
|
|
:program:`makeindex`, if any indexed term starts with a non-ascii
|
2018-07-26 07:07:21 -05:00
|
|
|
|
character, creates ``.ind`` files containing invalid bytes for
|
2018-07-06 12:05:38 -05:00
|
|
|
|
UTF-8 encoding. With ``'lualatex'`` this then breaks the PDF
|
2018-07-26 07:07:21 -05:00
|
|
|
|
build.
|
2018-07-06 12:05:38 -05:00
|
|
|
|
|
|
|
|
|
- The default is ``False`` for ``'pdflatex'`` but ``True`` is
|
|
|
|
|
recommended for non-English documents as soon as some indexed
|
|
|
|
|
terms use non-ascii characters from the language script.
|
|
|
|
|
|
2018-07-26 07:07:21 -05:00
|
|
|
|
Sphinx adds to :program:`xindy` base distribution some dedicated support
|
|
|
|
|
for using ``'pdflatex'`` engine with Cyrillic scripts. And whether with
|
|
|
|
|
``'pdflatex'`` or Unicode engines, Cyrillic documents handle correctly the
|
|
|
|
|
indexing of Latin names, even with diacritics.
|
2018-06-30 16:37:26 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
.. confval:: latex_elements
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
|
|
|
|
|
A dictionary that contains LaTeX snippets that override those Sphinx usually
|
|
|
|
|
puts into the generated ``.tex`` files.
|
2008-03-18 14:54:45 -05:00
|
|
|
|
|
2008-06-17 02:46:33 -05:00
|
|
|
|
Keep in mind that backslashes must be doubled in Python string literals to
|
|
|
|
|
avoid interpretation as escape sequences.
|
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
* Keys that you may want to override include:
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'papersize'``
|
|
|
|
|
Paper size option of the document class (``'a4paper'`` or
|
|
|
|
|
``'letterpaper'``), default ``'letterpaper'``.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'pointsize'``
|
|
|
|
|
Point size option of the document class (``'10pt'``, ``'11pt'`` or
|
|
|
|
|
``'12pt'``), default ``'10pt'``.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2016-06-25 03:32:48 -05:00
|
|
|
|
``'pxunit'``
|
|
|
|
|
the value of the ``px`` when used in image attributes ``width`` and
|
2017-02-09 07:13:09 -06:00
|
|
|
|
``height``. The default value is ``'0.75bp'`` which achieves
|
2017-02-09 07:36:01 -06:00
|
|
|
|
``96px=1in`` (in TeX ``1in = 72bp = 72.27pt``.) To obtain for
|
2017-02-09 07:45:43 -06:00
|
|
|
|
example ``100px=1in`` use ``'0.01in'`` or ``'0.7227pt'`` (the latter
|
|
|
|
|
leads to TeX computing a more precise value, due to the smaller unit
|
2018-03-31 07:18:55 -05:00
|
|
|
|
used in the specification); for ``72px=1in``, simply use ``'1bp'``; for
|
|
|
|
|
``90px=1in``, use ``'0.8bp'`` or ``'0.803pt'``.
|
2016-06-03 16:44:31 -05:00
|
|
|
|
|
2016-10-27 13:24:33 -05:00
|
|
|
|
.. versionadded:: 1.5
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2016-11-05 10:58:01 -05:00
|
|
|
|
``'sphinxsetup'``
|
2016-10-27 13:24:33 -05:00
|
|
|
|
A comma separated list of ``key=value`` package options for the Sphinx
|
2018-03-31 07:18:55 -05:00
|
|
|
|
LaTeX style, default empty. See :doc:`/latex`.
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2016-10-07 16:25:04 -05:00
|
|
|
|
.. versionadded:: 1.5
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2016-10-11 11:57:46 -05:00
|
|
|
|
``'passoptionstopackages'``
|
2016-10-27 13:24:33 -05:00
|
|
|
|
A string which will be positioned early in the preamble, designed to
|
|
|
|
|
contain ``\\PassOptionsToPackage{options}{foo}`` commands. Default empty.
|
2016-10-11 11:57:46 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'babel'``
|
2016-11-06 01:42:45 -06:00
|
|
|
|
"babel" package inclusion, default ``'\\usepackage{babel}'`` (the
|
|
|
|
|
suitable document language string is passed as class option, and
|
|
|
|
|
``english`` is used if no language.) For Japanese documents, the
|
|
|
|
|
default is the empty string.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
For :confval:`latex_engine` set to ``'xelatex'``, the default
|
|
|
|
|
is ``'\\usepackage{polyglossia}\n\\setmainlanguage{<language>}'``.
|
2017-02-25 17:13:06 -06:00
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
``'lualatex'`` uses same default setting as ``'xelatex'``
|
2018-08-02 05:46:33 -05:00
|
|
|
|
.. versionchanged:: 1.7.6
|
|
|
|
|
For French, ``xelatex`` and ``lualatex`` default to using
|
|
|
|
|
``babel``, not ``polyglossia``.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'fontpkg'``
|
|
|
|
|
Font package inclusion, default ``'\\usepackage{times}'`` (which uses
|
2018-03-30 03:30:05 -05:00
|
|
|
|
Times for text, Helvetica for sans serif and Courier for code-blocks).
|
|
|
|
|
|
2013-02-22 02:16:02 -06:00
|
|
|
|
.. versionchanged:: 1.2
|
|
|
|
|
Defaults to ``''`` when the :confval:`language` uses the Cyrillic
|
|
|
|
|
script.
|
2016-11-06 02:07:03 -06:00
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Defaults to ``''`` when :confval:`latex_engine` is ``'xelatex'``.
|
2017-02-25 17:13:06 -06:00
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
Defaults to ``''`` also with ``'lualatex'``.
|
2018-07-31 09:54:25 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'fncychap'``
|
|
|
|
|
Inclusion of the "fncychap" package (which makes fancy chapter titles),
|
2016-10-07 04:41:26 -05:00
|
|
|
|
default ``'\\usepackage[Bjarne]{fncychap}'`` for English documentation
|
|
|
|
|
(this option is slightly customized by Sphinx),
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'\\usepackage[Sonny]{fncychap}'`` for internationalized docs (because
|
|
|
|
|
the "Bjarne" style uses numbers spelled out in English). Other
|
2016-10-13 16:21:05 -05:00
|
|
|
|
"fncychap" styles you can try are "Lenny", "Glenn", "Conny", "Rejne" and
|
|
|
|
|
"Bjornstrup". You can also set this to ``''`` to disable fncychap.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'preamble'``
|
2018-03-31 07:18:55 -05:00
|
|
|
|
Additional preamble content, default empty. See :doc:`/latex`.
|
|
|
|
|
|
2016-11-06 03:11:40 -06:00
|
|
|
|
``'atendofbody'``
|
|
|
|
|
Additional document content (right before the indices), default empty.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2014-02-20 11:03:34 -06:00
|
|
|
|
``'figure_align'``
|
|
|
|
|
Latex figure float alignment, default 'htbp' (here, top, bottom, page).
|
2014-06-18 10:19:01 -05:00
|
|
|
|
Whenever an image doesn't fit into the current page, it will be
|
|
|
|
|
'floated' into the next page but may be preceded by any other text.
|
2014-02-20 11:03:34 -06:00
|
|
|
|
If you don't like this behavior, use 'H' which will disable floating
|
|
|
|
|
and position figures strictly in the order they appear in the source.
|
2015-12-03 08:31:54 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2013-02-10 08:02:21 -06:00
|
|
|
|
``'footer'``
|
2008-09-16 02:00:19 -05:00
|
|
|
|
Additional footer content (before the indices), default empty.
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2016-09-17 07:06:25 -05:00
|
|
|
|
.. deprecated:: 1.5
|
2016-11-06 04:30:30 -06:00
|
|
|
|
Use ``'atendofbody'`` key instead.
|
2016-09-17 07:06:25 -05:00
|
|
|
|
|
2017-02-09 06:47:46 -06:00
|
|
|
|
* Keys that don't need to be overridden unless in special cases are:
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2017-02-28 05:43:36 -06:00
|
|
|
|
``'extraclassoptions'``
|
|
|
|
|
The default is the empty string. Example: ``'extraclassoptions':
|
|
|
|
|
'openany'`` will allow chapters (for documents of the ``'manual'``
|
|
|
|
|
type) to start on any page.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
Added this documentation.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2016-10-25 12:28:07 -05:00
|
|
|
|
``'maxlistdepth'``
|
2016-10-27 02:23:40 -05:00
|
|
|
|
LaTeX allows by default at most 6 levels for nesting list and
|
|
|
|
|
quote-like environments, with at most 4 enumerated lists, and 4 bullet
|
|
|
|
|
lists. Setting this key for example to ``'10'`` (as a string) will
|
|
|
|
|
allow up to 10 nested levels (of all sorts). Leaving it to the empty
|
|
|
|
|
string means to obey the LaTeX default.
|
2016-10-25 12:28:07 -05:00
|
|
|
|
|
2016-10-27 02:23:40 -05:00
|
|
|
|
.. warning::
|
2016-10-25 12:28:07 -05:00
|
|
|
|
|
2016-10-27 02:23:40 -05:00
|
|
|
|
- Using this key may prove incompatible with some LaTeX packages
|
|
|
|
|
or special document classes which do their own list customization.
|
2016-10-25 12:28:07 -05:00
|
|
|
|
|
2016-11-05 05:11:51 -05:00
|
|
|
|
- The key setting is silently *ignored* if ``\usepackage{enumitem}``
|
|
|
|
|
is executed inside the document preamble. Use then rather the
|
|
|
|
|
dedicated commands of this LaTeX package.
|
2016-10-25 12:28:07 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'inputenc'``
|
2016-05-28 12:26:45 -05:00
|
|
|
|
"inputenc" package inclusion, defaults to
|
|
|
|
|
``'\\usepackage[utf8]{inputenc}'`` when using pdflatex.
|
2016-11-05 05:06:49 -05:00
|
|
|
|
Otherwise empty.
|
2016-05-28 12:26:45 -05:00
|
|
|
|
|
2016-05-30 20:07:03 -05:00
|
|
|
|
.. versionchanged:: 1.4.3
|
2016-05-28 12:26:45 -05:00
|
|
|
|
Previously ``'\\usepackage[utf8]{inputenc}'`` was used for all
|
|
|
|
|
compilers.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2013-02-10 08:02:21 -06:00
|
|
|
|
``'cmappkg'``
|
|
|
|
|
"cmap" package inclusion, default ``'\\usepackage{cmap}'``.
|
2013-02-10 23:11:18 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'fontenc'``
|
|
|
|
|
"fontenc" package inclusion, default ``'\\usepackage[T1]{fontenc}'``.
|
2016-11-06 02:07:03 -06:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Defaults to ``'\\usepackage{fontspec}'`` when
|
|
|
|
|
:confval:`latex_engine` is ``'xelatex'``.
|
2017-02-25 17:13:06 -06:00
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
``'lualatex'`` also uses ``fontspec`` per default.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2017-02-09 06:47:46 -06:00
|
|
|
|
``'geometry'``
|
|
|
|
|
"geometry" package inclusion, the default definition is:
|
|
|
|
|
|
|
|
|
|
``'\\usepackage{geometry}'``
|
|
|
|
|
|
|
|
|
|
with an additional ``[dvipdfm]`` for Japanese documents.
|
|
|
|
|
The Sphinx LaTeX style file executes:
|
|
|
|
|
|
|
|
|
|
``\PassOptionsToPackage{hmargin=1in,vmargin=1in,marginpar=0.5in}{geometry}``
|
|
|
|
|
|
|
|
|
|
which can be customized via corresponding :ref:`'sphinxsetup' options
|
|
|
|
|
<latexsphinxsetup>`.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5.2
|
|
|
|
|
``dvipdfm`` option if :confval:`latex_engine` is ``'platex'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5.3
|
|
|
|
|
The :ref:`'sphinxsetup' keys for the margins
|
|
|
|
|
<latexsphinxsetuphmargin>`.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5.3
|
|
|
|
|
The location in the LaTeX file has been moved to after
|
|
|
|
|
``\usepackage{sphinx}`` and ``\sphinxsetup{..}``, hence also after
|
|
|
|
|
insertion of ``'fontpkg'`` key. This is in order to handle the paper
|
|
|
|
|
layout options in a special way for Japanese documents: the text
|
|
|
|
|
width will be set to an integer multiple of the *zenkaku* width, and
|
|
|
|
|
the text height to an integer multiple of the baseline. See the
|
|
|
|
|
:ref:`hmargin <latexsphinxsetuphmargin>` documentation for more.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2016-10-11 11:57:46 -05:00
|
|
|
|
``'hyperref'``
|
|
|
|
|
"hyperref" package inclusion; also loads package "hypcap" and issues
|
|
|
|
|
``\urlstyle{same}``. This is done after :file:`sphinx.sty` file is
|
|
|
|
|
loaded and before executing the contents of ``'preamble'`` key.
|
|
|
|
|
|
|
|
|
|
.. attention::
|
|
|
|
|
|
|
|
|
|
Loading of packages "hyperref" and "hypcap" is mandatory.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
Previously this was done from inside :file:`sphinx.sty`.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'maketitle'``
|
2016-10-11 13:42:58 -05:00
|
|
|
|
"maketitle" call, default ``'\\maketitle'`` (but it has been
|
|
|
|
|
redefined by the Sphinx ``manual`` and ``howto`` classes.) Override
|
2018-03-31 07:18:55 -05:00
|
|
|
|
if you want to generate a differently-styled title page.
|
|
|
|
|
|
2015-07-25 05:00:47 -05:00
|
|
|
|
``'releasename'``
|
|
|
|
|
value that prefixes ``'release'`` element on title page, default
|
2017-02-05 16:13:17 -06:00
|
|
|
|
``'Release'``. As for *title* and *author* used in the tuples of
|
|
|
|
|
:confval:`latex_documents`, it is inserted as LaTeX markup.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'tableofcontents'``
|
2016-10-11 13:42:58 -05:00
|
|
|
|
"tableofcontents" call, default ``'\\sphinxtableofcontents'`` (it is a
|
2016-10-11 13:55:00 -05:00
|
|
|
|
wrapper of unmodified ``\tableofcontents``, which may itself be
|
|
|
|
|
customized by user loaded packages.)
|
2016-10-11 13:42:58 -05:00
|
|
|
|
Override if
|
2008-09-16 02:00:19 -05:00
|
|
|
|
you want to generate a different table of contents or put content
|
|
|
|
|
between the title page and the TOC.
|
2016-10-14 04:14:15 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
Previously the meaning of ``\tableofcontents`` itself was modified
|
|
|
|
|
by Sphinx. This created an incompatibility with dedicated packages
|
|
|
|
|
modifying it also such as "tocloft" or "etoc".
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2013-02-20 15:11:45 -06:00
|
|
|
|
``'transition'``
|
|
|
|
|
Commands used to display transitions, default
|
2017-02-28 03:00:41 -06:00
|
|
|
|
``'\n\n\\bigskip\\hrule\\bigskip\n\n'``. Override if you want to
|
2013-02-20 15:11:45 -06:00
|
|
|
|
display transitions differently.
|
2013-02-22 02:16:02 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
2017-02-28 03:00:41 -06:00
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
Remove unneeded ``{}`` after ``\\hrule``.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2008-09-16 02:00:19 -05:00
|
|
|
|
``'printindex'``
|
|
|
|
|
"printindex" call, the last thing in the file, default
|
|
|
|
|
``'\\printindex'``. Override if you want to generate the index
|
2016-10-14 04:21:18 -05:00
|
|
|
|
differently or append some content after the index. For example
|
|
|
|
|
``'\\footnotesize\\raggedright\\printindex'`` is advisable when the
|
|
|
|
|
index is full of long entries.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2018-03-28 16:15:03 -05:00
|
|
|
|
``'fvset'``
|
2018-07-31 09:54:25 -05:00
|
|
|
|
Customization of ``fancyvrb`` LaTeX package. Currently, Sphinx uses
|
|
|
|
|
this key to set the fontsize in code-blocks according to the
|
|
|
|
|
:confval:`latex_engine`.
|
|
|
|
|
|
2018-07-31 10:11:59 -05:00
|
|
|
|
- ``'pdflatex'`` uses ``'fvset': '\\fvset{fontsize=\\small}'``,
|
2018-07-31 09:54:25 -05:00
|
|
|
|
to mitigate the size difference between the default monospaced font
|
|
|
|
|
(Courier) and the default text font (Times). You may need to modify
|
|
|
|
|
this if you use custom fonts.
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2018-07-31 09:54:25 -05:00
|
|
|
|
- ``'xelatex'`` and ``'lualatex'`` use ``'\\fvset{fontsize=auto}'``,
|
|
|
|
|
as there is no size difference between the regular and the
|
2018-07-31 10:11:59 -05:00
|
|
|
|
monospaced fonts used by default by Sphinx with these engines.
|
2018-03-28 16:15:03 -05:00
|
|
|
|
|
2018-03-29 08:22:34 -05:00
|
|
|
|
.. versionadded:: 1.8
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2014-06-18 10:53:25 -05:00
|
|
|
|
* Keys that are set by other options and therefore should not be overridden
|
|
|
|
|
are:
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2008-09-12 08:08:52 -05:00
|
|
|
|
``'docclass'``
|
|
|
|
|
``'classoptions'``
|
|
|
|
|
``'title'``
|
|
|
|
|
``'date'``
|
|
|
|
|
``'release'``
|
|
|
|
|
``'author'``
|
|
|
|
|
``'logo'``
|
|
|
|
|
``'makeindex'``
|
2009-01-10 14:54:26 -06:00
|
|
|
|
|
2009-06-04 10:50:37 -05:00
|
|
|
|
.. confval:: latex_docclass
|
|
|
|
|
|
|
|
|
|
A dictionary mapping ``'howto'`` and ``'manual'`` to names of real document
|
|
|
|
|
classes that will be used as the base for the two Sphinx classes. Default
|
|
|
|
|
is to use ``'article'`` for ``'howto'`` and ``'report'`` for ``'manual'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2016-07-04 21:24:46 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
|
2016-10-26 16:16:15 -05:00
|
|
|
|
In Japanese docs (:confval:`language` is ``'ja'``), by default
|
|
|
|
|
``'jreport'`` is used for ``'howto'`` and ``'jsbook'`` for ``'manual'``.
|
2016-07-04 21:24:46 -05:00
|
|
|
|
|
2009-02-20 04:20:15 -06:00
|
|
|
|
.. confval:: latex_additional_files
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A list of file names, relative to the configuration directory, to copy to
|
|
|
|
|
the build directory when building LaTeX output. This is useful to copy
|
|
|
|
|
files that Sphinx doesn't copy automatically, e.g. if they are referenced in
|
|
|
|
|
custom LaTeX added in ``latex_elements``. Image files that are referenced
|
|
|
|
|
in source files (e.g. via ``.. image::``) are copied automatically.
|
2009-02-20 04:20:15 -06:00
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
You have to make sure yourself that the filenames don't collide with those
|
|
|
|
|
of any automatically copied files.
|
2009-02-20 04:20:15 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
|
|
2013-03-06 20:05:33 -06:00
|
|
|
|
.. versionchanged:: 1.2
|
2018-03-31 07:18:55 -05:00
|
|
|
|
This overrides the files which is provided from Sphinx such as
|
|
|
|
|
``sphinx.sty``.
|
2013-03-05 07:17:05 -06:00
|
|
|
|
|
2010-01-06 08:48:39 -06:00
|
|
|
|
|
2011-01-04 14:41:05 -06:00
|
|
|
|
.. _text-options:
|
|
|
|
|
|
|
|
|
|
Options for text output
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
These options influence text output.
|
|
|
|
|
|
|
|
|
|
.. confval:: text_newlines
|
|
|
|
|
|
|
|
|
|
Determines which end-of-line character(s) are used in text output.
|
|
|
|
|
|
|
|
|
|
* ``'unix'``: use Unix-style line endings (``\n``)
|
|
|
|
|
* ``'windows'``: use Windows-style line endings (``\r\n``)
|
|
|
|
|
* ``'native'``: use the line ending style of the platform the documentation
|
|
|
|
|
is built on
|
|
|
|
|
|
|
|
|
|
Default: ``'unix'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
|
|
|
|
.. confval:: text_sectionchars
|
|
|
|
|
|
|
|
|
|
A string of 7 characters that should be used for underlining sections.
|
|
|
|
|
The first character is used for first-level headings, the second for
|
|
|
|
|
second-level headings and so on.
|
|
|
|
|
|
|
|
|
|
The default is ``'*=-~"+`'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2017-11-05 16:47:57 -06:00
|
|
|
|
.. confval:: text_add_secnumbers
|
|
|
|
|
|
|
|
|
|
A boolean that decides whether section numbers are included in text output.
|
2018-01-14 09:37:32 -06:00
|
|
|
|
Default is ``True``.
|
2017-11-05 16:47:57 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.7
|
|
|
|
|
|
|
|
|
|
.. confval:: text_secnumber_suffix
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
Suffix for section numbers in text output. Default: ``". "``. Set to
|
|
|
|
|
``" "`` to suppress the final dot on section numbers.
|
2017-11-05 16:47:57 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.7
|
|
|
|
|
|
2011-01-04 14:41:05 -06:00
|
|
|
|
|
2010-02-21 04:50:08 -06:00
|
|
|
|
.. _man-options:
|
|
|
|
|
|
|
|
|
|
Options for manual page output
|
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
|
|
These options influence manual page output.
|
|
|
|
|
|
|
|
|
|
.. confval:: man_pages
|
|
|
|
|
|
|
|
|
|
This value determines how to group the document tree into manual pages. It
|
|
|
|
|
must be a list of tuples ``(startdocname, name, description, authors,
|
|
|
|
|
section)``, where the items are:
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
*startdocname*
|
2018-07-19 14:10:16 -05:00
|
|
|
|
String that specifies the :term:`document name` of the manual page's master
|
|
|
|
|
document. All documents referenced by the *startdoc* document in TOC trees
|
|
|
|
|
will be included in the manual file. (If you want to use the default
|
|
|
|
|
master document for your manual pages build, use your :confval:`master_doc`
|
|
|
|
|
here.)
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
|
|
|
|
*name*
|
|
|
|
|
Name of the manual page. This should be a short string without spaces or
|
|
|
|
|
special characters. It is used to determine the file name as well as the
|
|
|
|
|
name of the manual page (in the NAME section).
|
|
|
|
|
|
|
|
|
|
*description*
|
|
|
|
|
Description of the manual page. This is used in the NAME section.
|
|
|
|
|
|
|
|
|
|
*authors*
|
|
|
|
|
A list of strings with authors, or a single string. Can be an empty
|
|
|
|
|
string or list if you do not want to automatically generate an AUTHORS
|
|
|
|
|
section in the manual page.
|
|
|
|
|
|
|
|
|
|
*section*
|
|
|
|
|
The manual page section. Used for the output file name as well as in the
|
|
|
|
|
manual page header.
|
2010-02-21 04:50:08 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.0
|
|
|
|
|
|
2010-10-24 16:40:16 -05:00
|
|
|
|
.. confval:: man_show_urls
|
|
|
|
|
|
|
|
|
|
If true, add URL addresses after links. Default is ``False``.
|
|
|
|
|
|
2011-01-04 15:11:57 -06:00
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2010-02-21 04:50:08 -06:00
|
|
|
|
|
2010-09-16 02:16:27 -05:00
|
|
|
|
.. _texinfo-options:
|
|
|
|
|
|
|
|
|
|
Options for Texinfo output
|
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
|
|
These options influence Texinfo output.
|
|
|
|
|
|
|
|
|
|
.. confval:: texinfo_documents
|
|
|
|
|
|
2010-10-22 03:17:35 -05:00
|
|
|
|
This value determines how to group the document tree into Texinfo source
|
|
|
|
|
files. It must be a list of tuples ``(startdocname, targetname, title,
|
|
|
|
|
author, dir_entry, description, category, toctree_only)``, where the items
|
|
|
|
|
are:
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
*startdocname*
|
2018-07-19 14:10:16 -05:00
|
|
|
|
String that specifies the :term:`document name` of the the Texinfo file's
|
|
|
|
|
master document. All documents referenced by the *startdoc* document in
|
|
|
|
|
TOC trees will be included in the Texinfo file. (If you want to use the
|
|
|
|
|
default master document for your Texinfo build, provide your
|
|
|
|
|
:confval:`master_doc` here.)
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
|
|
|
|
*targetname*
|
|
|
|
|
File name (no extension) of the Texinfo file in the output directory.
|
|
|
|
|
|
|
|
|
|
*title*
|
2018-07-01 09:10:51 -05:00
|
|
|
|
Texinfo document title. Can be empty to use the title of the *startdoc*
|
|
|
|
|
document. Inserted as Texinfo markup, so special characters like ``@`` and
|
|
|
|
|
``{}`` will need to be escaped to be inserted literally.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
|
|
|
|
*author*
|
|
|
|
|
Author for the Texinfo document. Inserted as Texinfo markup. Use ``@*``
|
|
|
|
|
to separate multiple authors, as in: ``'John@*Sarah'``.
|
|
|
|
|
|
|
|
|
|
*dir_entry*
|
|
|
|
|
The name that will appear in the top-level ``DIR`` menu file.
|
|
|
|
|
|
|
|
|
|
*description*
|
|
|
|
|
Descriptive text to appear in the top-level ``DIR`` menu file.
|
|
|
|
|
|
|
|
|
|
*category*
|
|
|
|
|
Specifies the section which this entry will appear in the top-level
|
|
|
|
|
``DIR`` menu file.
|
|
|
|
|
|
|
|
|
|
*toctree_only*
|
|
|
|
|
Must be ``True`` or ``False``. If true, the *startdoc* document itself is
|
|
|
|
|
not included in the output, only the documents referenced by it via TOC
|
|
|
|
|
trees. With this option, you can put extra stuff in the master document
|
|
|
|
|
that shows up in the HTML, but not the Texinfo output.
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
|
|
|
|
.. confval:: texinfo_appendices
|
|
|
|
|
|
|
|
|
|
A list of document names to append as an appendix to all manuals.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2011-02-23 17:55:39 -06:00
|
|
|
|
.. confval:: texinfo_domain_indices
|
|
|
|
|
|
|
|
|
|
If true, generate domain-specific indices in addition to the general index.
|
|
|
|
|
For e.g. the Python domain, this is the global module index. Default is
|
|
|
|
|
``True``.
|
|
|
|
|
|
|
|
|
|
This value can be a bool or a list of index names that should be generated,
|
|
|
|
|
like for :confval:`html_domain_indices`.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
2011-03-06 00:30:19 -06:00
|
|
|
|
.. confval:: texinfo_show_urls
|
|
|
|
|
|
|
|
|
|
Control how to display URL addresses.
|
|
|
|
|
|
|
|
|
|
* ``'footnote'`` -- display URLs in footnotes (default)
|
|
|
|
|
* ``'no'`` -- do not display URLs
|
|
|
|
|
* ``'inline'`` -- display URLs inline in parentheses
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2013-02-19 03:24:57 -06:00
|
|
|
|
.. confval:: texinfo_no_detailmenu
|
|
|
|
|
|
|
|
|
|
If true, do not generate a ``@detailmenu`` in the "Top" node's menu
|
|
|
|
|
containing entries for each sub-node in the document. Default is ``False``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2010-09-16 02:16:27 -05:00
|
|
|
|
.. confval:: texinfo_elements
|
|
|
|
|
|
2010-10-22 03:17:35 -05:00
|
|
|
|
A dictionary that contains Texinfo snippets that override those Sphinx
|
|
|
|
|
usually puts into the generated ``.texi`` files.
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
|
|
|
|
* Keys that you may want to override include:
|
|
|
|
|
|
|
|
|
|
``'paragraphindent'``
|
2010-10-22 03:17:35 -05:00
|
|
|
|
Number of spaces to indent the first line of each paragraph, default
|
|
|
|
|
``2``. Specify ``0`` for no indentation.
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
|
|
|
|
``'exampleindent'``
|
2010-10-22 03:17:35 -05:00
|
|
|
|
Number of spaces to indent the lines for examples or literal blocks,
|
|
|
|
|
default ``4``. Specify ``0`` for no indentation.
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
|
|
|
|
``'preamble'``
|
2011-03-06 00:30:19 -06:00
|
|
|
|
Texinfo markup inserted near the beginning of the file.
|
|
|
|
|
|
|
|
|
|
``'copying'``
|
|
|
|
|
Texinfo markup inserted within the ``@copying`` block and displayed
|
|
|
|
|
after the title. The default value consists of a simple title page
|
|
|
|
|
identifying the project.
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
2010-10-22 03:17:35 -05:00
|
|
|
|
* Keys that are set by other options and therefore should not be overridden
|
|
|
|
|
are:
|
2010-09-16 02:16:27 -05:00
|
|
|
|
|
2011-03-06 00:30:19 -06:00
|
|
|
|
``'author'``
|
|
|
|
|
``'body'``
|
|
|
|
|
``'date'``
|
|
|
|
|
``'direntry'``
|
2010-09-16 02:16:27 -05:00
|
|
|
|
``'filename'``
|
2011-03-06 00:30:19 -06:00
|
|
|
|
``'project'``
|
|
|
|
|
``'release'``
|
2010-09-16 02:16:27 -05:00
|
|
|
|
``'title'``
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
|
|
|
|
|
2017-10-02 10:26:21 -05:00
|
|
|
|
.. _qthelp-options:
|
|
|
|
|
|
|
|
|
|
Options for QtHelp output
|
|
|
|
|
--------------------------
|
|
|
|
|
|
2017-10-07 23:15:43 -05:00
|
|
|
|
These options influence qthelp output. As this builder derives from the HTML
|
|
|
|
|
builder, the HTML options also apply where appropriate.
|
2017-10-02 10:26:21 -05:00
|
|
|
|
|
|
|
|
|
.. confval:: qthelp_basename
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
The basename for the qthelp file. It defaults to the :confval:`project`
|
|
|
|
|
name.
|
2017-10-02 10:26:21 -05:00
|
|
|
|
|
2017-10-08 09:22:56 -05:00
|
|
|
|
.. confval:: qthelp_namespace
|
|
|
|
|
|
|
|
|
|
The namespace for the qthelp file. It defaults to
|
|
|
|
|
``org.sphinx.<project_name>.<project_version>``.
|
|
|
|
|
|
2017-10-02 10:26:21 -05:00
|
|
|
|
.. confval:: qthelp_theme
|
|
|
|
|
|
|
|
|
|
The HTML theme for the qthelp output.
|
|
|
|
|
This defaults to ``'nonav'``.
|
|
|
|
|
|
|
|
|
|
.. confval:: qthelp_theme_options
|
|
|
|
|
|
|
|
|
|
A dictionary of options that influence the look and feel of the selected
|
|
|
|
|
theme. These are theme-specific. For the options understood by the builtin
|
|
|
|
|
themes, see :ref:`this section <builtin-themes>`.
|
|
|
|
|
|
|
|
|
|
|
2010-10-22 04:40:38 -05:00
|
|
|
|
Options for the linkcheck builder
|
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
|
|
.. confval:: linkcheck_ignore
|
|
|
|
|
|
|
|
|
|
A list of regular expressions that match URIs that should not be checked
|
|
|
|
|
when doing a ``linkcheck`` build. Example::
|
|
|
|
|
|
|
|
|
|
linkcheck_ignore = [r'http://localhost:\d+/']
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2016-02-13 07:52:38 -06:00
|
|
|
|
.. confval:: linkcheck_retries
|
|
|
|
|
|
2016-02-13 08:18:41 -06:00
|
|
|
|
The number of times the linkcheck builder will attempt to check a URL before
|
|
|
|
|
declaring it broken. Defaults to 1 attempt.
|
2016-02-13 07:52:38 -06:00
|
|
|
|
|
2016-02-13 08:23:00 -06:00
|
|
|
|
.. versionadded:: 1.4
|
2016-02-13 07:52:38 -06:00
|
|
|
|
|
2011-01-04 04:27:42 -06:00
|
|
|
|
.. confval:: linkcheck_timeout
|
|
|
|
|
|
2016-09-01 11:19:47 -05:00
|
|
|
|
A timeout value, in seconds, for the linkcheck builder. The default is to
|
|
|
|
|
use Python's global socket timeout.
|
2011-01-04 04:27:42 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
|
|
|
|
.. confval:: linkcheck_workers
|
|
|
|
|
|
|
|
|
|
The number of worker threads to use when checking links. Default is 5
|
|
|
|
|
threads.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
2012-02-28 12:12:59 -06:00
|
|
|
|
.. confval:: linkcheck_anchors
|
|
|
|
|
|
2014-06-18 11:34:28 -05:00
|
|
|
|
If true, check the validity of ``#anchor``\ s in links. Since this requires
|
2014-06-19 11:14:47 -05:00
|
|
|
|
downloading the whole document, it's considerably slower when enabled.
|
2014-06-18 11:34:28 -05:00
|
|
|
|
Default is ``True``.
|
2012-02-28 12:12:59 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
2016-03-23 11:38:46 -05:00
|
|
|
|
.. confval:: linkcheck_anchors_ignore
|
|
|
|
|
|
2018-07-16 16:22:26 -05:00
|
|
|
|
A list of regular expressions that match anchors Sphinx should skip when
|
|
|
|
|
checking the validity of anchors in links. This allows skipping anchors that
|
|
|
|
|
a website's JavaScript adds to control dynamic pages or when triggering an
|
|
|
|
|
internal REST request. Default is ``["^!"]``.
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
If you want to ignore anchors of a specific page or of pages that match a
|
2018-07-18 12:40:22 -05:00
|
|
|
|
specific pattern (but still check occurrences of the same page(s) that
|
|
|
|
|
don't have anchors), use :confval:`linkcheck_ignore` instead, for example
|
|
|
|
|
as follows::
|
2018-07-16 16:22:26 -05:00
|
|
|
|
|
|
|
|
|
linkcheck_ignore = [
|
2018-07-17 13:40:49 -05:00
|
|
|
|
'http://www.sphinx-doc.org/en/1.7/intro.html#'
|
2018-07-16 16:22:26 -05:00
|
|
|
|
]
|
2016-03-23 11:38:46 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2010-10-22 04:40:38 -05:00
|
|
|
|
|
2012-12-04 21:10:15 -06:00
|
|
|
|
Options for the XML builder
|
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
|
|
.. confval:: xml_pretty
|
|
|
|
|
|
2014-06-18 11:34:28 -05:00
|
|
|
|
If true, pretty-print the XML. Default is ``True``.
|
2012-12-04 21:10:15 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
|
|
|
|
|
2010-01-06 08:48:39 -06:00
|
|
|
|
.. rubric:: Footnotes
|
|
|
|
|
|
2010-01-07 10:56:09 -06:00
|
|
|
|
.. [1] A note on available globbing syntax: you can use the standard shell
|
2010-01-06 08:48:39 -06:00
|
|
|
|
constructs ``*``, ``?``, ``[...]`` and ``[!...]`` with the feature that
|
2018-03-31 07:18:55 -05:00
|
|
|
|
these all don't match slashes. A double star ``**`` can be used to
|
|
|
|
|
match any sequence of characters *including* slashes.
|
2016-08-05 17:08:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _cpp-config:
|
|
|
|
|
|
|
|
|
|
Options for the C++ domain
|
|
|
|
|
--------------------------
|
|
|
|
|
|
2016-08-05 17:53:50 -05:00
|
|
|
|
.. confval:: cpp_index_common_prefix
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A list of prefixes that will be ignored when sorting C++ objects in the
|
|
|
|
|
global index. For example ``['awesome_lib::']``.
|
2016-08-05 17:53:50 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2016-08-05 17:08:02 -05:00
|
|
|
|
.. confval:: cpp_id_attributes
|
|
|
|
|
|
|
|
|
|
A list of strings that the parser additionally should accept as attributes.
|
2018-03-31 07:18:55 -05:00
|
|
|
|
This can for example be used when attributes have been ``#define`` d for
|
|
|
|
|
portability.
|
2016-08-05 17:08:02 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
.. confval:: cpp_paren_attributes
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
A list of strings that the parser additionally should accept as attributes
|
|
|
|
|
with one argument. That is, if ``my_align_as`` is in the list, then
|
|
|
|
|
``my_align_as(X)`` is parsed as an attribute for all strings ``X`` that have
|
|
|
|
|
balanced brances (``()``, ``[]``, and ``{}``). This can for example be used
|
|
|
|
|
when attributes have been ``#define`` d for portability.
|
2016-08-05 17:08:02 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2018-03-31 07:18:55 -05:00
|
|
|
|
|
2016-10-17 10:25:40 -05:00
|
|
|
|
Example of configuration file
|
2016-10-11 06:09:47 -05:00
|
|
|
|
=============================
|
|
|
|
|
|
2018-04-30 04:21:34 -05:00
|
|
|
|
.. literalinclude:: /_static/conf.py.txt
|
2016-10-11 06:09:47 -05:00
|
|
|
|
:language: python
|