[NTG-context] Counter[way=bypage] bug in latest beta?

mf massifr at fastwebnet.it
Mon Jun 29 14:35:59 CEST 2015


Hello list,
consider this example, involving a number (counter) to be reset at each
page:

\starttext
\definenumber[MyNumber][way=bypage] % MyNumber=0
\incrementnumber[MyNumber] % MyNumber=1
\incrementnumber[MyNumber] % MyNumber=2
mynumber is \rawcountervalue[MyNumber]. % prints 2
\page % MyNumber=0
\incrementnumber[MyNumber] % MyNumber=1
At the new page, mynumber is \rawcountervalue[MyNumber].
\stoptext

In ConTeXt 2014.05.21 22:04 (the one I get as Debian package) it works
as expected, giving MyNumber=1 at page 2, because MyNumber gets reset
at page break.
In the latest beta (and also in 2014.04.01) the counter does not reset
and it's equal to 3 at the end of page 2.

Another question: when you comment out the increment at page 2, the
counter does not reset, and you get 2 even in version 2014.05.21.

\starttext
\definenumber[MyNumber][way=bypage] % MyNumber=0
\incrementnumber[MyNumber] % MyNumber=1
\incrementnumber[MyNumber] % MyNumber=2
mynumber is \rawcountervalue[MyNumber]. % prints 2
\page % MyNumber=0
% \incrementnumber[MyNumber] COMMENTED OUT
At the new page, mynumber is \rawcountervalue[MyNumber]. % prints 2
\stoptext

Is this a bug or is it the way it should work when you don't increment
it?


More information about the ntg-context mailing list