latex: printing a variable in roman numerals

anon picture anon · Apr 5, 2010 · Viewed 7.7k times · Source

I'm typesetting in LaTeX, and I'd like to display a "variable" (in my case, a reference \ref{blah} to an item number in list) in roman rather than the default arabic. Is there an easy way to do this? Thanks for any pointers!

Answer

AVB picture AVB · Apr 5, 2010

You can try \def\theenumi{\roman{enumi}} inside an enumerate environment -- this changes both labels and refs, but you'll have to then explicitly undo it (if you want to).