6

I am writing a document, where I have 3-4 Theorems, and a Lemma. I want to refer to the Lemma in the Theorems (possibly highlighted and a link to the Lemma). How should I go about doing it? I tried inserting a \label{lma1} in the Lemma, and then using ~\cref{lma1}, but this refers to the Lemma as "Theorem 2.5" (the numbering is right, but I want it to display "Lemma 2.5". How do I change this?

1 Answer 1

10

Depending on the theorem package you're using (or if you're doing it without a package), you need to define a separate lemma environment. The following minimal working example uses amsthm to define a theorem and lemma environment. cleveref has been formatted to print Lemma for a lemma reference, while dummy text is provided by lipsum:

enter image description here

\documentclass{article}
\usepackage{amsthm}% http://ctan.org/pkg/amsthm
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\usepackage{cleveref}% http://ctan.org/pkg/cleveref
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\crefname{lemma}{Lemma}{Lemmas}
\begin{document}
\section{A section}
\begin{theorem}\label{thm}\lipsum[1]\end{theorem}
\begin{theorem}See~\cref{lma1}.\end{theorem}
\begin{lemma}\label{lma1}\lipsum[2]\end{lemma}
\end{document}
0

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.