3

The following code produce a error :

\documentclass{article}
\usepackage{amsmath}
\usepackage{tasks}
\begin{document}
\begin{tasks}(2)
\task one \par
New par
\task two 
\end{tasks}
$\dfrac{3}{2}$
\end{document}

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

4

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:

\Preamble{xhtml}

\catcode`\:=11
\ConfigureList{tasks}
{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="tasks">}\def\end:task{}}
{\ifvmode\IgnorePar\fi\EndP\end:task\HCode{</div>}}
{\EndP\end:task\HCode{<div class="task"><span class="label">}\def\end:task{\HCode{</div>}}}
{\HCode{</span>}\noindent\ShowPar}
\catcode`\:=12
\begin{document}
\EndPreamble

enter image description here

You must log in to answer this question.

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