On 4/18/2022 5:21 PM, Michal Hoftich wrote:
You can of
course change that using a build file, where you can declare your own
modes and declare commands to be executed.
The default is this:
if mode=="draft" then
Make:htlatex{}
else
Make:htlatex{}
Make:htlatex{}
Make:htlatex{}
end
Thanks, but the issue is, how does one know if they
need to run it 1, 2 or 3 times? What code do I need to add
to the above to decide?
With lualatex, now this is what I do and it works (other option is to
use latexmk, but for some other reasons, I prefer to stick to makefiles
for now).
------------------------------
lualatex -halt-on-error -interaction=batchmode --shell-escape -file-line-error
index.tex
if grep -E 'Rerun to get it removed|Temporary extra page added at the
end|There were undefined references' index.log ; then
echo "Need to RUN one more time...."
lualatex -halt-on-error -interaction=batchmode --shell-escape
-file-line-error index.tex
if grep -E 'Rerun to get it removed|Temporary extra page added at the
end|There were undefined references' index.log ; then
echo "Need to RUN one more time...."
lualatex -halt-on-error -interaction=batchmode --shell-escape
-file-line-error index.tex
fi
fi
-------------------------------
The above checks after each run if it needs to run again. It does it only
3 times. No need for more.
I do not know what to check for with tex4ht or how to do the above
in the build lua file you show.
How to decide?
Best regards,
Michal
--Nasser