Doctree node classes added by Sphinx¶
Nodes for domain-specific object descriptions¶
- class
sphinx.addnodes.
desc
(rawsource='', *children, **attributes)[source]¶ Node for object descriptions.
This node is similar to a “definition list” with one definition. It contains one or more
desc_signature
and adesc_content
.
- class
sphinx.addnodes.
desc_signature
(rawsource='', text='', *children, **attributes)[source]¶ Node for object signatures.
The “term” part of the custom Sphinx definition list.
As default the signature is a single line signature, but set
is_multiline = True
to describe a multi-line signature. In that case all child nodes must bedesc_signature_line
nodes.
- class
sphinx.addnodes.
desc_signature_line
(rawsource='', text='', *children, **attributes)[source]¶ Node for a line in a multi-line object signatures.
It should only be used in a
desc_signature
withis_multiline
set. Setadd_permalink = True
for the line that should get the permalink.
- class
sphinx.addnodes.
desc_addname
(rawsource='', text='', *children, **attributes)[source]¶ Node for additional name parts (module name, class name).
- class
sphinx.addnodes.
desc_type
(rawsource='', text='', *children, **attributes)[source]¶ Node for return types or object type names.
- class
sphinx.addnodes.
desc_returns
(rawsource='', text='', *children, **attributes)[source]¶ Node for a “returns” annotation (a la -> in Python).
- class
sphinx.addnodes.
desc_name
(rawsource='', text='', *children, **attributes)[source]¶ Node for the main object name.
- class
sphinx.addnodes.
desc_parameterlist
(rawsource='', text='', *children, **attributes)[source]¶ Node for a general parameter list.
- class
sphinx.addnodes.
desc_parameter
(rawsource='', text='', *children, **attributes)[source]¶ Node for a single parameter.
- class
sphinx.addnodes.
desc_optional
(rawsource='', text='', *children, **attributes)[source]¶ Node for marking optional parts of the parameter list.
New admonition-like constructs¶
Other paragraph-level nodes¶
New inline nodes¶
- class
sphinx.addnodes.
index
(rawsource='', text='', *children, **attributes)[source]¶ Node for index entries.
This node is created by the
index
directive and has one attribute,entries
. Its value is a list of 5-tuples of(entrytype, entryname, target, ignored, key)
.entrytype is one of “single”, “pair”, “double”, “triple”.
key is categolziation characters (usually it is single character) for general index page. For the detail of this, please see also:
glossary
and issue #2320.
- class
sphinx.addnodes.
pending_xref
(rawsource='', *children, **attributes)[source]¶ Node for cross-references that cannot be resolved without complete information about all documents.
These nodes are resolved before writing output, in BuildEnvironment.resolve_references.
- class
sphinx.addnodes.
literal_emphasis
(rawsource='', text='', *children, **attributes)[source]¶ Node that behaves like emphasis, but further text processors are not applied (e.g. smartypants for HTML output).
Special nodes¶
- class
sphinx.addnodes.
only
(rawsource='', *children, **attributes)[source]¶ Node for “only” directives (conditional inclusion based on tags).
- class
sphinx.addnodes.
meta
(rawsource='', *children, **attributes)[source]¶ Node for meta directive – same as docutils’ standard meta node, but pickleable.
- class
sphinx.addnodes.
highlightlang
(rawsource='', *children, **attributes)[source]¶ Inserted to set the highlight language and line number options for subsequent code blocks.
You should not need to generate the nodes below in extensions.
- class
sphinx.addnodes.
glossary
(rawsource='', *children, **attributes)[source]¶ Node to insert a glossary.
- class
sphinx.addnodes.
toctree
(rawsource='', *children, **attributes)[source]¶ Node for inserting a “TOC tree”.
- class
sphinx.addnodes.
start_of_file
(rawsource='', *children, **attributes)[source]¶ Node to mark start of a new file, used in the LaTeX builder only.
- class
sphinx.addnodes.
productionlist
(rawsource='', *children, **attributes)[source]¶ Node for grammar production lists.
Contains
production
nodes.