From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52450 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Initialisation problem enumeration and way=bysection Date: Wed, 19 Aug 2009 11:44:36 +0200 Message-ID: <4A8BC984.3040906@wxs.nl> References: <200908181646.40091.bbvogel@home.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250675100 24078 80.91.229.12 (19 Aug 2009 09:45:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Aug 2009 09:45:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 19 11:44:53 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mdhiv-00022D-2C for gctc-ntg-context-518@m.gmane.org; Wed, 19 Aug 2009 11:44:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 19B90C9AF5; Wed, 19 Aug 2009 11:44:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mUnI0z1iiWvB; Wed, 19 Aug 2009 11:44:44 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7EC4EC9AAD; Wed, 19 Aug 2009 11:44:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4233FC9AAD for ; Wed, 19 Aug 2009 11:44:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tmgiPI8I90Ce for ; Wed, 19 Aug 2009 11:44:37 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id 3839AC9A9B for ; Wed, 19 Aug 2009 11:44:37 +0200 (CEST) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.9e) with ESMTP id 763-1840426 for ; Wed, 19 Aug 2009 11:44:37 +0200 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: <200908181646.40091.bbvogel@home.nl> X-Originating-IP: 10.100.1.100 X-Authenticated-User: hagen@controller-1 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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:52450 Archived-At: B. Vogel wrote: > Hi all, > > I have an enumeration: example that will reset by section. > > Using my own header: Mysection the enumeration is not reset by section. > The second instance shows the failure. > > However, after a \section it suddenly works. > > > And there is a problem with the sectioncounter as well. > The headingnumbers are 1 2 1 2 3 4 5 6 instead of 1 2 3 4 5 6 7 8. can you try this patch (strc-sec.mkiv) \def\dodefineclonedstructurehead#1#2% class parent {\def\currentstructurehead{#1}% \presetlabeltext[#1=]% \doifelse{#1}{#2} {\getparameters[\??nh#1][\c!label=#1]% \doifundefined{\??li#1}{\definelist[#1][\c!prefix=\v!no]}}% definestructurelist ? {\getparameters[\??nh#1][\s!parent=\??nh#2,\c!label=#1,\c!coupling=#2]% \definemarking[#1][#2]% \definemarking[#1\v!number][#2\c!number]% \doifundefined{\??li#1}{\definelist[#1][#2][\c!prefix=\v!no]}}% definestructurelist ? \the\everystructureheadsetup} > See the example below. nice example > Regard, Bernard > > > %MTXrun | current version: 2009.08.17 19:06 > % linux-32 > > \definehead[Mysection][section] > > \defineenumeration[example] > [way=bysection, > location=left] > > \def\test{% > \ifnum\currentenumerationfullnumber=\recurselevel\relax > \currentenumerationfullnumber = \recurselevel\ PASS% > \else > \currentenumerationfullnumber \not= \recurselevel\ FAIL% > \fi > } > > \starttext > > \dorecurse {2} { > \dorecurse {2} { > \Mysection{Mysection} > \dorecurse {3} {\startexample \test \stopexample} > } > > \dorecurse {2} { > \section{Section} > \dorecurse {3} {\startexample \test \stopexample} > } > } > > \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________