Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using cleveref with the capitalise option, and I'd like to use the \lcnamecref command to give the name of one of my theorems in the text. But if this is not one of the theorem types pre-defined in cleveref (Lemma, Theorem etc.) then I get an error message. Here's a MWE:

\documentclass{article}
\usepackage{amsthm}
\usepackage[capitalise]{cleveref}

\crefname{mythm}{Mytheorem}{Mytheorems}
\newtheorem{mythm}{Mytheorem}

\begin{document}
\begin{mythm}\label{m}
foo
\end{mythm}
That was a \lcnamecref{m}.
\end{document}

When I compile I get the error message

! Argument of \MakeUppercase has an extra }.

What am I doing wrong?

share|improve this question
    
I get no error if I use \Crefname instead of \crefname –  egreg Mar 26 '13 at 13:08

1 Answer 1

up vote 5 down vote accepted

\lcnamecref will force lowercase for the names defined with \Crefname (the upper-case variant), so you have to use this macro in the preamble.

\documentclass{article}
\usepackage{amsthm}
\usepackage[capitalise]{cleveref}

% \crefname{mythm}{Mytheorem}{Mytheorems}
\Crefname{mythm}{Mytheorem}{Mytheorems}
\newtheorem{mythm}{Mytheorem}

\begin{document}
\begin{mythm}\label{m}
foo
\end{mythm}
That was a \lcnamecref{m}.
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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