0

This question already has an answer here:

Whether I use the \usepackage[capitalize]{cleveref} or \usepackage{cleveref}, I don't see any difference in the output from \cref. Do I understand correctly that this option is indented to force \cref to output the capitalized version of the environment name, even if not at the beginning of a sentence?

Here is the LaTeX file I'm using.

\documentclass[a4paper]{article}


\usepackage{xcolor}
\usepackage{amsthm}
\usepackage{framed}
\usepackage[colorlinks=true]{hyperref}
\usepackage[capitalize]{cleveref}


\theoremstyle{plain}% default
\newtheorem{prototheorem}{Theorem}[section]
\colorlet{shadecolor}{orange!15}

\newenvironment{theorem}
   {\begin{shaded}\begin{prototheorem}}
   {\end{prototheorem}\end{shaded}}

\newtheorem{protolemma}[prototheorem]{Lemma}
\newenvironment{lemma}
   {\begin{shaded}\begin{protolemma}}
   {\end{protolemma}\end{shaded}}

\newtheorem{protocorollary}[prototheorem]{Corollary}
\newenvironment{corollary}
   {\begin{shaded}\begin{protocorollary}}
   {\end{protocorollary}\end{shaded}}

\crefname{theorem}{theorem}{theorems}
\Crefname{theorem}{Theorem}{Theorems}
\crefname{lemma}{lemma}{lemmas}
\Crefname{lemma}{Lemma}{Lemmas}

\begin{document}

\begin{lemma}
  \label{ent.201}
  If $V$ is a set of subsets of $U$, and $\exists X_0 \in V$ such that
  $X \in V$ implies $X_0 \subseteq X$, then $X_0 = \bigcap V$.
\end{lemma}

Intuitively, \cref{ent.201} says that given a set of subsets,
if one of those subsets happens to be a subset of all the given
subsets, then it is in fact the intersection of
all the subsets.

\begin{theorem}
  \label{ent.188}
  If $V \subseteq U$, and if $F$ is a set of binary functions defined on
  $U$, then there exists a unique $clos_F(V)$, and it is closed under $F$.
\end{theorem}

We can see from \cref{ent.201} and also from
\cref{ent.188} such sets are always finite.

\end{document}

marked as duplicate by user36296, Phelype Oleinik, user121799, moewe, TeXnician May 8 '18 at 16:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Works fine for me. Which version of cleveref do you use? – Ulrike Fischer May 7 '18 at 15:38
  • With the code I get 'Lemma 0.1' and 'Theorem 0.2'. Both with capital letters. Can you show a screenshot of the output you get? What version of cleveref are you using? Add \listfiles to the beginning of your file and check the .log to find out. Mine is cleveref.sty 2018/03/27 v0.21.4. – moewe May 7 '18 at 15:38
  • My version is cleveref.sty 2018/03/03 v0.21.3 Intelligent cross-referencing – Jim Newton May 7 '18 at 15:50
  • hmmm, works fine for me now. I was compiling with pdflatex. Could that be a problem? – Jim Newton May 7 '18 at 15:54
  • It should not be a problem to use pdfLaTeX. I compiled your MWE with pdfLaTeX as well. – moewe May 7 '18 at 15:56