# Definition with roman counter value

Is it possible to write a definition with a counter value?

I have many definitions with a Roman numeral:

\def\abcI{} ..
\def\abcII{} ..
\def\abcIII{} ..


But this is not possible:

\newcounter{myabc}

\abc\Roman{myabc}
\stepcounter{myabc}


Is there another way to do this?

You can do this:

\newcommand*\abcRoman[1]{\csname abc\Roman{#1}\endcsname}

...

\abcRoman{myabc}
\stepcounter{myabc}


Well, I suspect that this may not be what you really need, however, that depends on knowing what you want to use your code for.

As egreg suggests, if you can use lowercase roman numerals for your macros, you can get on the safer side:

\newcommand\abci{...}
\newcommand\abcii{...}
\newcommand\abciii{...}
\newcommand*\abcroman[1]{\csname abc\romannumeral\value{#1}\endcsname}

...

\newcounter{myabc}
\setcounter{myabc}{1}

\abcroman{myabc}
\stepcounter{myabc}

• While \Roman is safe in ordinary conditions, it may give wrong results (aka puzzling errors) when certain babel languages are loaded. – egreg Dec 28 '14 at 0:12
• What do you suggest -- \rommannumeral\csname c@#1\endcsname? (Damn, I can't even test things now, I'm on Windoze :( ) – yo' Dec 28 '14 at 0:13
• If one wants to be on the safe side, it's better to use lowercase Roman numerals and \romannumeral (but after \csname, of course. \csname abc\romannumeral\value{#1}\endcsname would do, preserving expandability. – egreg Dec 28 '14 at 0:17