Add :rst:role:math:numref role to refer equations (Same as :rst:role:eq)

This commit is contained in:
Takeshi KOMIYA
2018-07-28 19:54:56 +09:00
parent d07103fde2
commit 8e56f86383
7 changed files with 36 additions and 14 deletions

View File

@@ -1325,6 +1325,25 @@ These roles are provided to refer to the described objects:
.. rst:role:: rst:dir
rst:role
.. _math-domain:
The Math Domain
---------------
The math domain (name **math**) provides the following roles::
.. rst:role:: math:numref
Role for cross-referencing equations defined by :rst:dir:`math` directive
via their label. Example::
.. math:: e^{i\pi} + 1 = 0
:label: euler
Euler's identity, equation :math:numref:`euler`, was elected one of the
most beautiful mathematical formulas.
.. versionadded:: 1.8
More domains
------------

View File

@@ -288,13 +288,7 @@ Math
.. rst:role:: eq
Role for cross-referencing equations via their label. Example::
.. math:: e^{i\pi} + 1 = 0
:label: euler
Euler's identity, equation :eq:`euler`, was elected one of the most
beautiful mathematical formulas.
Same as :rst:role:`math:numref`.
Other semantic markup