![](https://secure.gravatar.com/avatar/d8fd95a14acec745cbe25333b9505be9.jpg?s=120&d=mm&r=g)
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