[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))
(/usr/local/texlive/2018/texmf-dist/tex/latex/lm/ot1lmtt.fd)
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>
\par
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)
----------------------
\RequirePackage{mathjax-latex-4ht}
\Preamble{xhtml}
\begin{document}
\EndPreamble
-------------------
The file mathjax-latex-4ht.sty was downloaded from
https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty
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
-----------------
\documentclass[11pt]{article}%
\usepackage{amsmath}
\begin{document}
\begin{tabular}[c]{|l|p{5.5in}|}\hline
Orthogonality & $\int_{0}^{1}x\ J_{p}\left( ax\right) \ J_{p}\left(
bx\right) \ dx=\left\{
\begin{array}[c]{ll}%
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
\end{array}
\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}%
-J_{p+1}=2J_{p}^{\prime}$\\\hline
\end{tabular}
\end{document}
----------------------------------
In case the above gets messed up in the email, I've also put a copy
here
https://www.12000.org/tmp/10142018/foo.tex
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.
--Nasser
More information about the tex4ht
mailing list