ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Numbering again..
@ 2011-03-02 14:59 Ian Lawrence
  2011-03-02 15:22 ` Thomas A. Schmitz
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Lawrence @ 2011-03-02 14:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1037 bytes --]

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,
number=yes,before=\resetnumber[nuggetnumber]]
% 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
before=...'


Thanks
Ian

[-- Attachment #1.2: Type: text/html, Size: 1449 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

end of thread, other threads:[~2011-03-02 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-02 14:59 Numbering again Ian Lawrence
2011-03-02 15:22 ` Thomas A. Schmitz

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