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 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?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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}
share|improve this answer
    
Thanks a lot! Works perfect. –  Nikhil Jun 4 '12 at 6:17

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.