# tex4ht mathml output: how to get <mi>abc</mi> instead of <mi>a</mi><mi>b</mi><mi>c</mi>

tex4ht with mathml option generates <mi>a</mi><mi>b</mi><mi>c</mi> from $abc$. Is there a way to get <mi>abc</mi> output?

MWE (foo.tex):

\documentclass{article}
\begin{document}
$abc$
\end{document}


tex4ht run htlatex foo 'html,mathml'

If you want to generate <mi>abc</mi> the latex input should be \mathrm{abc}
• you are absolutely right. That's my ignorance of mathml. Mathml renders single char as italic and multi-characters are rendered as roman. To have multi-characters rendered as italic, I need to set <mi mathvariant="italic">abc<mi> , what I actually meant in my question. Now I see, my question is quite pointless, as setting mathvariant attribute does make sense to a sequence of characters, but does not make sense to a single character. Therefore, thank you for enlightening me and i accept you answer. – deimi Oct 3 '14 at 8:54
• @deimi it's not just the mathml markup $abc$ is incorrect TeX markup for a multiletter identifier: it is designed to use the math italic font and look like the implied product of three variables, \mathit{abc} on the other hand uses the text italic font and is designed to look like a single italic identifier (and makes a single mi in mathml) – David Carlisle Oct 3 '14 at 8:58