ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* counter reseting at every heading
@ 2012-05-18 13:00 Peter Schorsch
  2012-05-18 15:41 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Schorsch @ 2012-05-18 13:00 UTC (permalink / raw)
  To: ConTeXt NTG

Hi,

I realized yesterday that my counter for the module does not reset
itself as before. What I need is a counter that resets after each
heading (chapter, section, subsection, subsubsection and so on).

This is what I know about counter reseting at the moment:

\definecounter[ParagraphNumber][prefix=no,way=bysection]
- way=bychapter: reseting counter at every chapter (default)
- way=bysection: reseting counter at every section (not at chapters)
- way={bychapter,bysection,bysubsection,bysubsubsection}: does not work

\setuphead[chapter,section,subsection,subsubsection][after={\resetcounter[ParagraphNumber]}]
does work but it messes with the distance between heading and normal
text.

What is the correct/best way to make the counter reseting every
heading without messing around?

Thanks
P.
___________________________________________________________________________________
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] 7+ messages in thread
* counter reseting at every heading
@ 2012-09-30 20:29 Peter Schorsch
  2012-09-30 21:07 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Schorsch @ 2012-09-30 20:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, 

few months ago (18th may) I asked about how to setup a counter that
resets after each heading (chapter, section, subsection, subsubsection
and so on.

I got three possibilities then but none of them was implemented (and
still is not):

1)
\definecounter[ParagraphNumber][prefix=no,way={bychapter,bysection,bysubsection,bysubsubsection}]

2)
\definecounter[ParagraphNumber][prefix=no,way=byheader]

3)
\setuphead[chapter,section,subsection,subsubsection][after={\resetcounter[ParagraphNumber]}]
as soon the spaces are defined over spaceafter instead of after.

Is there a forth option out? Or can anyone tell me
what the defaults spaces are so that I can copy them manually? 

Thanks
P.
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2012-10-01  9:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 13:00 counter reseting at every heading Peter Schorsch
2012-05-18 15:41 ` Hans Hagen
2012-05-18 19:39   ` Aditya Mahajan
2012-09-30 20:29 Peter Schorsch
2012-09-30 21:07 ` Wolfgang Schuster
2012-10-01  8:48   ` Peter Schorsch
2012-10-01  9:21     ` Wolfgang Schuster

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