# [tex4ht] [bug #226] Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc

Michal Hoftich michal.h21 at gmail.com
Mon Nov 25 14:40:38 CET 2019

Hi Bill,

>> The original issue of spurious <mi> elements for longer texts can be fixed
>> using post-processing - make4ht provides common_domfilters extension, which
>> does  exactly this.
>>
>
> Can such post-processing be reliably robust?  (I doubt it.)
>

We have a DOM processing library in make4ht, which is quite powerful.
It can join several elements with the same name and same attributes to
one. We already use this code to join numbers in MathML, which are
produced as <mn>1</mn<mn>2</mn> by default. I

> I don't think that I really have anything new to say.  It's only that I think this type of issue
> makes the case for profiled source documents.  I wrote a more detailed comment with
> illustrations in LaTeX, ran it through tex4ht linked to MathJax, and posted it here:
>
>       https://www.albany.edu/dept/math-stat/hammond/demos/mathitOverline.html
>
> where one sees MathJax cough on the *first* MathML error, which is having the 'a' loose
> in an mrow.
>

Yes, we can say that the issues like this are often caused by wrong
user input, but they usually don't want to change their way.
Especially if it would mean to correct hundreds of already written
formulas. They also usually don't agree that their way is wrong. I
think we need to accept it, even if it means much more work and