# Nested lists with roman numerals

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

• Should not be too hard, but in case you didn't know the documentation is available on ctan Apr 22 at 12:12
• Do you want this to apply in one case or for the whole document? Apr 22 at 12:18
• Does this answer your question? Enumerate with all lists as arabic numerals Apr 22 at 12:19
• @jessexknight just in one case Apr 22 at 12:22
• @jessexknight This one does not cover referring to enumi from the second level though. Apr 22 at 12:23

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.

\documentclass{article}
\usepackage{enumitem}
\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}

• 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) Apr 22 at 15:08

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

• no code as text, neither page num Apr 23 at 8:51
• @SaveUkraine-StartPeaceTalk That is to show that "the manual contain the code" not "here is the code". The main part is in text anyway Apr 23 at 9:16