I would like to use something like \crefrange{ref1}{ref2} where ref1 and ref2 are arguments of \label statements for equations numbered 1 and 5, respectively. But instead of showing equations (1) to (5), I would like to show only: (1) to (5). How can I accomplish this?


The cleveref package provides the \labelcref macro, which acts just like \cref except that the name of the counter of the objects being cross-referenced is omitted.

Note that whereas the arguments of \cref needn't all refer to the same counter, that's not true for the \labelcref (as well as for \crefrange).

enter image description here

\refstepcounter{equation} \label{ref1} % short-hand method
\refstepcounter{equation} \label{ref2}
\refstepcounter{equation} \label{ref3}
\refstepcounter{equation} \label{ref4}
\refstepcounter{equation} \label{ref5}

\obeylines % just for this example
\cref{ref1,ref5,ref4,ref3,ref2}      % arguments needn't be sorted
\labelcref{ref1,ref5,ref4,ref3,ref2} % ditto

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.