# Numbering exercise in a book

I would like to write exercise for each chapter in a documentclass of book as shown below:

Chapter 4

Blablabla

Exercise 4.1. Blablablab

.....
.....

Exercise 4.2. Blablablabla

....
....

Chapter 5

blablabla

Exercise 5.1. Blablabla

etc.


Thank you very much for your help.

• Thanks @clemens. I tried but not much helpful. – Faisal Mustafa Oct 5 '17 at 15:41
• You tried all of the packages ctan.org/topic/exercise ond none of it worked? I cannot believe that. – cgnieder Oct 5 '17 at 15:51
• For example package xsim easily allows what you want. Or have a look at the exercise package. Or have a look at the solutions presented here: tex.stackexchange.com/questions/301/… – cgnieder Oct 5 '17 at 15:57
• it's possible to think of an exercise as similar to a non-italic theorem object. with amsthm you could specify \theoremstyle{definition} \newtheorem{exercise}{Exercise}[chapter} and then enter each exercise as \begin{exercise} ... \end{exercise}. if you already have theorems in your book, that shouldn't be inconvenient. – barbara beeton Oct 5 '17 at 20:05