docutils.parsers.rst.directives.parts module
Directives for document parts.
- class Contents(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
DirectiveTable of contents.
The table of contents is generated in two passes: initial parse and transform. During the initial parse, a ‘pending’ element is generated which acts as a placeholder, storing the TOC title and any options internally. At a later stage in the processing, the ‘pending’ element is replaced by a ‘topic’ element, a title and the table of contents proper.
- backlinks_values = ('top', 'entry', 'none')
- optional_arguments = 1
Number of optional arguments after the required arguments.
- final_argument_whitespace = True
May the final argument contain whitespace?
- option_spec = {'backlinks': <function Contents.backlinks>, 'class': <function class_option>, 'depth': <function nonnegative_int>, 'local': <function flag>}
Mapping of option names to validator functions.
- class Sectnum(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
DirectiveAutomatic section numbering.
- option_spec = {'depth': <class 'int'>, 'prefix': <function unchanged_required>, 'start': <class 'int'>, 'suffix': <function unchanged_required>}
Mapping of option names to validator functions.
- class Header(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
DirectiveContents of document header.
- has_content = True
May the directive have content?
Bases:
DirectiveContents of document footer.
May the directive have content?