I am using enumerated lists and sometimes I want to replace the label displayed without affecting the underlying counting and referencing mechanism. I know how to use \addtocounter
on a case by case basis to recover the numbering for subsequent items, but this is not enough for references. Also, using \addtocounter
on a case by case basis adds a burden and I would to specify the behaviour one and for all. I am using enumitem
to define my own enumerate-inspired list.
Is there any way to change the default counting behaviour without tinkering on a case by case using \addtocounter
?
\documentclass{article}
\begin{document}
\begin{enumerate}
\item A
\item[x] B
\item C (The label should be 3, but displays 2)
\end{enumerate}
\begin{enumerate}
\item A
\addtocounter{enumi}{1}
\item[x] \label{two} B \ref{two} (The ref should be 2 but displays 1)
\item \label{three} C \ref{three} (The label and the ref are 3 as desired)
\end{enumerate}
\end{document}
\refstepcounter