[tex4ht] why \newcommand{\eslowast}{} has no effect in tex4ht with mathjax mode?

Nasser M. Abbasi nma at 12000.org
Thu Nov 18 01:31:29 CET 2021


I use maple latex package when compiling Latex, since lots of Latex I use
is generated by Maple and it has its own Latex macros.

It has one command used which is not defined anywhere. may be a bug.

So it disabled it in the latex file as follows, in order to compile the file

     \usepackage{maple}
     \newcommand{\eslowast}{}

When compiling to pdf using lualatex, the above works, and \eslowast is basically gone
and does not affect anything and everything is generated correctly.

But when compiling to mathjax, \eslowast still shows up in the HTML and
rendering the page shows it in red color since mathjax does not know
what the command \eslowast is.

Please see one such page here (near the end of the page)

https://12000.org/my_notes/solving_ODE/current_version/insu1298.htm#1205

I know that when compiling to mathjax, tex4ht basically passes the math over
to mathjax.  My question is: does this mean tex4ht
ignores \newcommand{\eslowast}{} ?  Should it have?

This was easy to fix. I edited my mathjax.cfg and added

\Configure{MathJaxConfig}{{
     macros: {
       eslowast: ["{}"],
       etc...
}}}

And now when compiling to HTML, this command no longer shows
and it no longer causes a problem and math is fine.

But why was this needed, since I disabled the command in Latex itself. This
is what I am wondering about.

Thanks
--Nasser


More information about the tex4ht mailing list.