[Tex/LaTex] Using \Cref of cleveref package in enviroments created with shortcuts


I'm using the cleverref package. This is how I use it (and it works perfectly):


It follows directly from \Cref{lol} 

I'm using the following codes in the preamble:


The enviroment \begin{prop} \end{prop} works perfectly too. But if I use \Cref{} with a proposition created with \begin{prop} it does not work. The document shows the symbol ???

Can I fix this problem? I would like to define this enviroments with the corresponding shortcuts like thm,prop,defi…

Best Answer

Since you have two environments (proposition and prop) that have the same name ("Proposition") and share a common counter, I will assume that they should also be cross-referenced (with cleveref's macros) using the same prefix label, say, "Proposition". This may be accomplished via an instruction such as


A full MWE (minimum working example):


\usepackage{amsthm} % if you prefer, use "ntheorem" instead of "amsthm"
\crefalias{prop}{proposition} % <-- new

\setcounter{chapter}{1} % just for this example



It follows directly from \Cref{hoh,hah} that \dots

This example produces

It follows directly from Propositions 1.1 and 1.2 that ...

(Observe that the arguments of \Cref need not be entered by ascending numerical value; cleveref takes care of the sorting by default.)