ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* starting batch file after first of at least two runs
@ 2012-04-10 14:53 Peter Rolf
  2012-04-10 16:43 ` Peter Rolf
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Rolf @ 2012-04-10 14:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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?


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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: starting batch file after first of at least two runs
  2012-04-10 14:53 starting batch file after first of at least two runs Peter Rolf
@ 2012-04-10 16:43 ` Peter Rolf
  2012-04-10 17:09   ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Rolf @ 2012-04-10 16:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: starting batch file after first of at least two runs
  2012-04-10 16:43 ` Peter Rolf
@ 2012-04-10 17:09   ` Hans Hagen
  2012-04-10 17:33     ` Peter Rolf
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2012-04-10 17:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10-4-2012 18:43, Peter Rolf wrote:
> 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.

Isn't it easier to plug into the converter? Anyhow,

\ifnum\directsystemparameter{n}=2
   do-this-or-that
\fi



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: starting batch file after first of at least two runs
  2012-04-10 17:09   ` Hans Hagen
@ 2012-04-10 17:33     ` Peter Rolf
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Rolf @ 2012-04-10 17:33 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Am 10.04.2012 19:09, schrieb Hans Hagen:
> On 10-4-2012 18:43, Peter Rolf wrote:
>> 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.
> 
> Isn't it easier to plug into the converter? Anyhow,
>
donno, will have a look at it :-)

Thanks Hans!


> \ifnum\directsystemparameter{n}=2
>   do-this-or-that
> \fi
> 
> 
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
> 

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-10 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 14:53 starting batch file after first of at least two runs Peter Rolf
2012-04-10 16:43 ` Peter Rolf
2012-04-10 17:09   ` Hans Hagen
2012-04-10 17:33     ` Peter Rolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).