2

In the following situation

\begin{enumerate}

\item 

\begin{enumerate}

\item \label{ii}

\item

\end{enumerate}

\item

\end{enumerate}

Item \ref{ii}

I obtain in the output

  1. (a)

(b)

2.

Item 1a

I want, however, to obtain "Item (a)" (the reference should contain only the second-level item number, not the first level). How can I do it?

4

The enumitem package allows one to customise list environments and their parameters.

\begin{enumerate}
\item 
    \begin{enumerate}[label=(\alph*),ref=\alph*]
    \item \label{ii}
    \item
    \end{enumerate}
\item
\end{enumerate}

Item \ref{ii}

In the snippet above the argument of enumerat allows you to set how the label and the reference to it are going to be printed. It is possible to set the parameter globally. To set a parameter globally one can use the command

\setlist[list,level]{format}

where list is one of description, enumerate or itemize; or

\setlist[level]{format}

Thus for the case at hand

\setlist[enumerate,2]{ref=\alph*]

See the package documentation (texdoc enumitem).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.