From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52457 Path: news.gmane.org!not-for-mail From: "B. Vogel" Newsgroups: gmane.comp.tex.context Subject: Re: =?iso-8859-1?q?Initialisation_problem_enumeration_a?= =?iso-8859-1?q?nd=09way=3Dbysection?= Date: Wed, 19 Aug 2009 13:08:03 +0200 Message-ID: <200908191308.04824.bbvogel@home.nl> References: <200908181646.40091.bbvogel@home.nl> <4A8BC984.3040906@wxs.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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250680109 6412 80.91.229.12 (19 Aug 2009 11:08:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Aug 2009 11:08:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 19 13:08:22 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 1Mdj1g-0008Nv-G6 for gctc-ntg-context-518@m.gmane.org; Wed, 19 Aug 2009 13:08:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ED873C9A9B; Wed, 19 Aug 2009 13:08:18 +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 JlB87g2tmL2M; Wed, 19 Aug 2009 13:08:13 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B6A78C9AAD; Wed, 19 Aug 2009 13:08:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B01A5C9AAD for ; Wed, 19 Aug 2009 13:08:11 +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 tIr7-PXwtDmh for ; Wed, 19 Aug 2009 13:08:08 +0200 (CEST) Original-Received: from smtpq2.tb.mail.iss.as9143.net (smtpq2.tb.mail.iss.as9143.net [212.54.42.165]) by balder.ntg.nl (Postfix) with ESMTP id 6AE03C9A9B for ; Wed, 19 Aug 2009 13:08:08 +0200 (CEST) Original-Received: from [212.54.42.145] (helo=smtp14.tb.mail.iss.as9143.net) by smtpq2.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1Mdj1U-0004aH-A9 for ntg-context@ntg.nl; Wed, 19 Aug 2009 13:08:08 +0200 Original-Received: from 5ed61b9e.cable.ziggo.nl ([94.214.27.158] helo=kosh.lan) by smtp14.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1Mdj1T-0003yF-Fs for ntg-context@ntg.nl; Wed, 19 Aug 2009 13:08:07 +0200 User-Agent: KMail/1.9.9 In-Reply-To: <4A8BC984.3040906@wxs.nl> Content-Disposition: inline X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1Mdj1T-0003yF-Fs X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-ZiggoSMTP-MailScanner-From: bbvogel@home.nl 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:52457 Archived-At: On Wednesday 19 August 2009, Hans Hagen wrote: > 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) Problem solved. Thanks. > > \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 Thanks. > > > 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 > ___________________________________________________________________________ >________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________