From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27297 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: using headnumber Date: Thu, 20 Apr 2006 18:15:23 +0200 Message-ID: <0520A565-5054-429D-9779-4DB26DB380FC@uni-bonn.de> References: <4447A561.1020102@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145549883 8624 80.91.229.2 (20 Apr 2006 16:18:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Apr 2006 16:18:03 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 20 18:17:59 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 1FWbqf-0005zA-If for gctc-ntg-context-518@m.gmane.org; Thu, 20 Apr 2006 18:17:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 579FB127A5; Thu, 20 Apr 2006 18:17: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 22896-03-4; Thu, 20 Apr 2006 18:17:37 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 82512127A6; Thu, 20 Apr 2006 18:17:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DB896127A6 for ; Thu, 20 Apr 2006 18:17: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 22896-03-3 for ; Thu, 20 Apr 2006 18:17:35 +0200 (CEST) Original-Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by ronja.ntg.nl (Postfix) with SMTP id B0F7B127A5 for ; Thu, 20 Apr 2006 18:17:35 +0200 (CEST) Original-Received: from fwd31.aul.t-online.de by mailout03.sul.t-online.com with smtp id 1FWbqZ-0002NE-00; Thu, 20 Apr 2006 18:17:35 +0200 Original-Received: from [192.168.0.2] (SmTYt8ZvZe7M7QNLBjwCSSn-XbR2UzqjKO6apoSg8SNeMIHQo-6-wP@[84.172.122.98]) by fwd31.sul.t-online.de with esmtp id 1FWbqQ-1CUKOm0; Thu, 20 Apr 2006 18:17:26 +0200 In-Reply-To: <4447A561.1020102@gmx.net> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.749.3) X-ID: SmTYt8ZvZe7M7QNLBjwCSSn-XbR2UzqjKO6apoSg8SNeMIHQo-6-wP@t-dialin.net X-TOI-MSGID: 86b6bcb7-a3d0-45d4-8798-fb9bcbcdc499 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:27297 Archived-At: Hi Peter, thanks for the help! The additional { must have been a fluke with copy/paste; wasn't in my file. By sheer stubbornness, I tried until I found something that works: command={{\determineheadnumber[section]}\ifodd\currentheadnumber \resetSlideNumber\incrementSlideNumber \else\incrementSlideNumber \fi}] So after \determineheadnumber[something], \currentheadnumber appears to have that value and doesn't take an argument. Thanks, and best Thomas On Apr 20, 2006, at 5:14 PM, Peter Rolf wrote: > 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