[tex4ht] Another problem compiling tex4ht to HTML using mathjax mode. Forbidden control sequence found while scanning use of \AltMathOne.

Nasser M. Abbasi nma at 12000.org
Mon Oct 15 00:56:39 CEST 2018

I've found another issue using mathjax mode with make4ht.

The following MWE compiles OK using lualatex and when using
svg and when using default png. But when using mathjax it gives
strange error:

(/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux))
Runaway argument?
\int _{0}^{1}x\ J_{p}\left ( ax\right ) \ J_{p}\left ( bx\right ) \ d\ETC.
! Forbidden control sequence found while scanning use of \AltMathOne.
<inserted text>
l.8 0 &
       if\ a\neq b\\
? x

This code comes from auto-generated Latex code. But as I said
above, it compiles OK, except when using mathjax. So it seems
some conflict with may be the style file used or something
mathjax does not like?

I am using the same command:

make4ht -ulm default  -c ./nma_mathjax.cfg
         foo.tex "htm,notoc*,p-width,charset=utf-8" " -cunihtf -utf8"

Where nma_mathjax.cfg is (using the minimal version)


The file mathjax-latex-4ht.sty was downloaded from


When I remove the mathjax, it compiles OK, i.e. using this command

make4ht -ulm default foo.tex
        "htm,notoc*,p-width,charset=utf-8" " -cunihtf -utf8"

No error.

Here is the latex file
Orthogonality & $\int_{0}^{1}x\ J_{p}\left(  ax\right)  \ J_{p}\left(
bx\right)  \ dx=\left\{
0 & if\ a\neq b\\
\frac{1}{2}J_{p+1}^{2}\left(  a\right)  =\frac{1}{2}J_{p-1}^{2}\left(
a\right)  =\frac{1}{2}J_{p}^{^{\prime}2}\left(  a\right)   & if\ a=b
\right.  \ a,b$ are zeros of $J_{p}$\\\hline
recursive formula & $\frac{d}{dx}\left[  x^{p}J_{p}\right]  =x^{p}J_{p-1}$,
\ \ $\frac{d}{dx}\left[  \frac{1}{x^{p}}J_{p}\right]  =-\frac{1}{x^{p}}%
J_{p+1},$ \ \ $J_{p-1}+J_{p+1}=\frac{2p}{x}J_{p},$ \ \ \ $J_{p-1}%


In case the above gets messed up in the email, I've also put a copy


Thanks for any hints on what the problem is.  This mathjax seems
like a tricky thing integrate with tex4ht. I am only using it
becuase it makes compiling with tex4ht very fast.


More information about the tex4ht mailing list