I am currently using the \autoref command from the hyperref package to refer to my theorems etc. However, I want to be able to (easily) refer to two or more theorems/lemmas/..., e.g. by calling something like \autoref{lemma1,lemma2,lemma5} -- where of course lemmas 1, 2 and 5 are labeled lemma1, lemma2 and lemma5 respectively -- so that the reference shows: "Lemmas 1, 2 and 5".
Can anyone help me with this? It doesn't seem to me like the hyperref package provides this functionality.
Minimal example
\documentclass{memoir}
\usepackage{amsmath,amssymb}
\usepackage{mathtools}
\usepackage{cleveref}
\mathtoolsset{showonlyrefs,showmanualtags}
\begin{document}
This is the first equation
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
and this is the second equation
\begin{equation}
\label{test}
\alpha^2 + \beta^2 = \gamma^2
\end{equation}
Referring to second equation here: \eqref{test}.
\end{document}
cleverefpackage? It allows multiple references, with sorting and collapsing (e.g. turns "1,3,2,7" into "1--3 and 7"), among other nice things. – Aaron Apr 13 '11 at 17:47cleverefpackage, the reference works. It seems to conflict withmathtools'showonlyrefsoption. – smlange Apr 13 '11 at 20:06mathtoolsredefines theeqrefcommand to do some extra things (writing to theauxfile, specifically).Cleverefalso wants to patch the reference system, and the two don't play well together. I think that it would be non-trivial to graft them together, because you'd need to pull apart a comma-separated list of label names then write them all to theauxfile to makemathtoolshappy. – Aaron Apr 13 '11 at 22:40