[tex4ht] domfilter errors with the new option fastmathjax when using breqn.
Nasser M. Abbasi
nma at 12000.org
Thu Dec 5 20:29:10 CET 2024
On 12/5/2024 6:49 AM, Michal Hoftich wrote:
>
> In this case, you can try this version of the build file. It escapes < and
>> in Dmath. If you have problems with other math environments, it would
> need an update.
>
> Best regards,
> Michal
>
Thank you Michal for the quick fix for config.lua.
It did fix the issue with the above, related to using breqn.
I spend more time making MWE for more cases of domfilter
errors I was seeing on this one larger file, which only shows up
when add fastmathjax.
The strange thing, these happen now using normal math (i.e. no breqn and
no config.lua needed). Just inline math.
Here are two examples. I think they are both related to using $<$ in
normal math.
All of these are compiled using the same command
make4ht -ulm default -a debug -c ./nma_mathjax.cfg FILE.tex "mathjax,fastmathjax,htm"
When removing fastmathjax, now they compile OK. Notice that no breqn
is used and no config.lua is needed.
Where FILE.tex above is any one of the following MWE.
--- main_1.tex ---
\documentclass[12pt]{book}
\usepackage{amsmath}
\begin{document}
inside the rectangle $-1<x<1$ and for all $y$.
\end{document}
Output of compile command is
....
[INFO] make4ht-lib: parse_lg process file: main_1.htm
[WARNING] domfilter: XML DOM parsing of main_1.htm failed:
[WARNING] domfilter: ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag (/p) [char=5321]
[DEBUG] domfilter: Error context:
<span class="mathjax-inline">\(-1<x<1\)</span> and for all <span class="mathjax-inline">\(y\)</span>.
</p>
</body>
</html>
[DEBUG] domfilter: Trying HTML DOM parsing
[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed
[INFO] make4ht-lib: parse_lg process file: main_1.htm
--- main_2.tex ---
\documentclass[12pt]{book}
\usepackage{amsmath}
\begin{document}
We want $y^{2}<1$.
\end{document}
Out of compile command
[INFO] make4ht-lib: parse_lg process file: main_2.htm
[WARNING] domfilter: XML DOM parsing of main_2.htm failed:
[WARNING] domfilter: ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag (/p) [char=5255]
[DEBUG] domfilter: Error context:
ead><body
>
<!--l. 8--><p class="noindent" >We want <span class="mathjax-inline">\(y^{2}<1\)</span>.
</p>
</body>
</html>
[DEBUG] domfilter: Trying HTML DOM parsing
[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed
----------------------------------------
I see more domfilter problems, but I am not able so far to find where
in the source they come from, Here are output on terminal of one of them
[INFO] make4ht-lib: parse_lg process file: indexsubsubsection141.htm
[WARNING] domfilter: XML DOM parsing of indexsubsubsection141.htm failed:
[WARNING] domfilter: ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag (/body) [char=7562]
[DEBUG] domfilter: Error context:
/a>] </p></div>
<!--l. 7068--><p class="noindent" ><a
id="tailindexsubsubsection141.htm"></a> </p>
</body>
</html>
[DEBUG] domfilter: Trying HTML DOM parsing
[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed
You see, messages does not say which file or line number so can't make MWE.
I am hoping that if the issue with $<$ is fixed, these will all automatically
go away and these might be due to the earlier errors?
So I will wait for your next version of fastmathjax that fixes the above
and will try again and test more.
In the above command I show, I am using the same nma_mathjax.cfg I put link
to in last email. Here it is again:
<https://12000.org/tmp/domfilter_make4ht/>
Please let me know if you like me to try anything on my end.
Thanks for your support of tex4ht,
--Nasser
More information about the tex4ht
mailing list.