I have two counters in my document, counterA and counterB.
I would like the references \ref{} in my document to be printed as 1.a) or 2., etc. where the digit refers to counterA and the letter to counterB.
Is it possible? How can I do it?
\documentclass{article}
\begin{document}
\newcounter{counterA}
\setcounter{counterA}{0}
\newcounter{counterB}
\setcounter{counterB}{0}
\refstepcounter{counterA}
\refstepcounter{counterB}
\label{First_Label}
I get: \ref{Second_Label}. I would like \textbf{2.}\,b)
Vestibulum lectus metus, tincidunt at fermentum non, pellentesque at lorem. Vivamus nisl sem, tempor ac mi et, elementum feugiat justo. Pellentesque tristique consequat molestie.
\bigskip
\refstepcounter{counterA}
\refstepcounter{counterB}
\label{Second_Label}
I get: \ref{First_Label}. I would like \textbf{1.}\,a)
Morbi nec nibh nulla. Cras posuere erat vitae lacus convallis, ut consequat urna dignissim.
\end{document}


\ref{}will refer tocounterBrather thancounterA? – Colas Mar 18 '14 at 17:14\refstepcounterbefore\labelsets the counter for\label. – Heiko Oberdiek Mar 18 '14 at 17:22