[tex4ht] How to find causes of WARNING] domfilter: DOM parsing of indexsubsection477.htm failed:

Michal Hoftich michal.h21 at gmail.com
Sat Sep 21 21:11:19 CEST 2024


Hi Nasser,

On Sat, Sep 21, 2024 at 2:04 AM Nasser M. Abbasi <nma at 12000.org> wrote:

> I keep getting lots of messages
>
> [WARNING] domfilter: DOM parsing of indexsubsection475.htm failed:
> [WARNING] domfilter:
> ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced
> Tag (/span) [char=61990]
>
> [WARNING] domfilter: DOM parsing of indexsubsection477.htm failed:
> [WARNING] domfilter:
> ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced
> Tag (/span) [char=61400]
>
> [WARNING] domfilter: DOM parsing of indexsubsection477.htm failed:
> [WARNING] domfilter:
> ...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced
> Tag (/span) [char=61400]
>
> On some files when compiling using tex4ht.
>
> But I am having hard time figuring the source of these.
>

This message means that the generated HTML file cannot be parsed as XML. It
will most likely look fine in the browser, but DOM filters won't be
executed on such a file.  The usual cause is that some tags are wrongly
nested. You can find the place where the error happens by looking at the
byte position in the file specified by the value after char.

The development version of make4ht can print the problematic code with the
-a debug option. It will also parse your file again with the HTML parser,
so DOM filters will be executed.

But the underlying issue in your code should be fixed anyway. It will be
most likely a wrong configuration. Try to find one place in your output
file that causes the error and find the corresponding LaTeX code in your
source. This way, you should be able to make a MWE.

Best regards,
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20240921/651ff8f2/attachment.htm>


More information about the tex4ht mailing list.