summaryrefslogtreecommitdiff
path: root/sphinx/ext/jsmath.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/jsmath.py')
-rw-r--r--sphinx/ext/jsmath.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/ext/jsmath.py b/sphinx/ext/jsmath.py
index dc57c13c6..978e3f3d6 100644
--- a/sphinx/ext/jsmath.py
+++ b/sphinx/ext/jsmath.py
@@ -16,6 +16,7 @@ import sphinx
from sphinx.locale import _
from sphinx.application import ExtensionError
from sphinx.ext.mathbase import setup_math as mathbase_setup
+from sphinx.ext.mathbase import get_node_equation_number
def html_visit_math(self, node):
@@ -35,7 +36,8 @@ def html_visit_displaymath(self, node):
if i == 0:
# necessary to e.g. set the id property correctly
if node['number']:
- self.body.append('<span class="eqno">(%s)' % node['number'])
+ number = get_node_equation_number(self.builder.env, node)
+ self.body.append('<span class="eqno">(%s)' % number)
self.add_permalink_ref(node, _('Permalink to this equation'))
self.body.append('</span>')
self.body.append(self.starttag(node, 'div', CLASS='math'))