Sun Feb 8 15:00:25 2015, original submission:
As reported by Nasser M. Abbasi at:
http://tex.stackexchange.com/q/152604/2891
this example fails with mathml output:
<pre>
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\fbox{$\sin(x)=0$} % OK
\]
\begin{equation}
\sin(x)=0 \tag{1} % OK
\end{equation}
\begin{equation}
\fbox{$\sin(x)=0$} \tag{1} %fails only with mathml
\end{equation}
\end{document}
</pre>
the problem is with last \fbox command. After some inspection in tex4ht-mathml.tex I've found that the problem is in \AA:text macro, where inline math is reconfigured and this causes premature closing of math environments.
When I added \ifmmode\else condition for preventing these inline math configurations, the error is gone, but I am afraid that other things which use \AA:text might be broken by this, so more testing is needed.
I've extended example provided by Nasser to include more test cases and had found that for example \intertext is broken with both original and the new version (the example is from David Carlisle, so I expect it is correct).
Three files are attached, path for tex4ht-mathml.tex, generated file mathml.4ht for testing and sample TeX file
|