Hi David,

David Arnold wrote:
> All,
> 
> Why does this increment by two?
>

because the argument of \setuplabeltext is expanded two times per call
(add a \message to your macro). Mostly this is done to collect
information (for size maxima, whatever) in the first run, so you can set
things pretty in the final run.

Just define your macro this way

\define\NonFigCrt{\iftrialtypesetting\else\NonFigCtrUpdate{\tfa\NonFigCounter}\fi}

which filters out the trialtype setting run.

Greetings, Peter

> \setupoutput[pdf]
> 
> \newcounter\NonFigCounter
> \define\NonFigCtrUpdate{\doglobal\increment\NonFigCounter}
> \define\NonFigCtr{\NonFigCtrUpdate{\tfa\NonFigCounter}}
> 
> \setuplabeltext[remark=Remark \NonFigCtr:]
> 
>       
> \defineenumeration
>       [remark]
>       [location=serried,
>               width=broad,
>               text=\labeltext{remark},
>               headstyle=bold,
>               inbetween=\blank,
>               before=\blank,
>               after=\blank,
>               way=bysection,
>               number=no]
> 
> \starttext
> 
> \startremark
>    Foo
> \stopremark
> 
> \startremark
>    Foo
> \stopremark
> 
> \stoptext
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to