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. > \iftrialtypesetting ... \else ... \fi
> 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\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@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context