[OS X TeX] Numerical commands
Michael Sharpe
msharpe at ucsd.edu
Thu Jul 8 19:37:49 EDT 2010
On Jul 8, 2010, at 3:51 PM, Alain Schremmer wrote:
> This is half off-topic:
>
> With arrayjobx, I am defining commands such as, for instance, in 4.sty:
>
> \newarray\IV %4
> \readarray{IV} %Chapter 4. From Local Graphs to Global Graphs
> {% begin array
> %4-1
> CheckableItem1
> &4-2
> CheckableItem2
> [...]
> &%4-50
> CheckableItem50
> }%end array
>
> I am using these commands as below and things work well but I was wondering if there might be a way to generate automatically the command names from the file names, for instance the command
> \IV
> from the file name
> 4
>
> But the only thing I could think of, namely using
> \Roman{\jobname}
> naturally does not work.
>
\edef\xx{\expandafter\romannumeral\jobname}
gets you the lower case roman numeral, and then
\expandafter\uppercase\expandafter{\xx}
produces upper case.
Michael
More information about the MacOSX-TeX
mailing list