docutils.transforms.parts module
Transforms related to document parts.
- class SectNum(document, startnode=None)[source]
Bases:
TransformAutomatically assigns numbers to the titles of document sections.
It is possible to limit the maximum section level for which the numbers are added. For those sections that are auto-numbered, the “autonum” attribute is set, informing the contents table generator that a different form of the TOC should be used.
- default_priority = 710
Should be applied before Contents.
- class Contents(document, startnode=None)[source]
Bases:
TransformThis transform generates a table of contents from the entire document tree or from a single branch. It locates “section” elements and builds them into a nested bullet list, which is placed within a “topic” created by the contents directive. A title is either explicitly specified, taken from the appropriate language module, or omitted (local table of contents). The depth may be specified. Two-way references between the table of contents and section titles are generated (requires Writer support).
This transform requires a startnode, which contains generation options and provides the location for the generated table of contents (the startnode is replaced by the table of contents “topic”).
- default_priority = 720
Numerical priority of this transform, 0 through 999 (override).