[tex-live] Using counters in command name

Gergő Balogh geryxyz at gmail.com
Wed Sep 10 22:59:34 CEST 2008


Hi all,

I have the following problem: I wish to create a command
(\addTask{taskname}), what create a command with a name what consist of two
part.
The first part is always the same (task) and the second part is a value of a
counter (taskcounter).
The problem is, that \newcommand don't accept counters value as the frst
arguement. I try so:

\newcounter{taskcounter}
\setcounter{taskcounter}{0}

\newcommand{\addTask}[1]{%
     \newcommand{%
         \task\arabic{taskcounter}%
     }{%
         #1%
     }%
}

Of course, the counter called taskcounter have a value(0), but the command
named \task0 has not created.
Please, if comebody could help me, send a source code.
Thx!


Gery [Balogh Gergő]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/tex-live/attachments/20080910/88f4811d/attachment.html 


More information about the tex-live mailing list