[tex4ht] domfilter errors with the new option fastmathjax when using breqn.

Nasser M. Abbasi nma at 12000.org
Thu Dec 5 23:31:10 CET 2024


On 12/5/2024 4:03 PM, Michal Hoftich wrote:

> It is not strange, it is totally expected. These cases illustrate why these
> regular expressions were necessary. Anyway, this version of config.lua
> should process all mathjax contents. Hopefully.
> 
> Best regards,
> Michal
> 

Thanks, but it seems this version of config.lua broke something.

Now even normal math with and without option of fastmathjax do not work.

Here is MWE

---------------------------
\documentclass[12pt]{book}
\usepackage{amsmath}
\begin{document}

where here $p=-2$ and $q=2$ and $n=\frac{1}{2}$. Starting by dividing by
$y^{\frac{1}{2}}$ gives%
\[
y^{\prime}y^{-\frac{1}{2}}-2y^{\frac{1}{2}}=2
\]
\end{document}
-------------------------------

I copied the config.lua you just emailed as attachement to my $HOME/.config/make4ht
and compiled the above using

make4ht -ulm default -a debug  -c ./nma_mathjax.cfg main_3.tex "mathjax,htm"

It gives

[INFO]    make4ht-lib: parse_lg process file: main_3.htm
[WARNING] domfilter: XML DOM parsing of main_3.htm failed:
[WARNING] domfilter: ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag (/div) [char=5417]

[DEBUG]   domfilter: Error context:
ss="mathjax-inline">\(n=\frac {1}{2}\)</span>. Starting by dividing by <span class="mathjax-inline">\(y^{\frac {1}{2}}\)</span> gives</p><div class="mathjax-block">\[ y^{\prime }y^{-\
[DEBUG]   domfilter: Trying HTML DOM parsing
[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed


On my other larger file I also this message

...e/2024/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua:512: stack overflow

The same error shows up with or without fastmathjax option.

If I go back to the earlier version of your config.lua, the above MWE
works OK and compiles with no error with or without fastmathjax.

May be yet new change is needed for config.lua?

Best regards,
--Nasser



More information about the tex4ht mailing list.