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.

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
3  
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
3  
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
1  
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
add comment

1 Answer

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.)

\documentclass{article}
\usepackage{amsthm,amssymb}    
\newtheorem{theorem}{Theorem}[section]
% Theorem numbering is Sec#.Thm#
\newtheorem{lemma}[theorem]{Lemma}
% Lemmata are numbered as theorems

\begin{document}
\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]
    \label{lemma:synergy}
    Under the right circumstances, $1 + 1 = 3$.
\end{lemma}
\begin{proof} By adoption of a positive workplace culture. \end{proof}
\noindent
The Synergy Lemma proves quite useful to show the following celbrated result:

\begin{theorem}
    \label{thm:2+2=5}
    When it suits us, $2 + 2 = 5$. 
\end{theorem}
\begin{proof} Exercise for the reader; use good stomping boots. \end{proof}
\noindent
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.

\end{document}
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
add comment

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.