I need to cross-reference the item in enumerate. Here is what I have.
\documentclass[12pt]{article}
\begin{document}
\begin{enumerate}
\item Solve $x^2=1$.
\item Solve $x^2=4$.
\begin{enumerate}
\item \label{enum:1} Find all roots.
\item For each root in (\ref{enum:1}), subtract 2 from it.
\end{enumerate}
\end{enumerate}
\end{document}
It works fine but I want to have (a) instead of (2a) in the last line. In other words, I only want to have the label within the current enumerate. Thanks.