Since some of my files take long time to compile for PDF and HTML, I've been trying to optimize the number of times needed to compile them.
With lualatex, I now check in the log file and decided if there is a need to run lualatex one more time or not. For tex4ht, it seems to always run 3 times. Even for the most simple files. Here is an example -----------------------------
cat report.tex
\documentclass[11pt]{book} \begin{document} test \end{document} --------------------------- Running the command (all on one line) time make4ht -ulm default -a debug report.tex "mathjax,htm" Shows that htlatex: LaTeX call: dvilualatex --interaction=errorstopmode -jobname='report' was called 3 times. Each time. Of course on a small file like this, it does not matter, but I have files where I timed it taking over 2 hrs for each one call to dvilualatex. This means 6 hrs in total. This phase seems to take most of the time. If I can reduce it to calling it 2 times, this will be big reduction in time. But I have no idea how make4ht decides if it needs to run 1 or 2 or 3 times the program dvilualatex. With lualatex, it is easy to check. I just check if the log file contain the string `Rerun` and other variation of it. My question is: how does make4ht decide it needs to run 3 times each time? Is it possible to make it more optimal? How would the user control this from outside? Thanks --Nasser