When I use TeX4ht to produce MathML, it produces an image when I use \mathcal in the equation. The result is that MathJax complains that the code is not valid. Is there a way to fix this problem?

Minimal working example, to be compiled with latex and tex4ht:




The resulting html file contains

<mi mathvariant="bold-script">
  <img src="cmsy10-4c.png" alt="L" class="10x-x-4c" />

How can I get rid of the img tag? And how come it is recognised as bold-script?


Please use the following command to generate mathml:

mzlatex <file> 'xhtml,mathml,charset=utf-8' ' -cunihtf'
  • Brilliant! What did it for me is to call tex4ht with the option -cmozhtf (I don't have mzlatex on my system, by I believe this is equivalent). Thanks a lot! – Olivier Oct 6 '12 at 10:51
  • OK. In that case, you can call htlatex with the above options. – CV Radhakrishnan Oct 6 '12 at 11:35
  • Uh... unfortunately, this breaks the calls to \mathfrak. That is, \mathfrak{g} now displays like a regular g, instead of fraktur. Is there a way to have both working? – Olivier Oct 6 '12 at 13:17
  • I see, now it works, with the option -cunihtf. Thanks a lot!!! – Olivier Oct 6 '12 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.