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.
xsimeasily allows what you want. Or have a look at theexercisepackage. Or have a look at the solutions presented here: https://tex.stackexchange.com/questions/301/how-can-i-produce-exercises-in-one-part-of-a-latex-document-with-selected-answer?rq=1 – cgnieder Oct 05 '17 at 15:57amsthmyou 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 05 '17 at 20:05