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 trying to work on the numbering of the theorems/definitions/lemmas etc., and I have some problems with the numbering.

I would like the theorems, propositions, corollarys, definitions, conjectures, examples to follow the same numbering, and to reduce the numbering. For example, in my code below, the stuff goes as follows:

Chapter 1

Addition

1.1 Basics (SECTION)

Definition 1.1.1.

Theorem 1.1.1.

Theorem 1.1.2.

Example 1.1.1.

1.1.1. Some tips (SUBSECTION)

Definition 1.1.2.

1.2 Advanced stuff (SECTION)

Definition 1.2.1.

But how would I get it to be like this below?:

Chapter 1

Addition

1.1 Basics (SECTION)

Definition 1.1

Theorem 1.2

Theorem 1.3

Example 1.4

1.1.1. Some tips (SUBSECTION)

Definition 1.5

1.2 Advanced stuff (SECTION)

Definition 1.6

And for each new chapter, how would I get the numbering to be resetted? Like it would be Definition 2.1, Theorem 2.2, Theorem 2.3 for chapter 2.

I like the layout of my table of contents, i.e. Part I is addition and subtraction, Part II is Multiplication and division, and I am happy with the way the sections and subsections are working, but I just want to definitions, theorems etc. to be corrected.

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amsfonts,amssymb,amsthm,epsfig,epstopdf,titling,url,array}


\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem*{cor}{Corollary}

\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{conj}{Conjecture}[section]
\newtheorem{exmp}{Example}[section]

\theoremstyle{remark}
\newtheorem*{rem}{Remark}
\newtheorem*{note}{Note}





\begin{document}
\tableofcontents

\part{Addition and Subtraction}

\chapter{Addition}
\section{Basics}
\begin{defn}
Here is a new definition
\end{defn}
\begin{thm}
Here is a new theorem
\end{thm}
\begin{thm}
Here is a new theorem
\end{thm}
\begin{exmp}
Here is a good example.
\end{exmp}
\subsection{Some tips}
\begin{defn}
Here is a new definition
\end{defn}
\section{Advanced stuff}
\begin{defn}
Here is a new definition
\end{defn}
\subsection{Warnings}
\begin{defn}
Here is a new definition
\end{defn}

\chapter{Subtraction}
\section{Basics}
\subsection{Some tips}
\section{Advanced stuff}
\subsection{Warnings}

\part{Multiplication and Division}

\chapter{Multiplication}
\section{Basics}
\subsection{Some tips}
\section{Advanced stuff}
\subsection{Warnings}

\chapter{Division}
\section{Basics}
\subsection{Some tips}
\section{Advanced stuff}
\subsection{Warnings}



\end{document}
share|improve this question
add comment

1 Answer

up vote 15 down vote accepted

Similar to the solution at this question and section 3 of the amsthm documentation:

enter image description here

\documentclass[11pt,a4paper]{report}
\usepackage{amsthm}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{exmp}[thm]{Example} % same for example numbers

\newcommand{\chaptercontent}{
\section{Basics}
\begin{defn}Here is a new definition.\end{defn}
\begin{thm}Here is a new theorem.\end{thm}
\begin{thm}Here is a new theorem.\end{thm}
\begin{exmp}Here is a good example.\end{exmp}
\subsection{Some tips}
\begin{defn}Here is a new definition.\end{defn}
\section{Advanced stuff}
\begin{defn}Here is a new definition.\end{defn}
\subsection{Warnings}
\begin{defn}Here is a new definition.\end{defn}
}

\begin{document}
\tableofcontents
\part{Addition and Subtraction}
\chapter{Addition} \chaptercontent
\chapter{Subtraction} \chaptercontent
\part{Multiplication and Division}
\chapter{Multiplication} \chaptercontent
\chapter{Division} \chaptercontent
\end{document}
share|improve this answer
    
Thanks Mike, most useful. :) –  Gary Feb 26 '12 at 3:11
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.