module sphinxext.sphinx_nbref_extension
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_nbref_extension
Defines a sphinx extension to keep track of nb.
Classes¶
class |
truncated documentation |
---|---|
A |
|
defines |
|
A list of all nbref entries, for a specific tag. |
|
defines |
Functions¶
function |
truncated documentation |
---|---|
depart_nbref_node, see sphinx/writers/html.py. … |
|
depart_nbref_node |
|
merge_nbref |
|
process_nbref_nodes |
|
Collect all nbref in the environment this is not done in the directive itself because it some transformations … |
|
purge_nbrefs |
|
setup for |
|
visit_nbref_node |
|
visit_nbreflist_node, see sphinx/writers/html.py. … |
Properties¶
property |
truncated documentation |
---|---|
|
Return the document root node of the tree containing this Node. |
|
Return the document root node of the tree containing this Node. |
Methods¶
method |
truncated documentation |
---|---|
calls run from |
|
calls run from |
Documentation¶
Defines a sphinx extension to keep track of nb.
- class pyquickhelper.sphinxext.sphinx_nbref_extension.NbRef(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
BlocRef
A
nbref
entry, displayed in the form of an admonition. It takes the following options:title: a title for the bloc
tag: a tag to have several categories of blocs, if not specified, it will be equal to nb
lid or label: a label to refer to
index: to add an additional entry to the index (comma separated)
See %encrypt_file for an example. All entries can be aggregated per tag with
nbreflist
:.. nbreflist:: :tag: dummy_example2 :sort: title
It works the same way as
BlocRef
.- node_class[source]¶
alias of
nbref_node
- class pyquickhelper.sphinxext.sphinx_nbref_extension.NbRefList(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
BlocRefList
A list of all nbref entries, for a specific tag.
tag: a tag to have several categories of nbref
contents: add a bullet list with links to added blocs
Example:
.. nbreflist:: :tag: issue
- run()[source]¶
calls run from
BlocRefList
and add default tag if not present
- pyquickhelper.sphinxext.sphinx_nbref_extension.depart_nbref_node(self, node)[source]¶
depart_nbref_node, see sphinx/writers/html.py.
- pyquickhelper.sphinxext.sphinx_nbref_extension.depart_nbreflist_node(self, node)[source]¶
depart_nbref_node
- class pyquickhelper.sphinxext.sphinx_nbref_extension.nbref_node(rawsource='', *children, **attributes)[source]¶
Bases:
admonition
defines
nbref
ndoe
- class pyquickhelper.sphinxext.sphinx_nbref_extension.nbreflist(rawsource='', *children, **attributes)[source]¶
Bases:
General
,Element
defines
nbreflist
node
- pyquickhelper.sphinxext.sphinx_nbref_extension.process_nbref_nodes(app, doctree, fromdocname)[source]¶
- pyquickhelper.sphinxext.sphinx_nbref_extension.process_nbrefs(app, doctree)[source]¶
Collect all nbref in the environment this is not done in the directive itself because it some transformations must have already been run, e.g. substitutions.
- pyquickhelper.sphinxext.sphinx_nbref_extension.visit_nbreflist_node(self, node)[source]¶
visit_nbreflist_node, see sphinx/writers/html.py.