Am 10.04.2012 16:53, schrieb Peter Rolf:
Hi,
In the first run I collect several ImageMagick commands in a common batch file, which should be executed afterwards. A second run is also needed to include the created graphics.
I tried
\appendtoks\mycommand\to\everygoodbye
but that does not work properly, if only one run is needed otherwise. So I need to tell ConTeXt somehow, that an additional run is needed (adding the number of runs to the command line is no option).
Currently I use
if tex.modes["*first"] then ... end
to detect the first run. My first try was to add an 'else' condition to call the batch file once, but sadly this is also not triggered in case of a single run...
What is the official way (mkiv) to add a call at the end of the first run (or the beginning of the second run)? And how can I ensure, that a second run is forced?
Sorry, no need to force a second run. I forgot to delete the *.tuc file, so I missed that the initial compilation has three runs. Should be more than enough for me, but the call of the batch file at the end of the last run (\everygoodbye) is definitely too late. This reduces my question to "how to add a call at the beginning of the second run?"
Peter ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________