It seems that the cleveref
package does not capitalize properly when referring to a newtheorem if both \crefname
and \Crefname
have been defined. Or is it just me? Here is my MWE:
\documentclass[a4paper,10pt]{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\usepackage[capitalise]{cleveref}
\crefname{theorem}{theoLowercase}{theoLowercaseS}
\Crefname{theorem}{TheoUpperCase}{TheoUppercasesS}
\begin{document}
\begin{theorem}\label{theo:test}
Test theorem
\end{theorem}
This is a reference to \cref{theo:test}.
\begin{figure} Test Figure
\caption{Test figure caption}
\label{fig:test}
\end{figure}
This is a reference to \cref{fig:test}.
\end{document}
On my machine, the refrence to the theorem uses the lowercase version if both \crefname
and \Crefname
are defined, namely :
This is a reference to theoLowercase 1.
If I comment out the \crefname
definition on line 5, I get the expected:
This is a reference to TheoUpperCase 1.
In both cases,
the reference to the figure is correctly capitalized though.
Am I crazy?
Best Answer
Seems to be "by design". Quoting from section 6.1 of the
cleveref
manual:If you want your custom definitions to be respondend to the
capitalise
option, use the internal\if@cref@capitalise
conditional: