1
\documentclass{article}
\usepackage{cleveref}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}

\begin{document}
    
    \begin{theorem} \label{thm:one} \dots \end{theorem}

    \begin{lemma} \label{lem:two} \dots \end{lemma}

    \begin{definition} \label{def:three} \dots \end{definition}

    \begin{example} \label{ex:four} \dots \end{example}

    Reference to \Cref{thm:one} and \Cref{lem:two} and \Cref{def:three} and \Cref{ex:four}
    
\end{document}

enter image description here

Naturally I want \Cref{lem:two} to yield Lemma 2, not Theorem 2.

1
  • 2
    It's known that cleveref has to be loaded as late as possible, even after hyperref.
    – egreg
    Jun 7, 2021 at 14:38

1 Answer 1

2

Simply load amsthm before cleveref:

\usepackage{amsthm}
\usepackage{cleveref}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .