Commits

Robert Mařík committed ffceb87

fixed parsing of "<p><span>text $-1$ text</span></p>"

Comments (0)

Files changed (2)

 % and add your customizations like this file below.
 %
 \documentclass[a4paper]{article}
-\usepackage{xcolor,amsmath,graphics,hyperref}
+\usepackage{xcolor,amsmath,graphicx,hyperref}
 \usepackage{attachfile}
 \usepackage{colortbl}
 \usepackage[margin=1in]{geometry}
                 if style.has_key('font-family'):
                     self.add_data()
                     self.latex[-1] += '}' # close group
+            try:
+                self.add_data()  # to make test_3 below work
+            except:
+                pass
+
 
         elif tag == 'div' and self.in_math_mode == True:
             self.in_math_mode = False
 <p>Nested Tags: <a href="http://www.sagemath.org">This is <strong>all <em>inside a html $x^2$ link to the</em> sage</strong> website.</a> Outside of link.</p>
 """
 
+
+test_3 = r"""
+<p><span>We multiply the last row by $-1$ and add to the first row</span></p>
+"""
+
 # Test program
 if __name__ == '__main__':
     parser = Html2Latex()
-    print parser.parse_html(test_2)
+    print parser.parse_html(test_3)