From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76289 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: counter reseting at every heading Date: Fri, 18 May 2012 15:39:38 -0400 (EDT) Message-ID: References: <20120518150011.457afb54@freenet.de> <4FB66DA2.1070808@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1337369917 9639 80.91.229.3 (18 May 2012 19:38:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 May 2012 19:38:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 18 21:38:37 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SVT0W-000855-Gt for gctc-ntg-context-518@m.gmane.org; Fri, 18 May 2012 21:38:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E5555101E7; Fri, 18 May 2012 21:38:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HH8LJeF9LHiG; Fri, 18 May 2012 21:38:33 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 079CA101DF; Fri, 18 May 2012 21:38:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7E9E2101DF for ; Fri, 18 May 2012 21:38:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lWwrBbpq-e0W for ; Fri, 18 May 2012 21:38:31 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 44A18101DD for ; Fri, 18 May 2012 21:38:30 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q4IJcSGk017895 for ; Fri, 18 May 2012 21:38:29 +0200 Original-Received: FROM LP533.ECE.McGill.CA (Mismatch [132.206.69.142]) By hackers.mr.itd.umich.edu ID 4FB6A532.F1B1B.27680 ; Authuser adityam; 18 May 2012 15:38:27 EDT In-Reply-To: <4FB66DA2.1070808@wxs.nl> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0THbvCtsW - c51b2a7485ef - 20120518 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:76289 Archived-At: On Fri, 18 May 2012, Hans Hagen wrote: > On 18-5-2012 15:00, Peter Schorsch wrote: >> 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? > > we probably need something byheader or maybe indeed a comma separated list Or perhaps a \c!setups key for \setuphead commands. Another option is to add spacebefore and spaceafter keys to set distance, rather than the before and after keys. A few commands use spacebefore and spaceafter, and it will be nice if all commands used them. Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________