# Cannot use non-html5 equations #809

Closed
opened this issue Nov 2, 2016 · 6 comments
Labels
Milestone

### ianhbell commented Nov 2, 2016

 First off, excellent work with this package. I am able to convert a rather complex document to html5 with lots of equations and images. Ultimately my target is to get back to a Word document from a latex document. I think I am not far off. That said, latexml always borks when I try to tell it to use svg or png equations (with --mathsvg or --mathimages respectively). The HTML5 equations will obviously be no good in Word. I always get this error: Fatal:perl:die Perl died Postprocessing LaTeXML::Post::MathML::Presentation Paper.html Wide character in subroutine entry at /usr/share/perl5/LaTeXML/Post.pm line 1188.  It would be nicer if the error would not kill LateXML, rather it would just skip that equation.
added this to the LaTeXML-0.8.3 milestone Nov 2, 2016

### ianhbell commented Nov 2, 2016

 It turns out the offending character was a en-dash from the cp1252 character set (as in not the ASCII dash). This bad guy: http://unicode-table.com/en/2013/

### dginev commented Nov 3, 2016 • edited

 Was that character in the original input document, or it was created internally during math parsing? Very valid bug report here, will be fixed.

### ianhbell commented Nov 3, 2016

 It was in the original LaTeX document. Actually, I had converted a Word document to LaTeX by copy-paste (not the most elegant solution, but the fine-tuning was simple enough). I think that's how the character ended up there. The en-dash are a real pain from the copy-paste standpoint.

### dginev commented Nov 3, 2016

 That said, it shouldn't really break latexml, which is unicode-aware. Could you share the formula that had the unicode dash with us? Maybe we can use it to reproduce and find an elegant fix.

### ianhbell commented Nov 3, 2016

 Perhaps this would do it (it was actually an inline equation, but I think the problem is the same): $s_{\rm res}(T,\rho) = s(T,\rho) – s^0(T,\rho)$

### brucemiller commented Nov 27, 2016

 hmm, it seems that tied hashes don't like to get utf passed to them? I've patched that up and it runs without error (or even warning). However, I wonder that it gives what you want: LaTeX (even outside of LaTeXML) essentially ignores the en-dash; perhaps it was intended to be a minus?