# Writing Roman numbers in Equation

What is the command for writing roman numerals like I, II, IV etc. in an equation ? To be noted that my requirement is to write them within $$...$$ and not as counters or page numbers. Any light on this would be extremely helpful.

-
will you insert these numerals already as the "letter" forms, or are you expecting to get the roman equivalent of a counter? – barbara beeton Jul 24 '14 at 13:32

If you don't want to do the conversion,

\documentclass{article}
\usepackage{amsmath}

\newcommand{\RN}[1]{%
\textup{\uppercase\expandafter{\romannumeral#1}}%
}

\begin{document}
$\RN{4}+\RN{12}=\RN{16}$
\end{document}


If you also don't want to do the arithmetic

\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentCommand{\RN}{m}
{
\textup{ \int_to_Roman:n { #1 } }
}
\ExplSyntaxOff

\begin{document}
$\RN{4}+\RN{12}=\RN{4+12}$
\end{document}

-
Thanx. This is very helpful. :) – smiley06 Jul 28 '14 at 12:32

I understand, that you are expecting a plain TeX solution, as it is suggested by tex-core tag, hence

$$1+1=2 \eqno{\rm IV}$$

\bye

-
Perhaps even \eqno\hbox{\tenrm IV} to ensure that a) the number is from the text font, and b) doesn't inherit the style of the surrounding text. – morbusg Jul 24 '14 at 11:53
@morbusg The \hbox is irrelevant, the style isn't inherited. Moreover, the {...} in the answer is irrelevant too. – wipet Apr 10 at 18:51
@wipet Huh, weird. Yes, thank you for correcting. – morbusg Apr 18 at 17:12
\documentclass{article}
\usepackage{mathtools}
\begin{document}

$\text{IV}\times\text{V}=\text{XX}$

\end{document}

-

For the sake of completeness. The conversion to roman numeral will be done automatically.

\documentclass[varwidth,math]{standalone}% change it back to your own document class

\newcounter{x}
\def\ToRomanEmpire#1{\setcounter{x}{#1}\Roman{x}}

\begin{document}
$\ToRomanEmpire{1999} + \ToRomanEmpire{15} = \ToRomanEmpire{2014}$
\end{document}


-

1. in the first step you have to install the package of "romannum".
2. in this step you have to use this package in your text,therefore type this:

\usepackage{romannum}

3. Now you can write roman numbers in your text in lowercase or uppercase by this command.

• \romannum{1} for Lowercase roman numbers or
• \Romannum{1} for Uppercase roman numbers.

For example suppose that we want to write this sentence.

ten million people died between WWI and WWII.

We write in Latex:

ten million people died between WW\Romannum{1} and WW\Romannum{2}.

-
It would be best to provide a sample document and also to the address the specific issue of roman numerals in display math mode raised in the question. – Andrew Swann Apr 10 at 15:08