I understand that it's possible to have \autoref generate references like Theorem 12, or Thm. 12, etc. where the label is always the same. Is there any way to have a short and long version of autoref? Sometimes I'll be referencing a theorem in equations, and I don't want Proposition 12 or something, but an abbreviation. In the main text, I will always want the long form. Is there a pain-free way of doing this?


Instead of using \autoref, I suggest you also load the cleveref package and then assign the abbreviated labels to \cref (via a \crefname directive) and the non-abbreviated labels to \Cref (via a \Crefname directive).

enter image description here

\usepackage[nameinlink]{cleveref} % make look of \cref emulate that of \autoref
\crefname{prop}{Prop.}{Props.}             % abbreviated labels
\Crefname{prop}{Proposition}{Propositions} % non-abbreviated labels

\begin{prop} \label{prop:hello}
\cref{prop:hello}, \Cref{prop:hello}

The following example defines a macro \shortautoref, which redefines the names for \autoref. As example, a section reference is used. Just extend the list of redefinitions to your needs.



  \section{First section}
  Autoref: \autoref{sec:first}\\
  Short autoref: \shortautoref{sec:first}


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.