67

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?

  • 16
    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
  • 1
    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
  • 5
    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
  • 3
    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
64

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}

roman numbers

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

  • 1
    Any idea why the LaTeX kernel doesn't use \uppercase here? – Martin Scharrer Jul 19 '11 at 13:11
  • 2
    \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
  • 4
    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
  • 1
    @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
  • 1
    @Stephan: how did your \rom{6} render as XXV (and was there ever a Philip XXV of France)? – ℝaphink Jul 19 '11 at 15:40
33

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.
  • 3
    As usual, Martin was 2 minutes earlier :-) – Daniel Jul 19 '11 at 13:09
25

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}

\addbibresource{\jobname.bib}

\begin{document}

Philip~\RN{6} (or, if you prefer, Philip~\Rn{6})~\dots

\end{document}
18

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.

17

Simply write

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

  • 1
    It might require calculation for bigger Roman numbers. – Stefan Kottwitz Jul 19 '11 at 13:16
  • 17
    @Stefan: I don't think there were this many Philips and Johns of France :-) – Martin Scharrer Jul 19 '11 at 13:24
  • 6
    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
  • 2
    @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
  • 2
    @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
13

If you want to enter roman numbers within your text,please follow these instructions.

  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}.
  • 3
    You should add that the package changes the presentation of all counters to roman. -- From the documentation: "LaTeX generates numbers for things like chapters and sections, figure and table captions, and page numbers. Normally these are printed using arabic digits. The romannum package modifies the typesetting of such generated numbers so that they are printed as roman numerals." – Ruben Feb 11 '18 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.