From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13404 Path: main.gmane.org!not-for-mail From: Matthew Huggett Newsgroups: gmane.comp.tex.context Subject: Re: Re: beginner question re: counters Date: Mon, 22 Sep 2003 00:04:42 +0900 Sender: ntg-context-admin@ntg.nl Message-ID: <3F6DBE0A.7060200@zam.att.ne.jp> References: <3F68970B.4050205@zam.att.ne.jp> <001201c37d42$f1066eb0$0500a8c0@best> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1064157112 6166 80.91.224.253 (21 Sep 2003 15:11:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2003 15:11:52 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Sep 21 17:11:51 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A15sN-0002PY-00 for ; Sun, 21 Sep 2003 17:11:51 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id E0CFB10B20; Sun, 21 Sep 2003 17:11:43 +0200 (MEST) Original-Received: from smtp3.att.ne.jp (smtp3.att.ne.jp [165.76.15.139]) by ref.ntg.nl (Postfix) with ESMTP id 5975210AFC for ; Sun, 21 Sep 2003 17:04:53 +0200 (MEST) Original-Received: from zam.att.ne.jp (218.231.177.210.eo.eaccess.ne.jp [218.231.177.210]) by smtp3.att.ne.jp (Postfix) with ESMTP id 0F9723D7F3 for ; Mon, 22 Sep 2003 00:04:50 +0900 (JST) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en, zh-cn, ja, zh-tw Original-To: ntg-context@ntg.nl In-Reply-To: Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:13404 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13404 Patrick Gundlach wrote: >Hi, > >Matthew Huggett writes: > > > >>>I apologize for asking such a basic question. What is the correct way >>>to increment a counter such that each time a macro is used, the counter >>>is augmented by 1. >>> >>> > > >"Pawel Jackowski na Onet" writes: > > > > >>Hmmm... It can happens for many reasons. >>Try for instance >>... >> >> > >General remark (not really concerning this thread): > >It would be nice if the original posters would comment answers like >this one if this works fine or not. Since these mails are archived, >other people might come across this post and wonder if this is a good >solution or not. > > >Just my $50^{-1}$ Euro > >Patrick > > > Yeah, the solution worked. Just to recap: What I wanted was a macro and counter such that each time the macro gets used the counter gets augmented + 1. The solution was: \newcount\MyCounter \define[1]\MyMacro{ \global\advance\MyCounter by 1 \relax \number\MyCounter #1} \starttext \MyMacro{Hello} \MyMacro{Goodbye} \MyMacro{Hello again} \stoptext --> 1Hello 2Goodbye 3Hello again Matt