8

I have seen here how roman numerals can be used in enumerate lists. How could I create nested lists with roman numerals, to get something like this?

(i) ...
    (i.i) ...
    (i.ii) ...
(ii) ...

2 Answers2

7

Since you mention that the roman-lowercase enumeration style is a one-off requirement for your document, I suggest you (a) load the enumitem package and (b) use its machinery to provide the formatting requirements as optional arguments to the respective instances of \begin{enumerate}.

When creating cross-references to items in roman-enumerated lists, I suggest you omit the round parentheses. As the following example shows, the setup recommended in the preceding paragraph is sufficiently general/robust to allow the use of \cref directives to create cross-references.

enter image description here

\documentclass{article}
\usepackage{enumitem}
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional
\usepackage[nameinlink]{cleveref} % optional, for \cref macro

\begin{document} \begin{enumerate}[label=(\roman),ref=\roman] \item \dots \label{list:1} \begin{enumerate}[label=(\theenumi.\roman),ref=\theenumi.\roman] \item \dots \item \dots \label{list:2.b} \end{enumerate} \item \dots \end{enumerate}

Cross-references to items \ref{list:1} and \ref{list:2.b}.

Cross-references to \cref{list:1,list:2.b}. \end{document}

Mico
  • 506,678
  • 1
    Messing around a bit you can also do \begin{enumerate}[ ref=\roman* , label=(\noexpand\theenumi) ]. This is likely highly dependent on the exact implementation of the package though, so do not recommend (that noexpand is even necessary) – user202729 Apr 22 '22 at 15:08
5

Like this.

%! TEX program = pdflatex
\documentclass{article}

\usepackage[shortlabels]{enumitem}

\begin{document}

\setlist[enumerate,1]{label=(\roman)} \setlist[enumerate,2]{label=(\roman{enumi}.\roman)} \begin{enumerate} \item \begin{enumerate} \item 1 \item 2 \end{enumerate} \item \begin{enumerate} \item 1 \item 2 \end{enumerate} \end{enumerate}

\end{document}

Turns out the documentation is a bit lacking, for more complex operations it presupposes knowledge of the enumerate environment in LaTeX. Read "printing counters" and "enumerate [environment]" chapter in LaTeX unofficial reference manual for details on \roman and enumi.

There's a similar example from the manual

manual screenshot

user202729
  • 7,143