[NTG-context] feature request: \everytrypass
Peter Rolf
indiego at gmx.net
Thu Apr 20 13:01:24 CEST 2006
Vit Zyka wrote:
> Dear ConTeXters,
>
> I am counting occurence of some macro in the text. Problem is when this
> macro is inside \bTABLE (and may be somewhere else). Due to try passes
> the increment is counter is incremented more then once and the result is
> multiplied.
>
> It is possible to implement some \everytrypass in which user can (e.g.)
> null incrementing? Or there is some another solution?
>
> Thanks
> Vit
>
> Minimal example:
> -----------------------------------------------
> \newcount\C
> \def\doIncrement{\global\advance\C by1\relax}
\def\doIncrement{\iftrialtypesetting
\else\global\advance\C by1\relax\fi}%
donno if this works correctly inside a TABLE...
Greets, Peter
>
> % \def\nullIncrement{\let\doIncrement\relax}
> % \appendtoks \nullIncrement to \everytrypass
>
> \starttext
> \bTABLE
> \bTR\bTD Counter\doIncrement\eTD\eTR
> \eTABLE
> \message{ <<Counter=\the\C>> }%
> \stoptext
> ------------------------------------------------
> _______________________________________________
> ntg-context mailing list
> ntg-context at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
More information about the ntg-context
mailing list