diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-01-08 20:19:36 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-01-08 20:19:36 +0900 |
commit | 326d7e64cedb5280a9cf51a90c00266e1dab9e7b (patch) | |
tree | 0ce4e7845e09aa822da027fbe6401174458c47d9 /sphinx/ext/mathjax.py | |
parent | 7a194f52960fe5ace04ef7daa72563e6d3bf094f (diff) | |
parent | 3965b1f023bbac932d0dfbf414386f0667ec002a (diff) | |
download | sphinx-git-326d7e64cedb5280a9cf51a90c00266e1dab9e7b.tar.gz |
Merge branch 'master' into dont_emit_system_message_on_autodoc_warning
Diffstat (limited to 'sphinx/ext/mathjax.py')
-rw-r--r-- | sphinx/ext/mathjax.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/ext/mathjax.py b/sphinx/ext/mathjax.py index f25f91e74..8698e2801 100644 --- a/sphinx/ext/mathjax.py +++ b/sphinx/ext/mathjax.py @@ -7,7 +7,7 @@ Sphinx's HTML writer -- requires the MathJax JavaScript library on your webserver/computer. - :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,6 +17,7 @@ import sphinx from sphinx.locale import _ from sphinx.errors 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): @@ -36,7 +37,8 @@ def html_visit_displaymath(self, node): # 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, 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.builder.config.mathjax_display[0]) |