Bug? Counters inherit chapter number
Hi all, This works as expected* (empty section title with "5 6 7 8" on the next line \definenumber[examplecounter] \setnumber[examplecounter]{5} \starttext \startsection \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \stopsection \stoptext This does not: \definenumber[examplecounter] \setnumber[examplecounter]{5} \starttext \startchapter \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \stopchapter \stoptext The second example has an empty chapter heading followed by "1. 1.1 1.2 1.3". This is on version: 2011.11.29. Apologies if this is has been addressed - I'm holding off updating until I've worked out some more features in my doc. Felix * As expected by me
Am 16.01.2012 um 15:43 schrieb Felix Ingram:
Hi all,
This works as expected* (empty section title with "5 6 7 8" on the next line
\definenumber[examplecounter] \setnumber[examplecounter]{5} \starttext \startsection \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \stopsection \stoptext
This does not:
\definenumber[examplecounter] \setnumber[examplecounter]{5} \starttext \startchapter \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \getnumber[examplecounter] \incrementnumber[examplecounter] \stopchapter \stoptext
The second example has an empty chapter heading followed by "1. 1.1 1.2 1.3".
This is on version: 2011.11.29. Apologies if this is has been addressed - I'm holding off updating until I've worked out some more features in my doc.
By default the counter is reset with each new chapter, since you have chapters in your first example the counter is incremented but in your second example \startchapter sets the counter back to zero. To have a counter which isn’t reset you need “way=bytext" and to remove the chapter number from the \getnumber result you have to add “prefix=no”. The full \definenumber declaration is then \definenumber[examplecounter][way=bytext,prefix=no] Wolfgang
participants (2)
-
Felix Ingram
-
Wolfgang Schuster