[tex4ht] [bug #226] Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc
William F Hammond
gellmu at gmail.com
Fri Nov 22 23:43:35 CET 2019
Greetings to all:
(This thread goes back to 2014, but Michal posted today.)
On Fri, Nov 22, 2019 at 5:30 AM Michal Hoftich wrote:
> Follow-up Comment #5, bug #226 (project tex4ht):
>
> I've found an issue with this approach - the \PauseMathClass will prevent
> correct tagging of nested structures. For example:
>
> \mathit{\overline{a}+\overline{b}}
>
> This will result in
>
> <mover class='mml-overline' accent='false'><mrow>b</mrow><mo
> accent='true'>¯</mo></mover>
>
> The b character should be placed in <mi> element. So I think we should
> revert
> back to the use of <mstyle>.
>
> 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.)
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.
It may make this a bit clearer if I show you how *overline *and *mathbf *might
be handled with CSS:
overline {
padding-top: 0.1ex;
border-top: 0.2ex solid;
}
mathbf {
font-weight: bold;
}
That his is not vapor may be seen here:
https://www.albany.edu/dept/math-stat/hammond/demos/mathbfOverline-lm.xml
which is the XML shadow, styled solely with CSS (no MathJax), of the
LaTeX-like source:
https://www.albany.edu/dept/math-stat/hammond/demos/mathbfOverline-glm.txt
-- Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20191122/e99bd850/attachment.html>
More information about the tex4ht
mailing list