ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Counter[way=bypage] bug in latest beta?
@ 2015-06-29 12:35 mf
  2015-06-30 12:35 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: mf @ 2015-06-29 12:35 UTC (permalink / raw)
  To: ntg-context

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

end of thread, other threads:[~2015-06-30 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29 12:35 Counter[way=bypage] bug in latest beta? mf
2015-06-30 12:35 ` Wolfgang Schuster
2015-06-30 20:14   ` mf

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