<div dir="ltr"><div dir="ltr"><div>Your MWE worked fine for me with no compilation messages other than for package loading, fully valid HTML 5, and nominal display in Firefox (using MathJax). I suppose that I should say that I'm using TeXLive 2017 with no updating. Also I'm using a tex4ht invocation based on mk4ht from 2012, i.e., "mk4ht xhmlatex $1 ht5mathjax"</div><div>where ht5mathjax.cfg is:</div><div><br></div><div>\Preamble{xhtml,mathml}<br>\Configure{VERSION}{}<br>\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}<br>\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}<br>\Configure{@HEAD}{}<br>\Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}<br>\Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht<br>(<a href="http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/">http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/</a>)" />\Hnewline}}<br>\Configure{@HEAD}{\HCode{<link<br> rel="stylesheet" type="text/css"<br> href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}<br>\begin{document}<br>\EndPreamble<br></div><div><br></div><div><br></div><div>Maybe something in your local system must causing you trouble.</div><div><br></div><div> -- Bill</div><div><br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 21, 2019 at 7:05 PM Nasser M. Abbasi <<a href="mailto:nma@12000.org">nma@12000.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">good news. global search and replace of<br>
\begin{array} --> {\begin{array} and<br>
\end{array}---> \end{array}} worked and nothing else broke.<br>
<br>
I was able to compile this now with mathjax.<br>
<br>
But it will be nice if one can better understand why this<br>
happens as I am sure this will come up again.<br>
<br>
--Nasser<br>
<br>
<br>
On 1/21/2019 8:41 PM, Nasser M. Abbasi wrote:<br>
> This problem I've seen before. But now I have this large latex file<br>
> that I am trying to compile, which has 1000's of such constructs<br>
> as follows.<br>
> <br>
> A tabular which contains math entries like this in a cell:<br>
> <br>
> \[\left[<br>
> \begin{array}{cc}<br>
> 0 & 1 \\<br>
> -25 & -4<br>
> \end{array}<br>
> \right]<br>
> \]<br>
> <br>
> latex has no problem with these, nor svg or png. But mathjax<br>
> does not like it. Here is MWE<br>
> <br>
> ===================================<br>
> \documentclass[11pt]{article}<br>
> \usepackage{amsmath}<br>
> \begin{document}<br>
> <br>
> \begin{tabular}[c]{|p{2in}|p{2in}|}<br>
> test<br>
> &<br>
> \[\left[<br>
> \begin{array}{cc}<br>
> 0 & 1 \\<br>
> -25 & -4<br>
> \end{array}<br>
> \right]<br>
> \]<br>
> \end{tabular}<br>
> \end{document}<br>
> ======================================<br>
> <br>
> make4ht -ulm draft foo.tex "htm,mathjax"<br>
> gives<br>
> <br>
> (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux)<br>
> (/usr/local/texlive/2018/texmf-dist/tex/latex/lm/ot1lmtt.fd)<br>
> Runaway argument?<br>
> \left [\begin {array}{cc} 0 \@endpbox \hskip \tabcolsep \hskip -.5\arrayrulewi<br>
> dth \ETC.<br>
> ! Forbidden control sequence found while scanning use of \AltlDisplay.<br>
> <inserted text><br>
> \par<br>
> l.12 0 &<br>
> 1 \\<br>
> ? C<br>
> <br>
> The fix is to add { and } inside the math, like this<br>
> <br>
> ================<br>
> \documentclass[11pt]{article}<br>
> \usepackage{amsmath}<br>
> \begin{document}<br>
> \begin{tabular}[c]{|p{2in}|p{2in}|}<br>
> test<br>
> &<br>
> \[\left[<br>
> {\begin{array}{cc}<br>
> 0 & 1 \\<br>
> -25 & -4<br>
> \end{array}<br>
> }<br>
> \right]<br>
> \]<br>
> \end{tabular}<br>
> \end{document}<br>
> ==============================<br>
> <br>
> Notice the "{" added before \begin{array} and at end.<br>
> <br>
> But it is not possible for me to edit manually this large<br>
> file and add {} everywhere, as there are thousands of such places.<br>
> <br>
> I'll try global search and replace and hopefully not break anything else.<br>
> <br>
> But is there a reason why this problem keeps hapenning with mathjax<br>
> and no other system? Is this a mathjax issue itself<br>
> or the translation to mathjax done by tex4ht?<br>
> <br>
> Thank you<br>
> --Nasser<br>
> TL 2018<br>
> <br>
> <br>
> <br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">William F Hammond<br>Email: <a href="mailto:gellmu@gmail.com" target="_blank">gellmu@gmail.com</a><br><a href="https://www.facebook.com/william.f.hammond" target="_blank">https://www.facebook.com/william.f.hammond</a><br><a href="http://www.albany.edu/~hammond/" target="_blank">http://www.albany.edu/~hammond/</a><br><br></div></div>