[tex4ht] Can one use tex4ht log file to check if more runs are needed?

Michal Hoftich michal.h21 at gmail.com
Tue Dec 5 12:20:52 CET 2023

Hi Nasser,

> Hello Michal. I am little confused. You say tex4ht does not generate
> such messages, but then you say log checking is safer.
> Can I check for same messages when compiling with tex4ht as
> I do with lulatex? This is my question.

The running script that I gave you checks for the AUX file, XREF file
and TOC, and it continues  the compilation until they don't change -
so when you don't change sections, cross-references and other stuff
that is written to these files, it should do only one compilation. If
these files change between compilations, it will run as many
compilations as specified in max_compilations variable. Check how
large it is, maybe we were experimenting with it and it is too large.
Value of 3 should be enough.

> I do not want to use rerunfilecheck package as I do not understand it.
> I just want a simple method, which is to to check myself for messages
> in the log file, that is why I asked.
> I assumed tex4ht generates its own messages different
> from lualatex to indicate more runs are needed or not.
> Ofcourse, I can try and find out, but the problem is that it is hard to
> know by looking at the HTML pages sometimes if the build was
> complete or not.

The problem is mostly with hyperlinks and large  tables. But all of
this depends on the auxilary files the script checks, so you won't get
any better results with the log parsing.

> I am asking all this, because one build with tex4ht
> takes 24 and more hours on some of my large files and was
> wondering if it is calling tex4ht more times than needed.

Yes, it is too much. You can try to print the number of compilations
used in the checksum script by adding this line before return status
in Make:add("myhtlatex", ...) function:

print("Number of compilations: " .. compilation_count)

I am not sure which version of this file you use now, I know there are
multiple versions and I am afraid that I cannot find the most recent
one, so I cannot post the whole function here. Anyway, if the number
is too large, it can be caused by some bug in the script.

Best regards,

More information about the tex4ht mailing list.