3

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:

\documentclass{article}

\usepackage[xhtml,mathml]{tex4ht}

\begin{document}
$\mathcal{L}$
\end{document}

The resulting html file contains

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

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

1 Answer 1

4

Please use the following command to generate mathml:

mzlatex <file> 'xhtml,mathml,charset=utf-8' ' -cunihtf'
4
  • 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
    Commented Oct 6, 2012 at 10:51
  • OK. In that case, you can call htlatex with the above options. Commented Oct 6, 2012 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
    Commented Oct 6, 2012 at 13:17
  • I see, now it works, with the option -cunihtf. Thanks a lot!!!
    – Olivier
    Commented Oct 6, 2012 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .