TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm currently writing my maths dissertation.

Say I am in "section 5" of the dissertation and am ordering lemmas, propositions, theorems and corollaries by 5.1, 5.2, 5.3,... etc. Is there a way to code this enumeration so that if I wanted to add a new 5.2, the old 5.2 would change to 5.3, 5.3 would change to 5.4,... etc?

Thanks for any help

share|improve this question
This is the default behavior of LaTeX system. Please add a minimal working example (MWE) that illustrates your problem. I think there is a misunderstanding here. – percusse Aug 21 '12 at 12:27
What you describe is how all latex numbering works. So if it isn't working you need to show us what you did. – David Carlisle Aug 21 '12 at 12:27
As the previous comments say this is LaTeX default provided one uses LaTeX's \newtheorem etc. to set up these environments, e.g. \newtheorem{theorem}{Theorem}[section] etc. You should then place \label and reference them with \ref to refer to these environments. See LaTeX documentation, and possibly consider either amsthm or ntheorem packages for more sophisticated formatting. – Andrew Swann Aug 21 '12 at 12:45
Thanks guys. I'm completely new to this all. I'll check out \newtheorem{thm} et al. – user32259 Aug 21 '12 at 13:02
up vote 3 down vote accepted

Hopefully you've discovered that the problem is easy in LaTeX (indeed, it is substantially what it was designed for), but here is an explicit construction for you to look at.

Try compiling this document, both with and without the Lemma in it. (Depending on how you are writing your document, you may have to run LaTeX twice in a row to make the cross-reference resolve each time you remove the Lemma. Many modern editors do this automatically.)

% Theorem numbering is Sec#.Thm#
% Lemmata are numbered as theorems

\section{A section with some politically motivated math in it}

The following Lemma is folklore among Business Administration circles of
the \emph{Paradigmatic Shift} school:

\begin{lemma}[Synergy Lemma]
    Under the right circumstances, $1 + 1 = 3$.
\begin{proof} By adoption of a positive workplace culture. \end{proof}
The Synergy Lemma proves quite useful to show the following celbrated result:

    When it suits us, $2 + 2 = 5$. 
\begin{proof} Exercise for the reader; use good stomping boots. \end{proof}
Theorem~\ref{thm:2+2=5} is commonly known as \emph{Orwell's Theorem},
though it is often (and more accurately) called \emph{Vissarionovich's Theorem}
in many eastern European countries.

share|improve this answer
Hi, thanks for your answer. As I am just starting with latex I really find illustrated examples helpful. – user32259 Aug 23 '12 at 10:03

Your Answer


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.