From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38604 Path: news.gmane.org!not-for-mail From: Carsten Fechtmann Newsgroups: gmane.comp.tex.context Subject: Re: Bug or feature? Strange counter behaviour in macro Date: Sat, 12 Jan 2008 20:45:55 +0100 Message-ID: <4B09D1CE-D07B-416E-80AC-5E366FCED60A@zarm-technik.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v915) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200168471 6414 80.91.229.12 (12 Jan 2008 20:07:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2008 20:07:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 12 21:08:12 2008 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 1JDmeK-0007BL-Kn for gctc-ntg-context-518@m.gmane.org; Sat, 12 Jan 2008 21:08:12 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EB35E1FBEB; Sat, 12 Jan 2008 21:07:45 +0100 (CET) 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 15179-01-6; Sat, 12 Jan 2008 21:07:05 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 07E991FBAA; Sat, 12 Jan 2008 21:07:05 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F17E41FBA8 for ; Sat, 12 Jan 2008 21:07:02 +0100 (CET) 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 11738-01-10 for ; Sat, 12 Jan 2008 21:06:28 +0100 (CET) Original-Received: from www.zarm-technik.de (zarm5.zarm.uni-bremen.de [134.102.236.5]) by ronja.ntg.nl (Postfix) with ESMTP id 7F3141FBC1 for ; Sat, 12 Jan 2008 20:46:00 +0100 (CET) Original-Received: from localhost (unknown [127.0.0.1]) by www.zarm-technik.de (Postfix) with ESMTP id 355F0FEE9 for ; Sat, 12 Jan 2008 19:46:12 +0000 (UTC) X-Virus-Scanned: amavisd-new 2.5.2 (20070627) at zarm-technik.de Original-Received: from www.zarm-technik.de ([127.0.0.1]) by localhost (www.zarm-technik.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DP3w3gSheLUf for ; Sat, 12 Jan 2008 20:46:08 +0100 (CET) Original-Received: from [10.0.1.2] (pD955EDE6.dip.t-dialin.net [217.85.237.230]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by www.zarm-technik.de (Postfix) with ESMTP id 7C4B8DF93 for ; Sat, 12 Jan 2008 20:46:08 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.915) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:38604 Archived-At: Hi Aditya, thanks for taking the time to answer this. And yes, I looked at what ConTeXt has already built in. On 12.01.2008 at 18:44 wrote Aditya Mahajan: > I haven't looked at your code below. First check if one the in-built > stuctural environments of ConTeXt do what you want. As a matter of fact, I am using the following for all the heavy stuff (implementing that in LaTeX is/was a REAL pain) \definesynonyms[Issue][issues][\IssueText][\IssueDate] \setupsynonyms[Issue][criterium=all] \Issue[1]{Issue 1:}{Some Date} \Issue[2]{Issue 2:}{\currentdate} and if I just put the values in by hand, it works like a champ. Sorted list and all. ;-D Took me less than 5 minutes to implement (read: find in the manual). Just gonna _love_ ConTeXt for that! Now, with such a nice success (and because I have much more "counter" stuff on the way) I was feeling lucky ... and spent the next 5 hours figuring out / searching on the web / going over the source how to have the "number" for each issue placed automatically, every time a new issue date is set. Yes, sure, I could just _write_ that in, but then I would have to check myself, which number is exactly the one I need, and not have the computer do it for me. But, hey where is the fun in that? ;-) What this all burns down is, that I /really/ would like to understand, how I can pass a value from a counter as (constant) argument to a self- defined function. As that seems to be the core of the matter/problem here. Any suggestions? Cheers Carsten > ___________________________________________________________________________________ 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 ___________________________________________________________________________________