6

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.

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

1 Answer 1

6

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

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

You must log in to answer this question.

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