Hi, Phi.
phi wrote:What do you mean with "doesn't work"?....
What is "\seeds"?
"\seeds" is a command which prints the output of
nv\romannumeral\n, which in the code posted should be "nvxiii", after the expansion of
nv\romannumeral\n.
Which error messages are shown? How are all the macros and counters defined?
You have to support much more information and code.
I didn't post all the code because I was sure that I didn't understand how \csname works. I've found another way to do the job, so I don't remember the error message
All the counters (ex. nvi...nvxxx, \n) are defined at the beginning of the sty file.
{\csname nv\romannumeral\n \endcsname} opens a group, prints the output of the macro named nv\romannumeral\n (after expansion) and closes the group again. If the command doesn't exist, it is defined as \relax and undefined immediately after.
By
{\csname nv\romannumeral\n \endcsname} and
\setcounter{nv\romannumeral\n}{#1} I meant to assign #1 to the already defined counter "nvxiii" (when "\n=13"). Was that right?
\setcounter{nv\romannumeral\n}{#1} must be inside a macro definition;
What do you mean? All the code I posted was inside a macro.
The problem is that I didn't understand if it is possible to use "arrays" of counters as I used to do in programming languages with variables (ex.: A[1]...A[n])!
Thank you very much for your attention and help.
Nino