[tex4ht] Help on mathjax V3 configuration. Syntax error

Nasser M. Abbasi nma at 12000.org
Sun Mar 15 20:20:39 CET 2020

Using mathjax mode in tex4ht.

mathjax V3.0 has new configuration. The old


Which Michael helped me before in setting up no longer works under V3.0


They put a tool to help one in converting V2.0 to V3.0


pasting the old V2.0 configuration in the top window, it generates
new V3.0 configuration code.

So I did this for mine and replaced the old V2.0 code in my .cfg with
the new one that the web site above generated.

But now make4ht gives syntax error when I compile  MWE latex file with
the new V3.0 configuration code

(/usr/local/texlive/2019/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux)
! Undefined control sequence.
\\  ->\let \reserved at e
                        \relax \let \reserved at f \relax \@ifstar {\let \reserv...

l.101 \EndPreamble

I added the new V3.0 configuration in my .cfg as follows


%V3.0 copied from the conversion tool
window.MathJax = {
   tex: {
     maxBuffer: 40*1024,


While the old V2.0 had this

\Configure{@HEAD}{\HCode{ <script type="text/javascript"

         TeX: {
   MAXBUFFER: 40*1024,

\regex_replace_all:nnN{ \x{23}\x{23}}{\x{23}}{\mymathjaxconf}

It might be related to not using \detokenize and \regex_replace_all
now? But I do not know how to use the above macros and if they are
still needed now.

I put a MWE and my .cfg and foo.tex in this folder.


To reproduce and see the error, please type the command

make4ht -ulm default -c ./nma_mathjax.cfg foo.tex

Using TL 2019 on Linux ubuntu

which make4ht

Thank you

More information about the tex4ht mailing list.