module sphinxext.sphinx_mathdef_extension
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_mathdef_extension
Defines a sphinx extension to give a title to a mathematical definition, theorem… Inspired from math.py.
Classes¶
class |
truncated documentation |
---|---|
A |
|
Defines |
|
A list of all mathdef entries, for a specific tag. |
|
Defines |
Functions¶
function |
truncated documentation |
---|---|
depart_mathdef_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
|
depart_mathdef_node |
|
merge_mathdef |
|
process_mathdef_nodes |
|
collect all mathdefs in the environment this is not done in the directive itself because it some transformations … |
|
purge_mathsext |
|
setup for |
|
visit_mathdef_node |
|
visit_mathdeflist_node see https://github.com/sphinx-doc/sphinx/blob/master/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 |
---|---|
Builds the mathdef text. |
|
Simply insert an empty mathdeflist node which will be replaced later when process_mathdef_nodes is called |
Documentation¶
Defines a sphinx extension to give a title to a mathematical definition, theorem… Inspired from math.py.
- class pyquickhelper.sphinxext.sphinx_mathdef_extension.MathDef(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
BaseAdmonition
A
mathdef
entry, displayed in the form of an admonition. It takes the following options:title: a title for the math
tag: a tag to have several categories of math
lid or label: a label to refer to
index: to add an entry to the index (comma separated)
Example:
.. mathdef:: :title: title :tag: definition or theorem or ... :lid: id (used for further reference) Description of the math
- node_class[source]¶
alias of
mathdef_node
- option_spec = {'class': <function class_option>, 'index': <function unchanged>, 'label': <function unchanged>, 'lid': <function unchanged>, 'tag': <function unchanged>, 'title': <function unchanged>}[source]¶
Mapping of option names to validator functions.
- class pyquickhelper.sphinxext.sphinx_mathdef_extension.MathDefList(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
Directive
A list of all mathdef entries, for a specific tag.
tag: a tag to have several categories of mathdef
contents: add a bullet list with links to added blocs
Example:
.. mathdeflist:: :tag: issue :contents:
- option_spec = {'contents': <function unchanged>, 'tag': <function unchanged>}[source]¶
Mapping of option names to validator functions.
- pyquickhelper.sphinxext.sphinx_mathdef_extension.depart_mathdef_node(self, node)[source]¶
depart_mathdef_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py
- pyquickhelper.sphinxext.sphinx_mathdef_extension.depart_mathdeflist_node(self, node)[source]¶
depart_mathdef_node
- class pyquickhelper.sphinxext.sphinx_mathdef_extension.mathdef_node(rawsource='', *children, **attributes)[source]¶
Bases:
admonition
Defines
mathdef
node.
- class pyquickhelper.sphinxext.sphinx_mathdef_extension.mathdeflist(rawsource='', *children, **attributes)[source]¶
Bases:
General
,Element
Defines
mathdeflist
node.
- pyquickhelper.sphinxext.sphinx_mathdef_extension.process_mathdef_nodes(app, doctree, fromdocname)[source]¶
- pyquickhelper.sphinxext.sphinx_mathdef_extension.process_mathdefs(app, doctree)[source]¶
collect all mathdefs 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_mathdef_extension.visit_mathdeflist_node(self, node)[source]¶
see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py