mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '3.x'
This commit is contained in:
@@ -25,75 +25,75 @@ package.
|
||||
|
||||
.. currentmodule:: sphinx.application
|
||||
|
||||
.. automethod:: Sphinx.setup_extension(name)
|
||||
.. automethod:: Sphinx.setup_extension
|
||||
|
||||
.. automethod:: Sphinx.require_sphinx(version)
|
||||
.. automethod:: Sphinx.require_sphinx
|
||||
|
||||
.. automethod:: Sphinx.connect(event, callback)
|
||||
.. automethod:: Sphinx.connect
|
||||
|
||||
.. automethod:: Sphinx.disconnect(listener_id)
|
||||
.. automethod:: Sphinx.disconnect
|
||||
|
||||
.. automethod:: Sphinx.add_builder(builder)
|
||||
.. automethod:: Sphinx.add_builder
|
||||
|
||||
.. automethod:: Sphinx.add_config_value(name, default, rebuild)
|
||||
.. automethod:: Sphinx.add_config_value
|
||||
|
||||
.. automethod:: Sphinx.add_event(name)
|
||||
.. automethod:: Sphinx.add_event
|
||||
|
||||
.. automethod:: Sphinx.set_translator(name, translator_class)
|
||||
.. automethod:: Sphinx.set_translator
|
||||
|
||||
.. automethod:: Sphinx.add_node(node, \*\*kwds)
|
||||
.. automethod:: Sphinx.add_node
|
||||
|
||||
.. automethod:: Sphinx.add_enumerable_node(node, figtype, title_getter=None, \*\*kwds)
|
||||
.. automethod:: Sphinx.add_enumerable_node
|
||||
|
||||
.. automethod:: Sphinx.add_directive(name, directiveclass)
|
||||
.. automethod:: Sphinx.add_directive
|
||||
|
||||
.. automethod:: Sphinx.add_role(name, role)
|
||||
.. automethod:: Sphinx.add_role
|
||||
|
||||
.. automethod:: Sphinx.add_generic_role(name, nodeclass)
|
||||
.. automethod:: Sphinx.add_generic_role
|
||||
|
||||
.. automethod:: Sphinx.add_domain(domain)
|
||||
.. automethod:: Sphinx.add_domain
|
||||
|
||||
.. automethod:: Sphinx.add_directive_to_domain(domain, name, directiveclass)
|
||||
.. automethod:: Sphinx.add_directive_to_domain
|
||||
|
||||
.. automethod:: Sphinx.add_role_to_domain(domain, name, role)
|
||||
.. automethod:: Sphinx.add_role_to_domain
|
||||
|
||||
.. automethod:: Sphinx.add_index_to_domain(domain, index)
|
||||
.. automethod:: Sphinx.add_index_to_domain
|
||||
|
||||
.. automethod:: Sphinx.add_object_type(directivename, rolename, indextemplate='', parse_node=None, ref_nodeclass=None, objname='', doc_field_types=[])
|
||||
.. automethod:: Sphinx.add_object_type
|
||||
|
||||
.. automethod:: Sphinx.add_crossref_type(directivename, rolename, indextemplate='', ref_nodeclass=None, objname='')
|
||||
.. automethod:: Sphinx.add_crossref_type
|
||||
|
||||
.. automethod:: Sphinx.add_transform(transform)
|
||||
.. automethod:: Sphinx.add_transform
|
||||
|
||||
.. automethod:: Sphinx.add_post_transform(transform)
|
||||
.. automethod:: Sphinx.add_post_transform
|
||||
|
||||
.. automethod:: Sphinx.add_js_file(filename, **kwargs)
|
||||
.. automethod:: Sphinx.add_js_file
|
||||
|
||||
.. automethod:: Sphinx.add_css_file(filename, **kwargs)
|
||||
.. automethod:: Sphinx.add_css_file
|
||||
|
||||
.. automethod:: Sphinx.add_latex_package(packagename, options=None)
|
||||
.. automethod:: Sphinx.add_latex_package
|
||||
|
||||
.. automethod:: Sphinx.add_lexer(alias, lexer)
|
||||
.. automethod:: Sphinx.add_lexer
|
||||
|
||||
.. automethod:: Sphinx.add_autodocumenter(cls)
|
||||
.. automethod:: Sphinx.add_autodocumenter
|
||||
|
||||
.. automethod:: Sphinx.add_autodoc_attrgetter(type, getter)
|
||||
.. automethod:: Sphinx.add_autodoc_attrgetter
|
||||
|
||||
.. automethod:: Sphinx.add_search_language(cls)
|
||||
.. automethod:: Sphinx.add_search_language
|
||||
|
||||
.. automethod:: Sphinx.add_source_suffix(suffix, filetype)
|
||||
.. automethod:: Sphinx.add_source_suffix
|
||||
|
||||
.. automethod:: Sphinx.add_source_parser(parser)
|
||||
.. automethod:: Sphinx.add_source_parser
|
||||
|
||||
.. automethod:: Sphinx.add_env_collector(collector)
|
||||
.. automethod:: Sphinx.add_env_collector
|
||||
|
||||
.. automethod:: Sphinx.add_html_theme(name, theme_path)
|
||||
.. automethod:: Sphinx.add_html_theme
|
||||
|
||||
.. automethod:: Sphinx.add_html_math_renderer(name, inline_renderers, block_renderers)
|
||||
.. automethod:: Sphinx.add_html_math_renderer
|
||||
|
||||
.. automethod:: Sphinx.add_message_catalog(catalog, locale_dir)
|
||||
.. automethod:: Sphinx.add_message_catalog
|
||||
|
||||
.. automethod:: Sphinx.is_parallel_allowed(typ)
|
||||
.. automethod:: Sphinx.is_parallel_allowed
|
||||
|
||||
.. exception:: ExtensionError
|
||||
|
||||
@@ -107,9 +107,9 @@ Emitting events
|
||||
.. class:: Sphinx
|
||||
:noindex:
|
||||
|
||||
.. automethod:: emit(event, \*arguments)
|
||||
.. automethod:: emit
|
||||
|
||||
.. automethod:: emit_firstresult(event, \*arguments)
|
||||
.. automethod:: emit_firstresult
|
||||
|
||||
|
||||
Sphinx runtime information
|
||||
|
||||
@@ -106,6 +106,16 @@ The following is a list of deprecated interfaces.
|
||||
- 5.0
|
||||
- :ref:`logging-api`
|
||||
|
||||
* - ``sphinx.writers.html.HTMLTranslator.permalink_text``
|
||||
- 3.5
|
||||
- 5.0
|
||||
- :confval:`html_permalinks_icon`
|
||||
|
||||
* - ``sphinx.writers.html5.HTML5Translator.permalink_text``
|
||||
- 3.5
|
||||
- 5.0
|
||||
- :confval:`html_permalinks_icon`
|
||||
|
||||
* - The ``follow_wrapped`` argument of ``sphinx.util.inspect.signature()``
|
||||
- 3.4
|
||||
- 5.0
|
||||
|
||||
@@ -95,6 +95,12 @@ Keys that you may want to override include:
|
||||
A string which will be positioned early in the preamble, designed to
|
||||
contain ``\\PassOptionsToPackage{options}{foo}`` commands.
|
||||
|
||||
.. hint::
|
||||
|
||||
It may be also used for loading LaTeX packages very early in the
|
||||
preamble. For example package ``fancybox`` is incompatible with
|
||||
being loaded via the ``'preamble'`` key, it must be loaded earlier.
|
||||
|
||||
Default: ``''``
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
@@ -1135,6 +1135,23 @@ that use Sphinx's HTMLWriter class.
|
||||
This can now be a string to select the actual text of the link.
|
||||
Previously, only boolean values were accepted.
|
||||
|
||||
.. deprecated:: 3.5
|
||||
This has been replaced by :confval:`html_permalinks`
|
||||
|
||||
.. confval:: html_permalinks
|
||||
|
||||
If true, Sphinx will add "permalinks" for each heading and description
|
||||
environment. Default: ``True``.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
.. confval:: html_permalinks_icon
|
||||
|
||||
A text for permalinks for each heading and description environment. HTML
|
||||
tags are allowed. Default: a paragraph sign; ``¶``
|
||||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
.. confval:: html_sidebars
|
||||
|
||||
Custom sidebar templates, must be a dictionary that maps document names to
|
||||
|
||||
@@ -569,6 +569,20 @@ __ http://pygments.org/docs/lexers
|
||||
|
||||
print 'Explicit is better than implicit.'
|
||||
|
||||
In order to cross-reference a code-block using either the
|
||||
:rst:role:`ref` or the :rst:role:`numref` role, it is necessary
|
||||
that both :strong:`name` and :strong:`caption` be defined. The
|
||||
argument of :strong:`name` can then be given to :rst:role:`numref`
|
||||
to generate the cross-reference. Example::
|
||||
|
||||
See :numref:`this-py` for an example.
|
||||
|
||||
When using :rst:role:`ref`, it is possible to generate a cross-reference
|
||||
with only :strong:`name` defined, provided an explicit title is
|
||||
given. Example::
|
||||
|
||||
See :ref:`this code snippet <this-py>` for an example.
|
||||
|
||||
.. versionadded:: 1.3
|
||||
|
||||
.. rst:directive:option:: dedent: number
|
||||
@@ -1206,20 +1220,29 @@ the definition of the symbol. There is this directive:
|
||||
the following definition. If the definition spans multiple lines, each
|
||||
continuation line must begin with a colon placed at the same column as in
|
||||
the first line.
|
||||
Blank lines are not allowed within ``productionlist`` directive arguments.
|
||||
|
||||
The definition can contain token names which are marked as interpreted text
|
||||
(e.g., "``sum ::= `integer` "+" `integer```") -- this generates
|
||||
cross-references to the productions of these tokens. Outside of the
|
||||
production list, you can reference to token productions using
|
||||
:rst:role:`token`.
|
||||
|
||||
The *productionGroup* argument to :rst:dir:`productionlist` serves to
|
||||
distinguish different sets of production lists that belong to different
|
||||
grammars. Multiple production lists with the same *productionGroup* thus
|
||||
define rules in the same scope.
|
||||
|
||||
Blank lines are not allowed within ``productionlist`` directive arguments.
|
||||
Inside of the production list, tokens implicitly refer to productions
|
||||
from the current group. You can refer to the production of another
|
||||
grammar by prefixing the token with its group name and a colon, e.g,
|
||||
"``otherGroup:sum``". If the group of the token should not be shown in
|
||||
the production, it can be prefixed by a tilde, e.g.,
|
||||
"``~otherGroup:sum``". To refer to a production from an unnamed
|
||||
grammar, the token should be prefixed by a colon, e.g., "``:sum``".
|
||||
|
||||
The definition can contain token names which are marked as interpreted text
|
||||
(e.g. "``sum ::= `integer` "+" `integer```") -- this generates
|
||||
cross-references to the productions of these tokens. Outside of the
|
||||
production list, you can reference to token productions using
|
||||
:rst:role:`token`.
|
||||
However, if you have given a *productionGroup* argument you must prefix the
|
||||
Outside of the production list,
|
||||
if you have given a *productionGroup* argument you must prefix the
|
||||
token name in the cross-reference with the group name and a colon,
|
||||
e.g., "``myGroup:sum``" instead of just "``sum``".
|
||||
If the group should not be shown in the title of the link either
|
||||
|
||||
Reference in New Issue
Block a user