From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27289 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: using headnumber Date: Thu, 20 Apr 2006 17:14:41 +0200 Message-ID: <4447A561.1020102@gmx.net> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145546241 27000 80.91.229.2 (20 Apr 2006 15:17:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Apr 2006 15:17:21 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 20 17:17:19 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1FWatd-0001r7-NT for gctc-ntg-context-518@m.gmane.org; Thu, 20 Apr 2006 17:16:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 420C3127A7; Thu, 20 Apr 2006 17:16:41 +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 06024-06-2; Thu, 20 Apr 2006 17:16:37 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2BBA3127A2; Thu, 20 Apr 2006 17:16:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 59015127A2 for ; Thu, 20 Apr 2006 17:16: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 06024-06 for ; Thu, 20 Apr 2006 17:16:34 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id 002E31279D for ; Thu, 20 Apr 2006 17:15:54 +0200 (CEST) Original-Received: (qmail invoked by alias); 20 Apr 2006 15:15:54 -0000 Original-Received: from i577B886E.versanet.de (EHLO [192.168.1.3]) [87.123.136.110] by mail.gmx.net (mp001) with SMTP; 20 Apr 2006 17:15:54 +0200 X-Authenticated: #24293357 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: mailing list for ConTeXt users In-Reply-To: X-Enigmail-Version: 0.94.0.0 X-Y-GMX-Trusted: 0 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:27289 Archived-At: Hi Thomas, Thomas A. Schmitz wrote: > Hi, > > I have a counter which I want to be incremented after every \section > command and reset after every odd \section (don't ask why...). So I > tried this approach: > > \setuphead[section] > [command={{{\determineheadnumber[section]} ^^^^ one opening brace too much If you problem remains, try to add a \expandafter in front of \ifodd. Sometimes it is also helpful to enclose the number expression by \numexpr ... \relax (for conversion). Greets, Peter > \ifodd{\currentheadnumber[section]}\resetSlideNumber > \incrementSlideNumber > \else\incrementSlideNumber > \fi}] > > But I'm getting errors: > > ! Missing number, treated as zero. > > { > \@@kosectioncommand ...adnumber [section]}\ifodd { > \currentheadnumber > [sectio... > > \doplaceheadnumbertext ...ue {\??ko #1\c!command } > > {\dostartattributes {\??ko... > > \dodododoconstructhead ...{\finalsectionnumber }}} > \writesection {#1} > {#3}{#4}... > > Any pointers? > > Thomas > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > >