2

I have two levels of enumerate lists in LaTeX with labels like

(ii.a)

where the levels are separated by dot. I would like to have references in the same format. However, they are printed as

iia

It is no problem to put the brackets around, but I would like to have also the dot in between. I tried several approaches I Googled, but nothing worked well with the references.

  • Could you provide actual peace of the code (text) in this case? – pagep Dec 7 '16 at 22:37
  • Welcome to TeX.SE! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Dec 21 '16 at 18:58
3

enumitem provides separate label and ref keys for you to specify your list representation and cross-referencing with (if you wish them to be different, for some reason):

enter image description here

\documentclass{article}

\usepackage{enumitem}

\begin{document}

See Items~\ref{enum:level2} and~\ref{enum:level1}.

\begin{enumerate}[label={(\roman*)}]
  \item First item
  \item Second item
  \begin{enumerate}[label={(\roman{enumi}.\alph*)}]
    \item First nested item
    \item Second nested item \label{enum:level2}
    \item Third nested item
    \item Last nested item
  \end{enumerate}
  \item Third item \label{enum:level1}
  \item Last item
\end{enumerate}

\end{document}
| improve this answer | |

Your Answer

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