# [tex4ht] Is this a known problem with tex4ht mathjax mode? array inside table

Nasser M. Abbasi nma at 12000.org
Tue Sep 24 03:13:55 CEST 2019

On 9/22/2019 3:58 PM, Michal Hoftich wrote:
> Hi Nasser,
>
> (/usr/local/texlive/2019/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo1.aux)
>> (/usr/local/texlive/2019/texmf-dist/tex/latex/lm/ot1lmtt.fd)
>> Runaway argument?
>> f\left ( x\right ) =\left \{ \begin {array}[c]{ccc} -1 \@endpbox \hskip \ETC.
>> ! Forbidden control sequence found while scanning use of \AltMathOne.
>> <inserted text>
>> \par
>> l.10         -1 &
>>                    & -\pi\leq x\leq0\\
>> ?
>> ---
>
> this seems to be a catcode issue. It is caused by the & characters
> in array. This can be fixed by redefining catcode for the math and
> resetting it back after. Try the following configuration file:
>
> \Preamble{xhtml}
> \def\HandleMathjaxCatcodes{\edef\RestoreMathjaxCatcodes{\catcode\noexpand
> \&=\the\catcode\&}\catcode\&=11}
> \Configure{\$}{\HandleMathjaxCatcodes}{\RestoreMathjaxCatcodes}{\expandafter\AltMathOne}
> \Configure{()}{\HandleMathjaxCatcodes\catcode\&=11\AltlMath}{\RestoreMathjaxCatcodes}
> \Configure{[]}{\HandleMathjaxCatcodes\catcode\&=11\AltlDisplay}{\RestoreMathjaxCatcodes}
> \begin{document}
> \EndPreamble
>
> I will push the fix to the sources.
>
> Best regards,
> Michal
>

Thank you very much Michal for the above fix.

I just got the chance to verify it and it worked very well.

I think will wait for the update to go into official source
and then do TL update to get your fix that way.

This way I do not need to update my .cfg files now and then
having to remember to remove this code from again later.

my tex4ht .cfg files are too complicated allready, they have code in
them that I have no idea what they do now :)

Best,
--Nasser

`