# Problems with referencing nested enumerate blocks

I have a set of nested enumerate environment as follows:

\begin{enumerate}[label=(\alph*),ref=(\alph*),align=left]
\item \label{first item}
some notes for first item
\item  \label{second item}
The following are sub items
\begin{enumerate}[label=(\alph{enumi}.\roman*),ref(\roman*),align=left]
\item \label{item b.i}

\item \label{item b.ii}

\item \label{item b.iii}

\item \label{item b.iv}

\end{enumerate}

\end{enumerate}


Late on when I refer with \ref{item b.iii} I get (c), which does not exist.

I cannot understand this anomaly and I would appreciate any help in this regard.

With my regards and plenty of thanks in advance,

partha

• Welcome to TeX SX! I do not have this behaviour, after I've corrected your code (for the nested list) from ref(\roman*) to the correct ref=(\roman*)t. – Bernard Jun 26 '18 at 23:13
• Please post compilable code. Your example will be especially frustrating to users new to LaTeX, since enumerate is defined in the kernel, but not with the definition you're using. That is, you've redefined it (probably by loading some package or some non-standard class). – cfr Jun 26 '18 at 23:54
• You are definitely missing an = in ref(\roman*), it should read ref=(\roman*). With the = everything works fine. Without the = I get many errors and then if I force the compilation '(b.iii)'. If adding the = does not help you, please show us a full example of your code (an MWE (link)), so that we can reproduce the problem without guessing. – moewe Jun 27 '18 at 6:06
• Thanks a lot! Sometimes it becomes difficult to find ones own mistake! The ref(\roman*) was the mistake!!! – Partha Pratim Ghosh Jun 27 '18 at 12:10