[tex4ht] how to make tex4ht generate an error on same input which makes latex generate error on?

Nasser M. Abbasi nma at 12000.org
Thu Jun 8 04:52:39 CEST 2023

Is there a way to make tex4ht generate an error on same input which
makes lualatex or pdflatex or latex generate an error on?

Here is a very small example


why this will not cause err_or in tex4ht?


And now

>lualatex index.tex
(./index.aux) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd)
! Missing $ inserted.
<inserted text>
l.4 This will not cause err_
Compare to

make4ht  -ulm default -a warning index.tex "mathjax,htm"

No error. Even when using -a debug, no error. Also
if I remove mathjax, it still does not give an error.
so nothing to do with mathjax mode.

Is there an option I am overlooking in using make4ht
to make it stop on such errors?

I understand that the semantics of err_or in HTML
is different than in Latex and that underscore in text is OK in html.

But this means if I have an error in my latex code,
the build runs and I do not know about it as it
completes with no error.

Only when I run lualatex will it find such errors
because I did not mean to type err_or but meant to type error.

Since my build takes a day or more to complete, it is always
hard to go back and find where the error was to correct
it after running tex4ht. It will be better to have the build
stop at the point where the latex error was.

Btw, this is one example I know about where no error is
generated. There might be others and I am trying to find
these if they exist now.

May be there is a strict mode for tex4ht to use to
make it detect such input?

TL 2022 on Linux


More information about the tex4ht mailing list.