I'm using the cleverref package. This is how I use it (and it works perfectly):
\begin{proposition}[Lalala]\label{lol}
Hahahah
\end{proposition}
It follows directly from \Cref{lol}
I'm using the following codes in the preamble:
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{proposition}[theorem]{Proposition}
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
andprop
) that have the same name ("Proposition") and share a common counter, I will assume that they should also be cross-referenced (withcleveref
's macros) using the same prefix label, say, "Proposition". This may be accomplished via an instruction such asA full MWE (minimum working example):
This example produces
(Observe that the arguments of
\Cref
need not be entered by ascending numerical value;cleveref
takes care of the sorting by default.)