[NTG-context] Numbering again..

Ian Lawrence physics.rooted at gmail.com
Wed Mar 2 15:59:30 CET 2011

Sorry...Again I am stumped.

I have a counter that I'd like to reset

\newcounter \nuggetnumber
\def \numberofnuggets{0}

\definehead [nugget] [section]
\setuphead [nugget] [number=yes,page=yes, before=\increment \nuggetnumber,
    after=\savecurrentvalue \numberofnuggets{\countervalue{nuggetnumber}},]
% LO as nugget

This counts the number of nuggets.. and seems to work fine.

But when it gets to an episode it should reset....so, maybe like this

\definehead [episode] [title]
\setuphead [episode] [numberstyle=bold, textstyle=cap,
% may be used

But \resetnumber[nuggetnumber], where-ever I put it seems to have no impact.
I think the Wiki suggests that it should, and the mailing list back
catalogue and the manual shed no light on the matter....

while I am at it, I am equally unsure how to reset the numberofnuggets
accumulator, which should also be done on meeting the episode structural
 element - I'd like to insert a whole chain of commands in the

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20110302/4aba191a/attachment.html>

More information about the ntg-context mailing list