TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

Please use the following command to generate mathml:

mzlatex <file> 'xhtml,mathml,charset=utf-8' ' -cunihtf'
share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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