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. … |
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][source]¶ Bases:
pyquickhelper.sphinxext.sphinx_blocref_extension.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][source]¶ Bases:
pyquickhelper.sphinxext.sphinx_blocref_extension.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][source]¶ calls run from
BlocRefList
and add default tag if not present
-
pyquickhelper.sphinxext.sphinx_nbref_extension.
depart_nbref_node
(self, node)[source][source]¶ depart_nbref_node, see sphinx/writers/html.py.
-
pyquickhelper.sphinxext.sphinx_nbref_extension.
depart_nbreflist_node
(self, node)[source][source]¶ depart_nbref_node
-
pyquickhelper.sphinxext.sphinx_nbref_extension.
merge_nbref
(app, env, docnames, other)[source][source]¶
-
class
pyquickhelper.sphinxext.sphinx_nbref_extension.
nbref_node
(rawsource='', *children, **attributes)[source][source]¶ Bases:
docutils.nodes.admonition
defines
nbref
ndoe
-
class
pyquickhelper.sphinxext.sphinx_nbref_extension.
nbreflist
(rawsource='', *children, **attributes)[source][source]¶ Bases:
docutils.nodes.General
,docutils.nodes.Element
defines
nbreflist
node
-
pyquickhelper.sphinxext.sphinx_nbref_extension.
process_nbref_nodes
(app, doctree, fromdocname)[source][source]¶
-
pyquickhelper.sphinxext.sphinx_nbref_extension.
process_nbrefs
(app, doctree)[source][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][source]¶ visit_nbreflist_node, see sphinx/writers/html.py.