ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mode *last in mkiv
@ 2010-07-19 11:30 luigi scarso
  2010-07-19 17:24 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2010-07-19 11:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 148 bytes --]

Hm, I have no clue on how enable *last mode in mkiv
\starttext
\startmode[*last]
LAST
\stopmode

#> context --final test.tex
doesn't work
-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 202 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 11:30 mode *last in mkiv luigi scarso
@ 2010-07-19 17:24 ` Wolfgang Schuster
  2010-07-19 17:37   ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2010-07-19 17:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

  Am 19.07.10 13:30, schrieb luigi scarso:
> Hm, I have no clue on how enable *last mode in mkiv
> \starttext
> \startmode[*last]
> LAST
> \stopmode

The '*last' mode is enabled when context needs the maximal number of 
runs for your document.

\definetwopasslist{last}
\starttext
\gettwopassdata{last}
\iftwopassdatafound
   \savetwopassdata{last}{1}{\number\numexpr\twopassdata+1\relax}
\else
   \savetwopassdata{last}{1}{1}
\fi
\doifnotmode{*last}{not }the last run
\stoptext

Wolfgang

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 17:24 ` Wolfgang Schuster
@ 2010-07-19 17:37   ` luigi scarso
  2010-07-19 17:56     ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2010-07-19 17:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1241 bytes --]

On Mon, Jul 19, 2010 at 7:24 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>  Am 19.07.10 13:30, schrieb luigi scarso:
>
> The '*last' mode is enabled when context needs the maximal number of runs
>> for your document.
>
>
> \definetwopasslist{last}
> \starttext
> \gettwopassdata{last}
> \iftwopassdatafound
>  \savetwopassdata{last}{1}{\number\numexpr\twopassdata+1\relax}
> \else
>  \savetwopassdata{last}{1}{1}
> \fi
> \doifnotmode{*last}{not }the last run
> \stoptext
>
> Wolfgang
>
>
Hm.
From core-sys.mkiv:

\appendtoks
    \ifcase\@@svn
        %                        % 0 : unknown
    \or
        \setsystemmode\v!first   % 1 : first run
    \or
        %                        % 2 : successive run
    \or
        \setsystemmode\v!first   % 3 : first and only run
    \or
        \setsystemmode\v!last    % 4 : (extra) last run
    \fi
\to \everysetupsystem

I suppose that last=4 runs
But the max number of runs is 8 , if I've understood  mtx-context.lua
So
\starttext
%%
%% content here
%%
\startmode[LAST]\myNullMacro\stopmode%
\stoptext

#> context mydocument.tex && context --mode=LAST mydocument.tex

ensure that the code inside \startmode[LAST]...\stopmode  is really seen the
"last " pass

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 2138 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 17:37   ` luigi scarso
@ 2010-07-19 17:56     ` Wolfgang Schuster
  2010-07-19 18:26       ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2010-07-19 17:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

  Am 19.07.10 19:37, schrieb luigi scarso:
> #> context mydocument.tex && context --mode=LAST mydocument.tex
>
> ensure that the code inside \startmode[LAST]...\stopmode  is really 
> seen the "last " pass

It is seen at the last run but also the first, second ... because you 
enable just a self defined mode 'LAST'.

Wolfgang

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 17:56     ` Wolfgang Schuster
@ 2010-07-19 18:26       ` luigi scarso
  2010-07-19 19:21         ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2010-07-19 18:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 915 bytes --]

On Mon, Jul 19, 2010 at 7:56 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>  Am 19.07.10 19:37, schrieb luigi scarso:
>
>  #> context mydocument.tex && context --mode=LAST mydocument.tex
>>
>> ensure that the code inside \startmode[LAST]...\stopmode  is really seen
>> the "last " pass
>>
>
> It is seen at the last run but also the first, second ... because you
> enable just a self defined mode 'LAST'.
>
> yes but the second "context", ie
context --mode=LAST mydocument.tex
should change nothing from the first  "context", so it's really the last
 (run only one time)
I mean that in
#> context mydocument.tex && context mydocument.tex && context
mydocument.tex && context mydocument.tex

all but the first run exactly one time, while the first can be 5 runs and so
*last  is not the last one.

(of course one can put nasty things inside \startmode[LAST]...\stopmode etc
etc etc)


-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1710 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 18:26       ` luigi scarso
@ 2010-07-19 19:21         ` Wolfgang Schuster
  2010-07-19 20:00           ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2010-07-19 19:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1132 bytes --]

  Am 19.07.10 20:26, schrieb luigi scarso:
> On Mon, Jul 19, 2010 at 7:56 PM, Wolfgang Schuster 
> <schuster.wolfgang@googlemail.com 
> <mailto:schuster.wolfgang@googlemail.com>> wrote:
>
>      Am 19.07.10 19:37, schrieb luigi scarso:
>
>         #> context mydocument.tex && context --mode=LAST mydocument.tex
>
>         ensure that the code inside \startmode[LAST]...\stopmode  is
>         really seen the "last " pass
>
>
>     It is seen at the last run but also the first, second ... because
>     you enable just a self defined mode 'LAST'.
>
> yes but the second "context", ie
> context --mode=LAST mydocument.tex
> should change nothing from the first  "context", so it's really the 
> last  (run only one time)
> I mean that in
> #> context mydocument.tex && context mydocument.tex && context 
> mydocument.tex && context mydocument.tex
>
> all but the first run exactly one time, while the first can be 5 runs 
> and so *last  is not the last one.
>
> (of course one can put nasty things 
> inside \startmode[LAST]...\stopmode etc etc etc)

what is so important that you can include it only in the last run?

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2533 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 19:21         ` Wolfgang Schuster
@ 2010-07-19 20:00           ` luigi scarso
  2010-07-19 20:09             ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2010-07-19 20:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 390 bytes --]

On Mon, Jul 19, 2010 at 9:21 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

> what is so important that you can include it only in the last run?
>
> Wolfgang
>
> well, in the end nothing.
I mean: nothing that I can't do with an ad-hoc  program like
MyAnalyzePdfandLog and --batch option, ie
#>context --batch mydoc.tex;  MyAnalyzePdfandLog mydoc.pdf mydoc.log

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 767 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 20:00           ` luigi scarso
@ 2010-07-19 20:09             ` Wolfgang Schuster
  2010-07-19 20:38               ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2010-07-19 20:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 576 bytes --]

  Am 19.07.10 22:00, schrieb luigi scarso:
>
>
> On Mon, Jul 19, 2010 at 9:21 PM, Wolfgang Schuster 
> <schuster.wolfgang@googlemail.com 
> <mailto:schuster.wolfgang@googlemail.com>> wrote:
>
>     what is so important that you can include it only in the last run?
>
> well, in the end nothing.
> I mean: nothing that I can't do with an ad-hoc  program like 
> MyAnalyzePdfandLog and --batch option, ie
> #>context --batch mydoc.tex;  MyAnalyzePdfandLog mydoc.pdf mydoc.log

why don't you use then a ctx file which process first the document and 
then MyAnalyze...

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1496 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: mode *last in mkiv
  2010-07-19 20:09             ` Wolfgang Schuster
