module sphinxext.sphinx_exref_extension
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_exref_extension
Defines a sphinx extension to keep track of ex.
Classes¶
class |
truncated documentation |
---|---|
A |
|
defines |
|
A list of all exref entries, for a specific tag. |
|
defines |
Functions¶
function |
truncated documentation |
---|---|
depart_exref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
|
depart_exref_node |
|
merge_exref |
|
process_blocref_nodes |
|
collect all exref in the environment this is not done in the directive itself because it some transformations … |
|
purge_exrefs |
|
setup for |
|
visit_exref_node |
|
visit_exreflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
Methods¶
method |
truncated documentation |
---|---|
calls run from |
|
calls run from |
Documentation¶
Defines a sphinx extension to keep track of ex.
-
class
pyquickhelper.sphinxext.sphinx_exref_extension.
ExRef
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source][source]¶ Bases:
pyquickhelper.sphinxext.sphinx_blocref_extension.BlocRef
A
exref
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 (optional)
lid or label: a label to refer to
index: to add an entry to the index (comma separated)
Example:
.. exref:: :title: example of a blocref :lid: id-you-can-choose6 An example of code: :: print("mignon")
Which renders as:
example of a exref
An example of code:
print("mignon")
All blocs can be displayed in another page by using
exreflist
:.. exreflist:: :tag: dummy_example6 :sort: title
Only blocs tagged as
dummy_example
will be inserted here. The optionsort
sorts items by title, number, file. You also link to it by typing:ref:'anchor <id-you-can-choose2>'
which gives something like link_to_blocref. The link must receive a name.example of a exref
An example of code:
print("mignon")
(original entry : sphinx_exref_extension.py:docstring of pyquickhelper.sphinxext.sphinx_exref_extension.ExRef, line 23)
-
node_class
[source]¶ alias of
exref_node
-
class
pyquickhelper.sphinxext.sphinx_exref_extension.
ExRefList
(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 exref entries, for a specific tag.
tag: a tag to filter bloc having this tag
sort: a way to sort the blocs based on the title, file, number, default: title
contents: add a bullet list with links to added blocs
Example:
.. exreflist:: :tag: issue
-
run
()[source][source]¶ calls run from
BlocRefList
and add default tag if not present
-
pyquickhelper.sphinxext.sphinx_exref_extension.
depart_exref_node
(self, node)[source][source]¶ depart_exref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py
-
pyquickhelper.sphinxext.sphinx_exref_extension.
depart_exreflist_node
(self, node)[source][source]¶ depart_exref_node
-
class
pyquickhelper.sphinxext.sphinx_exref_extension.
exref_node
(rawsource='', *children, **attributes)[source][source]¶ Bases:
docutils.nodes.admonition
defines
exref
ndoe
-
class
pyquickhelper.sphinxext.sphinx_exref_extension.
exreflist
(rawsource='', *children, **attributes)[source][source]¶ Bases:
docutils.nodes.General
,docutils.nodes.Element
defines
exreflist
node
-
pyquickhelper.sphinxext.sphinx_exref_extension.
merge_exref
(app, env, docnames, other)[source][source]¶
-
pyquickhelper.sphinxext.sphinx_exref_extension.
process_exref_nodes
(app, doctree, fromdocname)[source][source]¶ process_blocref_nodes
-
pyquickhelper.sphinxext.sphinx_exref_extension.
process_exrefs
(app, doctree)[source][source]¶ collect all exref 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_exref_extension.
visit_exreflist_node
(self, node)[source][source]¶ see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py