# Using chapter instead of section number with amsthm

I'm trying to number my examples, definitions, theorems, etc. in the form Chapter#.example#. However, the amsthm package only seems to provide sectional numbering, which I don't like.

Does anyone know how to get the correct format of numbering?

In the MWE the numbering should be: Example 1.1. and Definition 1.1.

\documentclass{book}
\usepackage{amsthm}
\newtheorem{exmp}{Example}
\newtheorem{defi}{Definition}[section]
\begin{document}
\chapter{}
\section{section 1}
\begin{exmp}
\end{exmp}
\section{section 2}
\begin{defi}
\end{defi}
\end{document}


EDIT: I read this might be possible with thmtools, but i'd prefer to do it without loading additional packages if possible. Unless it becomes a to complicated solution ofcourse.

• \newtheorem{exmp}{Example}[chapter]\newtheorem{defi}{Definition}[chapter] works for me. – lockstep Jun 12 '13 at 14:15
• Why is it in the manual only explained for [section]... sigh.. it doesn't mention chapter at all. Thanks though, I didn't even consider just trying to see what it did. If you post as an answer I'll accept it. – Mythio Jun 12 '13 at 14:23
• @Mythio -- section as used in the manual is only a suggestion. i'll add a note to the update list to make it clear that it's possible to use other segmenting counters instead. (since the heaviest use of the package is for articles, section is more relevant there.) – barbara beeton Jun 12 '13 at 14:30
• @barbarabeeton; yeah I suppose its true that it is used mostly for articles and formats without chapters. I think updating the documentation is a good idea though, thanks for putting it on the list! :-) – Mythio Jun 12 '13 at 14:38

\newtheorem{exmp}{Example}[chapter]