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

                 Summary: tex4ht gives compile error on code which compiles OK
with lualatex
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Mon Oct 13 23:59:03 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 and screen shots at

https://tex.stackexchange.com/questions/752404/why-this-code-fails-to-compile-with-tex4ht


I am trying to compile very old code (bit convoluted) but compiles OK with
lualatex but gives compile error with tex4ht. 

----------------------------
\documentclass[10pt]{article}%
\begin{document}
    
\begin{tabular}{|l|}\hline
    \begin{tabular}[c]{l}
        $i\in C(J)$\\
        $j\in C(J)$
    \end{tabular}
    \\\hline
    $%
    \begin{tabular}[c]{l}
        $i\in C(J)$\\
        $j\notin C(J)$
    \end{tabular}   
    $ \\\hline
\end{tabular}
\end{document}
--------------------

lualatex gives this PDF

enter image description here

But

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

Gives

---------------------------
(/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./HW1.aux) (/usr/local/texlive/2025/texmf-dist/tex/latex/lm/t1lmtt.fd)
! Missing $ inserted.
<inserted text> 
                $
l.15            $j\notin
                C(J)$
? 
-----------------

Why it fails with tex4ht but not with lualtex? Is this a bug?

The problem goes away when removing the $ around the second row. i.e. this
compiles OK now with tex4ht

--------------------------
\begin{document}
    
\begin{tabular}{|l|}\hline
    \begin{tabular}[c]{l}
        $i\in C(J)$\\
        $j\in C(J)$
    \end{tabular}
    \\\hline    
    \begin{tabular}[c]{l}
        $i\in C(J)$\\
        $j\notin C(J)$
    \end{tabular}   
    \\\hline
\end{tabular}
\end{document}
-----------------

TL 2025 on Linux

>which make4ht
/usr/local/texlive/2025/bin/x86_64-linux/make4ht
>make4ht --version
make4ht version v0.4d


--Nasser




    _______________________________________________________

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

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

Reply via email to