4

I am using cleveref and ntheorem. Consider the following document:

\documentclass{article}

\usepackage{cleveref}
\usepackage{ntheorem}

\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}

\crefname{lemma}{lemma}{lemmata}
\Crefname{lemma}{Lemma}{Lemmata}
\crefname{proposition}{proposition}{propositions}
\Crefname{proposition}{Proposition}{Propositions}

\begin{document}

\begin{lemma} \label{a} Bla bla.
\end{lemma} 

\begin{proposition} \label{b} Amazing!
\end{proposition} 

As seen in the \namecref{b}, everything comes from \Cref{a,b}.

\end{document}

The output becomes:

As seen in the proposition, everything comes from Lemma 1 and proposition 1.

I would like the second proposition to be capitalized, i.e. I would like the output to be:

As seen in the proposition, everything comes from Lemma 1 and Proposition 1.

This can not be achieved by altering the \crefname, because I still want \namecref to output non-capitalized names.

What is the preferred way to achieve this capitalization style with cleveref? Thanks a lot!

PS According to my package manager, I am using cleveref version 0.19. ntheorem version 1.33 and this is MiKTeX 2.9.

  • Which versions are you using, and please don't use the minimal class for mwes, it is not made for it (quite confusing) – daleif Sep 21 '16 at 15:12
  • 1
    @daleif: I addressed your comments in the main question. – Jesko Hüttenhain Sep 21 '16 at 15:17
4

cleverref has a dedicated command to deal with this problem, \lcnamecref will give you the name in lower cases.

\documentclass{article}

\usepackage[capitalise]{cleveref}
\usepackage{ntheorem}

\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}

\begin{document}

\begin{lemma} \label{a} Bla bla.
\end{lemma} 

\begin{proposition} \label{b} Amazing!
\end{proposition} 

As seen in the  
\lcnamecref{b} and \lcnamecref{a}, everything comes from \cref{a,b}.

\end{document}

enter image description here

  • This definitely fixes this minimal example. I think I can also use this to fix my thesis ;). Thanks a lot! – Jesko Hüttenhain Sep 21 '16 at 15:30
  • @JeskoHüttenhain You're welcome! – user36296 Sep 21 '16 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.