I have a list of conditions I want to reference, so I use

   \item \label{foo} ...
   \item \label{bar} ...
We reference the condition \ref{foo}.

This way the conditions are numbered 1, 2, 3… But what if I want a custom “numbering” reflecting some relation between the conditions like 1, 1', 2, 3, …? If I write

   \item \label{foo} ...
   \item[1'] \label{bar} ...

the referencing does not work, the value 1' is not associated with the label bar.


There is no way to associate a label to an \item[] since the relevant counter (enumi in this case) is not used at all -- \item[] is explicitly meant for using a different item label which is perhaps not generated by an enumeration. It could be a letter, another symbol or -- with some effort -- even graphics.

Redefinining \item is possible, but tedious.

The crossreftools package provides \crtcrossreflabel{displayed label value}[labelname] which can be inserted for this.

Please note that \item[{\crtcrossreflabel{1'}[bar]}] must be used, since an optional argument (the one from \crtcrossreflabel) appears in another optional argument (the one from \item).




See \ref{bar}

   \item \label{foo} ...
   \item[{\crtcrossreflabel{1'}[bar]}]  ...


enter image description here

| improve this answer | |

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.