[tex4ht] another problem with mathjax mode: Forbidden control sequence found while scanning use of \AltlDisplay
William F Hammond
gellmu at gmail.com
Tue Jan 22 05:02:42 CET 2019
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"
where ht5mathjax.cfg is:
\Preamble{xhtml,mathml}
\Configure{VERSION}{}
\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
\Configure{@HEAD}{}
\Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht
(http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}
\Configure{@HEAD}{\HCode{<link
rel="stylesheet" type="text/css"
href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}
\begin{document}
\EndPreamble
Maybe something in your local system must causing you trouble.
-- Bill
On Mon, Jan 21, 2019 at 7:05 PM Nasser M. Abbasi <nma at 12000.org> wrote:
> good news. global search and replace of
> \begin{array} --> {\begin{array} and
> \end{array}---> \end{array}} worked and nothing else broke.
>
> I was able to compile this now with mathjax.
>
> But it will be nice if one can better understand why this
> happens as I am sure this will come up again.
>
> --Nasser
>
>
> On 1/21/2019 8:41 PM, Nasser M. Abbasi wrote:
> > This problem I've seen before. But now I have this large latex file
> > that I am trying to compile, which has 1000's of such constructs
> > as follows.
> >
> > A tabular which contains math entries like this in a cell:
> >
> > \[\left[
> > \begin{array}{cc}
> > 0 & 1 \\
> > -25 & -4
> > \end{array}
> > \right]
> > \]
> >
> > latex has no problem with these, nor svg or png. But mathjax
> > does not like it. Here is MWE
> >
> > ===================================
> > \documentclass[11pt]{article}
> > \usepackage{amsmath}
> > \begin{document}
> >
> > \begin{tabular}[c]{|p{2in}|p{2in}|}
> > test
> > &
> > \[\left[
> > \begin{array}{cc}
> > 0 & 1 \\
> > -25 & -4
> > \end{array}
> > \right]
> > \]
> > \end{tabular}
> > \end{document}
> > ======================================
> >
> > make4ht -ulm draft foo.tex "htm,mathjax"
> > gives
> >
> > (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht))
> (./foo.aux)
> > (/usr/local/texlive/2018/texmf-dist/tex/latex/lm/ot1lmtt.fd)
> > Runaway argument?
> > \left [\begin {array}{cc} 0 \@endpbox \hskip \tabcolsep \hskip
> -.5\arrayrulewi
> > dth \ETC.
> > ! Forbidden control sequence found while scanning use of \AltlDisplay.
> > <inserted text>
> > \par
> > l.12 0 &
> > 1 \\
> > ? C
> >
> > The fix is to add { and } inside the math, like this
> >
> > ================
> > \documentclass[11pt]{article}
> > \usepackage{amsmath}
> > \begin{document}
> > \begin{tabular}[c]{|p{2in}|p{2in}|}
> > test
> > &
> > \[\left[
> > {\begin{array}{cc}
> > 0 & 1 \\
> > -25 & -4
> > \end{array}
> > }
> > \right]
> > \]
> > \end{tabular}
> > \end{document}
> > ==============================
> >
> > Notice the "{" added before \begin{array} and at end.
> >
> > But it is not possible for me to edit manually this large
> > file and add {} everywhere, as there are thousands of such places.
> >
> > I'll try global search and replace and hopefully not break anything else.
> >
> > But is there a reason why this problem keeps hapenning with mathjax
> > and no other system? Is this a mathjax issue itself
> > or the translation to mathjax done by tex4ht?
> >
> > Thank you
> > --Nasser
> > TL 2018
> >
> >
> >
>
>
--
William F Hammond
Email: gellmu at gmail.com
https://www.facebook.com/william.f.hammond
http://www.albany.edu/~hammond/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20190121/6201cb49/attachment.html>
More information about the tex4ht
mailing list