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

Nasser M. Abbasi nma at 12000.org
Thu Dec 5 03:27:38 CET 2024


I have been testing the new option  fastmathjax that Michal added
to speed up tex4ht.

I have been seeing lots of new domfilter warnings since then.

Finally I am now able to make MWE that shows this issue and see
its effect in the HTML.

I use breqn heavily in the code and Michal made a nice
filter for make4ht which automatically changes all dmath* to
align* when translating to mathjax. It is called config.lua
which I put in $HOME/.config/make4ht/config.lua

This way the latex code does not have to use special
code for pdf and one for HTML which really simplifies things.

The new domfilter problems only show when adding the new
option fastmathjax.

I've put in a zip file everything needed to produce this and see
the problem. I also uploaded the whole folder.

Here it is

<https://12000.org/tmp/domfilter_make4ht/>

In the above folder you will see the .tex file and all other files
needed and also the zip file which contain the content of the folder
to make it easier to download the folder.

The command to compile is

------------------------------------
make4ht -ulm default -a warning  -c ./nma_mathjax.cfg -e ./config.lua  main.tex "mathjax,fastmathjax,htm"
[WARNING] domfilter: XML DOM parsing of main.htm failed:
[WARNING] domfilter: ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag (/body) [char=5294]

[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed
-----------------------------------

Here is screen shot showing the output

<https://12000.org/tmp/domfilter_make4ht/HTML_output_with_fastmathjax.png>

If I remove the option fastmathjax the output is now correct and the breqn
code is translated to mathjax with no problem:

<https://12000.org/tmp/domfilter_make4ht/HTML_output_no_fastmathjax.png>

The main.tex is

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

Solve

\begin{dmath*}
\{t <0\boldsymbol{\lor}0<t\}
\end{dmath*}

\end{document}
-------------------

The code generated inside the math env. is all by CAS software, and
the program just adds \begin{dmath*} and \end{dmath*} around it.

Using latest TL 2024 on Linux Ubuntu.

make4ht version v0.4b
>tex4ht --version

>latex --version
pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024)
kpathsea version 6.4.0
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.43; using libpng 1.6.43
Compiled with zlib 1.3.1; using zlib 1.3.1
Compiled with xpdf version 4.04


Thank you,
--Nasser



More information about the tex4ht mailing list.