- Home
- Get it
- Docs
- Extend/Develop

# Doctree node classes added by Sphinx

## Nodes for domain-specific object descriptions

class `sphinx.addnodes.``desc`(rawsource='', *children, **attributes)

  Node for object descriptions.

  This node is similar to a “definition list” with one definition. It contains one or more `desc_signature` and a `desc_content`.

class `sphinx.addnodes.``desc_signature`(rawsource='', text='', *children, **attributes)

  Node for object signatures.

  The “term” part of the custom Sphinx definition list.

class `sphinx.addnodes.``desc_addname`(rawsource='', text='', *children, **attributes)

  Node for additional name parts (module name, class name).

class `sphinx.addnodes.``desc_type`(rawsource='', text='', *children, **attributes)

  Node for return types or object type names.

class `sphinx.addnodes.``desc_returns`(rawsource='', text='', *children, **attributes)

  Node for a “returns” annotation (a la -> in Python).

class `sphinx.addnodes.``desc_name`(rawsource='', text='', *children, **attributes)

  Node for the main object name.

class `sphinx.addnodes.``desc_parameterlist`(rawsource='', text='', *children, **attributes)

  Node for a general parameter list.

class `sphinx.addnodes.``desc_parameter`(rawsource='', text='', *children, **attributes)

  Node for a single parameter.

class `sphinx.addnodes.``desc_optional`(rawsource='', text='', *children, **attributes)

  Node for marking optional parts of the parameter list.

class `sphinx.addnodes.``desc_annotation`(rawsource='', text='', *children, **attributes)

  Node for signature annotations (not Python 3-style annotations).

class `sphinx.addnodes.``desc_content`(rawsource='', *children, **attributes)

  Node for object description content.

  This is the “definition” part of the custom Sphinx definition list.

## New admonition-like constructs

class `sphinx.addnodes.``versionmodified`(rawsource='', text='', *children, **attributes)

  Node for version change entries.

  Currently used for “versionadded”, “versionchanged” and “deprecated” directives.

class `sphinx.addnodes.``seealso`(rawsource='', *children, **attributes)

  Custom “see also” admonition.

## Other paragraph-level nodes

class `sphinx.addnodes.``compact_paragraph`(rawsource='', text='', *children, **attributes)

  Node for a compact paragraph (which never makes a <p> node).

## New inline nodes

class `sphinx.addnodes.``index`(rawsource='', text='', *children, **attributes)

  Node for index entries.

  This node is created by the `index` directive and has one attribute, `entries`. Its value is a list of 4-tuples of `(entrytype, entryname, target, ignored)`.

  entrytype is one of “single”, “pair”, “double”, “triple”.

class `sphinx.addnodes.``pending_xref`(rawsource='', *children, **attributes)

  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)

  Node that behaves like emphasis, but further text processors are not applied (e.g. smartypants for HTML output).

class `sphinx.addnodes.``abbreviation`(rawsource='', text='', *children, **attributes)

  Node for abbreviations with explanations.

class `sphinx.addnodes.``download_reference`(rawsource='', text='', *children, **attributes)

  Node for download references, similar to pending_xref.

## Special nodes

class `sphinx.addnodes.``only`(rawsource='', *children, **attributes)

  Node for “only” directives (conditional inclusion based on tags).

class `sphinx.addnodes.``meta`(rawsource='', *children, **attributes)

  Node for meta directive – same as docutils’ standard meta node, but pickleable.

class `sphinx.addnodes.``highlightlang`(rawsource='', *children, **attributes)

  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)

  Node to insert a glossary.

class `sphinx.addnodes.``toctree`(rawsource='', *children, **attributes)

  Node for inserting a “TOC tree”.

class `sphinx.addnodes.``start_of_file`(rawsource='', *children, **attributes)

  Node to mark start of a new file, used in the LaTeX builder only.

class `sphinx.addnodes.``productionlist`(rawsource='', *children, **attributes)

  Node for grammar production lists.

  Contains `production` nodes.

class `sphinx.addnodes.``production`(rawsource='', text='', *children, **attributes)

  Node for a single grammar production rule.

class `sphinx.addnodes.``termsep`(*args, **kw)

  Separates two terms within a <term> node.

  Changed in version 1.4: sphinx.addnodes.termsep is deprecated. It will be removed at Sphinx-1.5.