[tex4ht] [bug #244] “Display math should end with $$” when using MathML with amsmath and \fbox with tex4ht

Michal Hoftich puszcza-hackers at gnu.org.ua
Sun Feb 8 16:00:26 CET 2015


URL:
  <http://puszcza.gnu.org.ua/bugs/?244>

                 Summary: “Display math should end with $$” when using
MathML with amsmath and \fbox with tex4ht
                 Project: tex4ht
            Submitted by: michal_h21
            Submitted on: Sun 08 Feb 2015 05:00:25 PM EET
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 08 Feb 2015 05:00:26 PM EET  Name: mathml.4ht  Size: 120kB   By:
michal_h21

<http://puszcza.gnu.org.ua/bugs/download.php?file_id=191>
-------------------------------------------------------
Date: Sun 08 Feb 2015 05:00:26 PM EET  Name: sample.tex  Size: 626B   By:
michal_h21

<http://puszcza.gnu.org.ua/bugs/download.php?file_id=192>
-------------------------------------------------------
Date: Sun 08 Feb 2015 05:00:26 PM EET  Name: aatext.patch  Size: 390B   By:
michal_h21

<http://puszcza.gnu.org.ua/bugs/download.php?file_id=193>

    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?244>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



More information about the tex4ht mailing list