# How can I get Roman numerals in text?

For example:

Charles's sister Bona, married the eldest son of Philip VI of France, the future John II of France, in 1335.

How can I get Roman numerals?

-
Simply write "Charles's sister Bona, married the eldest son of Philip VI of France, the future John II of France, in 1335." –  Gonzalo Medina Jul 19 '11 at 13:03
Indeed, simply write it as you did. Doesn't this work for you? If so please add a minimal working example (MWE) that illustrates your problem. Maybe it's a font issue or similar. –  Martin Scharrer Jul 19 '11 at 13:09
If you want over- and underlined roman numerals, please see the answer to this question: Roman numerals formatting –  Stephen Oct 14 '11 at 18:16
Not all fonts make distinguishable Roman numerals, or nice letters 'I', 'V', 'X'. For that reason, I usually use \textrm{XXIV}. –  Vladimir Sep 25 '13 at 10:09

Simply write

Charles's sister Bona, married the eldest son of Philip VI of France, the future John II of France, in 1335.

-
It might require calculation for bigger Roman numbers. –  Stefan Kottwitz Jul 19 '11 at 13:16
@Stefan: I don't think there were this many Philips and Johns of France :-) –  Martin Scharrer Jul 19 '11 at 13:24
Using a macro has the advantage that there's semantics - for example, roman numerals could be changed regarding font or shape later on. That would be hard if common alphabetic letters are used. –  Stefan Kottwitz Jul 19 '11 at 13:55
@Stefan: I agree, but Roman numerals (at least in regular text) normally use the same font as the normal text, so I don't see (at least in regular text) any significant advantage. –  Gonzalo Medina Jul 19 '11 at 14:08
@Gonzalo: Just ideas and thoughts. I like macros :-) btw. the OP desired tighter kerning for the Roman numbers I see now. –  Stefan Kottwitz Jul 19 '11 at 15:11

You can convert a number to a lowercase roman numeral using the TeX primitive \romannumeral<number>\relaxor in uppercase using \uppercase\expandafter{\romannumeral<number>\relax}. Counter values can be printed in as Roman numerals using \roman{<counter>} (lowercase) and \Roman{<counter>} (uppercase).

However for simple Roman numerals in text I would simple write it as you already did.

-

The \romannumeral kernel primitive is your friend:

\newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}

Charles's sister Bona, married the eldest son of Philip \RNum{4} of France, the future John \RNum{2} of France, in 1335.

-
As usual, Martin was 2 minutes earlier :-) –  Daniel Jul 19 '11 at 13:09

Here's an example how you could use the TeX primitive (mentioned by Martin) for defining your own macro for conversion to big Roman numbers:

\documentclass{article}
\makeatletter
\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother
\begin{document}
Charles's sister Bona, married the eldest son of Philip \rom{6} of France,
the future John \rom{2} of France, in 1335.

Today is the year \rom{2011}.
\end{document}


It's done similar to the definition of the LaTeX macro \Roman.

-
Any idea why the LaTeX kernel doesn't use \uppercase here? –  Martin Scharrer Jul 19 '11 at 13:11
\uppercase doesn't expand the argument, so it would not have an effect here. However, \MakeUppercase would do it. –  Stefan Kottwitz Jul 19 '11 at 13:20
I know but this can be fixed with \expandafter: \uppercase\expandafter{\romannumeral<number>\relax}. Works fine in my quick tests. –  Martin Scharrer Jul 19 '11 at 13:22
Perhaps since only a few characters need to be capitalized, so just a few decisions but not regarding arguments from a complete alphabet. source2e did not tell it. –  Stefan Kottwitz Jul 19 '11 at 13:35
@Martin: Try the different approaches inside an \edef, and see why \uppercase is not going to work. (I think the actual application was in \csname, but the same idea applies.) –  Joseph Wright Jul 19 '11 at 13:51

biblatex offers the macros \RN and \Rn for upper- resp. lowercase roman numerals, plus \RNfont and \Rnfont for formatting those numerals.

\documentclass{article}

\usepackage{biblatex}
\renewcommand*{\Rnfont}{\scshape}

% The following is only included to prevent BibTeX/biber errors!
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
\end{filecontents}