The following code produce a error :

\task one \par
New par
\task two 

I compile with make4ht file.tex "mathml,mathjax", i use texlive 2022 up to date (23/12/2022).

I have a warning from make4ht :

[WARNING] domfilter: DOM parsing of file.html failed:
[WARNING] domfilter: ...ive/2022/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag (/div) [char=712]

1 Answer 1


It seems that paragraphs are wrongly handled in the tasks environment, which leads to HTML tags mismatch and the DOM error. It should be fixed with this config file:


{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="tasks">}\def\end:task{}}
{\EndP\end:task\HCode{<div class="task"><span class="label">}\def\end:task{\HCode{</div>}}}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .