Nested lists with roman numerals

#enumeratelists

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

Best Answer

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}