.. _f-sphinxmathdefextension: module ``sphinxext.sphinx_mathdef_extension`` ============================================= .. inheritance-diagram:: pyquickhelper.sphinxext.sphinx_mathdef_extension Short summary +++++++++++++ module ``pyquickhelper.sphinxext.sphinx_mathdef_extension`` Defines a :epkg:`sphinx` extension to give a title to a mathematical definition, theorem... Inspired from `math.py `_. :githublink:`%|py|8` Classes +++++++ +---------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ | class | truncated documentation | +=======================================================================================+==============================================================================================+ | :class:`MathDef ` | A ``mathdef`` entry, displayed in the form of an admonition. It takes the following options: | +---------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ | :class:`mathdef_node ` | Defines ``mathdef`` node. | +---------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ | :class:`MathDefList ` | A list of all mathdef entries, for a specific tag. | +---------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ | :class:`mathdeflist ` | Defines ``mathdeflist`` node. | +---------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ Functions +++++++++ +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +============================================================================================================+======================================================================================================================+ | :func:`depart_mathdef_node ` | depart_mathdef_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`depart_mathdeflist_node ` | depart_mathdef_node | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`merge_mathdef ` | merge_mathdef | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`process_mathdef_nodes ` | process_mathdef_nodes | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`process_mathdefs ` | collect all mathdefs in the environment this is not done in the directive itself because it some transformations ... | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`purge_mathsext ` | purge_mathsext | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`setup ` | setup for ``mathdef`` (sphinx) | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`visit_mathdef_node ` | visit_mathdef_node | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :func:`visit_mathdeflist_node ` | visit_mathdeflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ | property | truncated documentation | +===========================================================================================+===================================================================+ | :meth:`document ` | Return the `document` root node of the tree containing this Node. | +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ | :meth:`document ` | Return the `document` root node of the tree containing this Node. | +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ Methods +++++++ +--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +================================================================================+===========================================================================================================+ | :meth:`run ` | Builds the mathdef text. | +--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Simply insert an empty mathdeflist node which will be replaced later when process_mathdef_nodes is called | +--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyquickhelper.sphinxext.sphinx_mathdef_extension :members: :special-members: __init__ :show-inheritance: