Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

latex: printing a variable in roman numerals

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!

like image 557
anon Avatar asked Apr 05 '10 15:04

anon


2 Answers

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).

like image 52
AVB Avatar answered Oct 16 '22 02:10

AVB


lowercase

\romannumeral 0\ref{blah}\relax

uppercase

\uppercase\expandafter{\romannumeral 0\ref{blah}}

like image 21
Alexey Malistov Avatar answered Oct 16 '22 00:10

Alexey Malistov