URL:
  <https://puszcza.gnu.org.ua/bugs/?652>

                 Summary: tex4ht (TL 2024) gives domfilter: Error on listing
that contains single "
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Wed May 14 08:21:13 2025
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

reference post at 

https://tex.stackexchange.com/questions/742626/tex4ht-tl-2024-gives-domfilter-error-on-listing-that-contains-single

This MWE compiles OK using lualatex but fails with tex4ht.

-------------------
\documentclass[12pt]{book}
\usepackage{xcolor}
\definecolor{bg}{RGB}{255,255,226}
\usepackage{listings,lstautogobble}% added lstautogobble oct 30,2020

\lstdefinestyle{CODE}{%
    language=Mathematica,%
    basicstyle=\ttfamily\normalsize,
    backgroundcolor=\color{bg},
    rulecolor=\color{gray},
    breaklines=false,
    columns=fullflexible,
    keepspaces,
    captionpos={t},
    framerule=0.5pt,
    columns=flexible,
    tabsize=2,
    frame=single,
    frameround=tttt,
    showstringspaces=false,
    aboveskip=12pt,
    belowskip=12pt
}

\lstnewenvironment{CODEinline}{%
  \lstset{style=CODE}}{}
    
\begin{document}    
\section{Bug in simplify(Dirac) in MapleV.4 and Maple V.5   (21.10.98)}

\begin{CODEinline}  
> simplify(");
                              1/2 Dirac(2 x + y)
\end{CODEinline}  
\end{document}
-----------------------

Compiled using

make4ht -ulm default -a debug A.tex 'mathjax,htm'

Gives

-----------------------------------
....
[INFO]    mkutils: Parse LG
[INFO]    make4ht-lib: parse_lg process file: A.htm
[INFO]    make4ht-lib: parse_lg process file: A.htm
[WARNING] domfilter: XML DOM parsing of A.htm failed:
[WARNING] domfilter:
...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced
Tag (/span) [char=3052]

[DEBUG]   domfilter: Error context:
span 
class="ec-lmtt-12">)</span></span>
 
<span class="label"><a 
 id="x1-1003r3"></a></span></pre></span>
   
 
</body> 
</html>
                                                                      
[DEBUG]   domfilter: Trying HTML DOM parsing
[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed
[INFO]    make4ht-lib: parse_lg process file: A.htm
[INFO]    make4ht: No output directory
------------------------------

This MWE compiles OK using lualatex but fails with tex4ht.

\documentclass[12pt]{book}
\usepackage{xcolor}
\definecolor{bg}{RGB}{255,255,226}
\usepackage{listings,lstautogobble}% added lstautogobble oct 30,2020

\lstdefinestyle{CODE}{%
    language=Mathematica,%
    basicstyle=\ttfamily\normalsize,
    backgroundcolor=\color{bg},
    rulecolor=\color{gray},
    breaklines=false,
    columns=fullflexible,
    keepspaces,
    captionpos={t},
    framerule=0.5pt,
    columns=flexible,
    tabsize=2,
    frame=single,
    frameround=tttt,
    showstringspaces=false,
    aboveskip=12pt,
    belowskip=12pt
}

\lstnewenvironment{CODEinline}{%
  \lstset{style=CODE}}{}
    
\begin{document}    
\section{Bug in simplify(Dirac) in MapleV.4 and Maple V.5   (21.10.98)}

\begin{CODEinline}  
> simplify(");
                              1/2 Dirac(2 x + y)
\end{CODEinline}  
\end{document}
Compiled using

make4ht -ulm default -a debug A.tex 'mathjax,htm'
Gives

--------------------
....
[INFO]    mkutils: Parse LG
[INFO]    make4ht-lib: parse_lg process file: A.htm
[INFO]    make4ht-lib: parse_lg process file: A.htm
[WARNING] domfilter: XML DOM parsing of A.htm failed:
[WARNING] domfilter:
...ive/2024/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced
Tag (/span) [char=3052]

[DEBUG]   domfilter: Error context:
span 
class="ec-lmtt-12">)</span></span>
 
<span class="label"><a 
 id="x1-1003r3"></a></span></pre></span>
   
 
</body> 
</html>
                                                                      
[DEBUG]   domfilter: Trying HTML DOM parsing
[WARNING] domfilter: HTML DOM parsing OK, DOM filters will be executed
[INFO]    make4ht-lib: parse_lg process file: A.htm
[INFO]    make4ht: No output directory
----------------------

It is caused by the character " inside > simplify("); changing " to another
character, then tex4ht works and gives no error.

TL 2024 on Linux

>which tex4ht
/usr/local/texlive/2024/bin/x86_64-linux/tex4ht


But this is listing code and it should have worked as is?





    _______________________________________________________

Reply to this item at: <https://puszcza.gnu.org.ua/bugs/?652>

_______________________________________________
Message sent via/by Puszcza <https://puszcza.gnu.org.ua/>

Reply via email to