Thank you Michal for the fix!
Verified it works and I do not see these DOM warnings any more.
Strange thing is that when looking at the generated HMTL (before using your
fix),
I could not see anything wrong, at least nothing that seems obviously wrong.
I assume these warnings are put there as extra protection
to make sure the page generated is well formed just in case.
But I always worry when I see these DOM warning because I think
I did something wrong in my Latex.
Regards,
--Nasser
On 4/10/2025 3:11 AM, Michal Hoftich wrote:
Hi Nasser,
Any idea what causes this?
thanks for the report. Paragraphs are handled incorrectly before the end of
the algorithmicx environment. This config file should fix that:
%%%%%%%%%%%%%%
\Preamble{xhtml}
\ConfigureEnv{algorithmic}
{\ifvmode \IgnorePar\fi \EndP
\HCode{<div class="algorithmic">}%
\bgroup
\Configure{HtmlPar}
{\EndP}
{\EndP}
{}
{}%
}
{\egroup
\ifvmode\IgnorePar\fi\EndP\HCode{</div>}\par\ShowPar
}
{}{}
\begin{document}
\EndPreamble
%%%%%%%%%%%%%%%%
I will add the fix to TeX4ht sources too.
Best,
Michal