[texhax] Nested lists numbering

Aditya Mahajan aditya.mahajan at alumni.iitk.ac.in
Sat Mar 12 21:30:57 CET 2005


<--- On Mar 12, Ivan Ivanov wrote --->

> Dear colleagues,
> I have the following question concerning nested enumerate environments. I have
> \begin{enumerate}
> \item Item 1
> \item Item 2
>  \begin{enumerate}
>    \item Item 1.1
>    \item Item 1.2
>  \end{enumerate}
> \end{enumerate}
>
> and I would like it to be
> 1. Item 1
> 2. Item 2
>     2.1. Item 1.1
>     2.2. Item 1.2
>
> I played to do it with \theenumi and \theenumii commands but I did not
> find a solution.
>
Try,
\documentclass{article}

\begin{document}
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}
  \begin{enumerate}
  \item Item 1
  \item Item 2
    \begin{enumerate}
      \item Item 1.1
      \item Item 1.2
    \end{enumerate}
  \end{enumerate}

\end{document}

HTH,

Aditya



More information about the texhax mailing list