# Here is another example where cleveref does not capitalize when it should

This question is similar to (but not a duplicate of) The cleveref capitalize option does not seem produced capitalized output

The original post makes a code example, which does not seem to always reproduce the problem. Here is a better attempt.

The following code is supposed to output \cref usages as capitalized label names, but it does not really work. Section is output as capitalized, but definition is output as lower case.

I'd be happy if someone could help me figure out why it doesn't seem to work. I'm also attaching an image to show that "definition" is given in lower case despite using the capitalize option.

\documentclass[a4paper]{article}
\usepackage{pgf}

\usepackage{color}
\definecolor{blueye}{rgb}{0, 0.2, 0.5}
\usepackage{mathtools}
\usepackage[capitalize]{cleveref}
\usepackage{amsthm}
\usepackage{framed}

\newtheorem{protodefinition}{Definition}[section]

\newenvironment{definition}

\crefname{protodefinition}{definition}{definitions}
\Crefname{protodefinition}{Definition}{Definitions}

\begin{document}

\section{Introduction}
\label{sec.intro}

operations to decompose a set of partially overlapping regions into a
valid partition.  In particular, given $V=\{A_1, A_2, ..., A_M\}$,
suppose that for each pair $(A_i,A_j)$, we whether
$A_i \subseteq A_j$, $A_i \supseteq A_j$, or $A_i \cap A_j = \emptyset$.  We would
like to compute the maximal disjoint decomposition of $V$.  We define
precisely what we mean by maximal disjoint decomposition in
\cref{def.mdd} of \cref{sec.1253}.

\subsection{Maximal Disjoint Decomposition}
\label{sec.1253}

\begin{definition}
\label{def.mdd}
If $D$ is a disjoint decomposition such that for any other disjoint
decomposition $D'$ it holds that $|D| > |D'|$, then $D$ is said to be
a \emph{maximal disjoint decomposition}.
\end{definition}

\end{document}

• Workaround \crefname{protodefinition}{Definition}{Definitions} – user36296 May 7 '18 at 16:37
• I can confirm that I get the same output with cleveref.sty 2018/03/27 v0.21.4 – moewe May 7 '18 at 16:37
• – user36296 May 7 '18 at 16:38

As @samcarter says, this is the expected and documented behaviour: cleveref always honours your manual format definitions, whatever they are, irrespective of package options. (Same goes for the nameinlink option.) This is so that you can always manually override the default for individual reference types.
Just define your own reference formats as you want them to appear. If you want \cref references capitalised, defined the formats to be capitalised:
\crefname{protodefinition}{Definition}{Definitions}

(Note that just this line without the corresponding \Crefname suffices here, as the automatically-derived \Crefname will end up identical, which is what you want. Though supplying both is probably good practice, in case you later decide you want to e.g. change the \cref format to "Def." whilst keeping the \Cref format as "Definition".)
• Would it be worth a feature request to retain the 'standard' behaviour of the capitalise option even with definitions set up via \crefname? It would certainly be more intuitive for me if \cref, \Cref and the capitalise option were to behave the same for the pre-defined labels and my own definitions. – moewe May 8 '18 at 15:35
• Ah yes, 1. would be a problem if cleveref derives \Crefname from \crefname (which would also be an awesome feature, but I know all too well that automatic capitalisation is a nightmare), but not if the capitalise option simply tells \cref to take the \Crefname (which is what I - wrongly - thought happened). Ad 2. Yes that would be a problem, so this would need an opt-out. Now that I have seen how the capitalise option is implemented I'm more sceptical towards my request. Thanks for getting back to me and clearing things up. – moewe May 10 '18 at 10:13