#210: Fix nesting of HTML tags for displayed math from pngmath extension.

This commit is contained in:
Georg Brandl 2009-07-09 12:08:42 +02:00
parent 852cdf6a20
commit 5569f89de2
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,9 @@
Release 0.6.3 (in development)
==============================
* #210: Fix nesting of HTML tags for displayed math from pngmath
extension.
* #213: Fix centering of images in LaTeX output.
* #211: Fix compatibility with docutils 0.5.

View File

@ -223,12 +223,11 @@ def html_visit_displaymath(self, node):
self.body.append('<span class="eqno">(%s)</span>' % node['number'])
if fname is None:
# something failed -- use text-only as a bad substitute
self.body.append('<span class="math">%s</span>' %
self.body.append('<span class="math">%s</span></p>\n</div>' %
self.encode(node['latex']).strip())
else:
self.body.append('<img src="%s" alt="%s" />\n</div>' %
self.body.append('<img src="%s" alt="%s" /></p>\n</div>' %
(fname, self.encode(node['latex']).strip()))
self.body.append('</p>')
raise nodes.SkipNode