From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51034 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: labels and new structure code Date: Thu, 4 Jun 2009 16:46:26 +0200 Message-ID: <1E46E3DC-BF16-4124-B5A8-BDCE2C2B331B@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1244126862 31306 80.91.229.12 (4 Jun 2009 14:47:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Jun 2009 14:47:42 +0000 (UTC) To: mailing ConTeXt users list for Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 04 16:47:38 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1MCEEE-0005HR-9w for gctc-ntg-context-518@m.gmane.org; Thu, 04 Jun 2009 16:47:38 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3619D1FBD0; Thu, 4 Jun 2009 16:47:36 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15417-05-3; Thu, 4 Jun 2009 16:46:54 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 315B41FC44; Thu, 4 Jun 2009 16:46:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 41B5F1FC3E for ; Thu, 4 Jun 2009 16:46:52 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15402-03-3 for ; Thu, 4 Jun 2009 16:46:43 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by ronja.ntg.nl (Postfix) with ESMTP id 791F21FBD5 for ; Thu, 4 Jun 2009 16:46:43 +0200 (CEST) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5) with ESMTP id n54Ekghg014397 for ; Thu, 4 Jun 2009 16:46:43 +0200 Original-Received: from [87.178.124.250] (account tschmit1@uni-bonn.de HELO [192.168.0.2]) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.2.12) with ESMTPA id 18043290 for ntg-context@ntg.nl; Thu, 04 Jun 2009 16:46:42 +0200 X-Mailer: Apple Mail (2.935.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.113; country=DE; region=07; city=Bonn; latitude=50.7333; longitude=7.1000; http://maps.google.com/maps?q=50.7333,7.1000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 237549082 - da9336cf2a12 - 20090604 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:51034 Archived-At: Hi all, Hans, here is a bug that remains with the new structure code after Hans fixed many things two weeks ago. I want a counter that is reset at every odd chapter. This works as expected in mkii (and used to work in mkiv), but complains about a "Missing number, treated as zero" and fails to compile in current beta: \setupcolors[state=start] \setuphead [section] [command={{\determineheadnumber[section]}\ifodd\currentheadnumber \resetSlideNumber\incrementSlideNumber \else\incrementSlideNumber \fi}, expansion=yes] \definelabel[SlideNumber][headstyle=normal,way=bytext] \define\SLN{\color[red]{ [\nextSlideNumber]}} \starttext \section{One} should be 2: \SLN \section{Two} should be 4: \SLN \section{Three} should be 2 again: \SLN \section{Four} should be 4 again: \SLN \stoptext Even if you comment out the command=... line, you'll see that labels in mkiv still don't quite do what they should. All best Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________