Thu Jul 31 17:49:24 2014, original submission:
As was pointed out by David Carlisle, there are spurious `<mi>` elements in the output of $\mathit{hello }\mathbf{world}$ when converted to mathml:
<math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mstyle mathvariant="italic"><mi
>h</mi><mi
>e</mi><mi
>l</mi><mi
>l</mi><mi
>o</mi></mstyle>...
it should be
<mstyle mathvariant="italic">hello</mstyle>
configuration of these commands is as follows:
\Configure{mathit}%
{\bgroup \Tg<\a:mathml mstyle mathvariant="\ifx
\bold:version\math@version bold-\fi italic">}%
{\Tg</\a:mathml mstyle>\egroup }%
I've found that generation of these spurious `<mi>` elements can be suppressed with `\PauseMathClass` command. There is Eitan's comment in tex4ht-mathml.tex:
-----------
Used to be
\begin{verbatim}
\Configure{mathrm}{\Tg<\a:mathml mi \mml:class="mathrm">\PauseMathClass}%
{\EndPauseMathClass\Tg</\a:mathml mi>}%
\Configure{mathbf}{\Tg<\a:mathml mi \mml:class="mathbf"
mathvariant="bold">\PauseMathClass}%
{\EndPauseMathClass\Tg</\a:mathml mi>}%
\end{verbatim}
------------
so it seems that `\PauseMathClass` was used in the past, but for some reason it is not now.
I created config file with `\PauseMathClass` in configuration of `\math...` commands, which converts example correctly to:
------------
<math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mstyle mathvariant="italic">hello</mstyle><mstyle mathvariant="bold">world</mstyle></math>
------------
If no issues are found and we don't find why `\PauseMathChar` isn't used in the configurations, when it was used in the past, I will make patch for the literary sources.
|