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

cleverefcross-referencing

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…

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

\crefalias{prop}{proposition}


A full MWE (minimum working example):

\documentclass{book}

\usepackage{amsthm} % if you prefer, use "ntheorem" instead of "amsthm"
\usepackage{cleveref}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{prop}[theorem]{Proposition}
\crefalias{prop}{proposition} % <-- new

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

\begin{proposition}[Hahaha]\label{hah}
Hahaha
\end{proposition}

\begin{prop}[Hohoho]\label{hoh}
Hohoho
\end{prop}

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


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.)