[tex4ht] How to control/optimize the number of times make4ht runs dvilualatex?

Wojciech Myszka wojciech.myszka at gmail.com
Tue Apr 19 11:04:28 CEST 2022


It is somehow a theoretical (i cannot put it to work) possibility to use
latexmk with make4ht (described in the documentation:
https://github.com/michal-h21/make4ht#extensions).
Maybe this helps.

Best regards
Wojtek

wt., 19 kwi 2022 o 00:29 Nasser M. Abbasi <nma at 12000.org> napisał(a):

> 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
>


-- 
---(___C'>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20220419/c836f183/attachment.html>


More information about the tex4ht mailing list.