Fix could not reference equations if `:nowrap:` option specified

This commit is contained in:
Takeshi KOMIYA committed 2016-09-01 02:11:32 +09:00
1 parent 8d96c90fc6
commit 0862a4c974
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ Bugs fixed
* #2901: Fix epub result: skip creating links from image tags to original image files.
* #2917: inline code is hyphenated on HTML
* #1462: autosummary warns for namedtuple with attribute with trailing underscore
* Could not reference equations if ``:nowrap:`` option specified
Release 1.4.6 (released Aug 20, 2016)
=====================================
+2 -1
View File
@@ -131,10 +131,11 @@ def latex_visit_math(self, node):
def latex_visit_displaymath(self, node):
label = node['label'] and node['docname'] + '-' + node['label'] or None
if node['nowrap']:
self.body.append(r'\label{%s}' % label)
self.body.append(node['latex'])
else:
label = node['label'] and node['docname'] + '-' + node['label'] or None
self.body.append(wrap_displaymath(node['latex'], label,
self.builder.config.math_number_all))
raise nodes.SkipNode