@ 2010-07-19 20:38               ` luigi scarso
  0 siblings, 0 replies; 9+ messages in thread
From: luigi scarso @ 2010-07-19 20:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1032 bytes --]

On Mon, Jul 19, 2010 at 10:09 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>
> why don't you use then a ctx file which process first the document and then
> MyAnalyze...
>
> yes I know.
The point is: while the *first mode  is clear and can be managed inside
context,
the concept of last run is problematic.
If one wants to be sure that "this tex code will be parsed only at the last
run"
then the tex code must be enclose inside a \startmode[LAST]\stopmode
and processed with
#>context mydoc.tex && context --mode=LAST mydoc.tex
(let's forget of errors for the moment)
But   if the tex code modify  mydoc  then the first context mydoc
is superfluous.
So in the end the tex code must do nothing of relevant, and hence  it can be
replaced by an external program MyAnalyze
which in general must have as input the input source mydoc.tex, the output
file mydoc.pdf and the log mydoc.log
and processed with
#>context --batch mydocument.tex ; MyAnalyze mydoc.tex mydoc.pdf mydoc.log
to take care of errors.

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1565 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2010-07-19 20:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 11:30 mode *last in mkiv luigi scarso
2010-07-19 17:24 ` Wolfgang Schuster
2010-07-19 17:37   ` luigi scarso
2010-07-19 17:56     ` Wolfgang Schuster
2010-07-19 18:26       ` luigi scarso
2010-07-19 19:21         ` Wolfgang Schuster
2010-07-19 20:00           ` luigi scarso
2010-07-19 20:09             ` Wolfgang Schuster
2010-07-19 20:38               ` luigi scarso

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