mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 17:02:12 -05:00
Fix could not reference equations if `:nowrap:` option specified
This commit is contained in:
1 parent
8d96c90fc6
commit
0862a4c974
2 files changed
+3
-1
No files matched your search
@@ -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)
|
||||
=====================================
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user