class documentation

class TocTree:

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method ​_toctree​_prune Utility: Cut a TOC at a specified depth.
Method get​_toc​_for Return a TOC nodetree -- for use on the same page only!
Method get​_toctree​_ancestors Undocumented
Method get​_toctree​_for Return the global TOC nodetree.
Method note Note a TOC tree directive in a document and gather information about file relations from it.
Method resolve Resolve a toctree node into individual bullet lists with titles as items, returning None (if no containing titles are found) or a new node.
Instance Variable env Undocumented
def __init__(self, env):

Undocumented

Parameters
env:BuildEnvironmentUndocumented
def _toctree_prune(self, node, depth, maxdepth, collapse=False):
Utility: Cut a TOC at a specified depth.
Parameters
node:ElementUndocumented
depth:intUndocumented
maxdepth:intUndocumented
collapse:boolUndocumented
def get_toc_for(self, docname, builder):
Return a TOC nodetree -- for use on the same page only!
Parameters
docname:strUndocumented
builder:BuilderUndocumented
Returns
NodeUndocumented
def get_toctree_ancestors(self, docname):

Undocumented

Parameters
docname:strUndocumented
Returns
List[str]Undocumented
def get_toctree_for(self, docname, builder, collapse, **kwargs):
Return the global TOC nodetree.
Parameters
docname:strUndocumented
builder:BuilderUndocumented
collapse:boolUndocumented
**kwargs:AnyUndocumented
Returns
Optional[Element]Undocumented
def note(self, docname, toctreenode):
Note a TOC tree directive in a document and gather information about file relations from it.
Parameters
docname:strUndocumented
toctreenode:addnodes.toctreeUndocumented
def resolve(self, docname, builder, toctree, prune=True, maxdepth=0, titles_only=False, collapse=False, includehidden=False):

Resolve a toctree node into individual bullet lists with titles as items, returning None (if no containing titles are found) or a new node.

If prune is True, the tree is pruned to maxdepth, or if that is 0, to the value of the maxdepth option on the toctree node. If titles_only is True, only toplevel document titles will be in the resulting tree. If collapse is True, all branches not containing docname will be collapsed.

Parameters
docname:strUndocumented
builder:BuilderUndocumented
toctree:addnodes.toctreeUndocumented
prune:boolUndocumented
maxdepth:intUndocumented
titles​_only:boolUndocumented
collapse:boolUndocumented
includehidden:boolUndocumented
Returns
Optional[Element]Undocumented
env =

Undocumented