I don't know why but mdframed sometimes introduce some page breaks for no apparent reason. Is there a way to prevent mdframed from inserting these page breaks ? I cannot do a minimal working example, it is not repeatable (I do not understand how it happens). Here is an example, there is a page break in exercize 7.12 before the sentence "... and give their nature..."
the latex code that generates the page is
\begin{exercise}
For each value of $\beta$, give the critical points of the function:
\[f(x,y)=x^{2}+y^{2}+\beta xy +x +2y\]
and give their nature (min/max, local/global) ?
\end{exercise}
The environment exercise is defined elsewhere by:
\newmdenv[
frametitlefont=\color{ocre}\bfseries\normalfont,
frametitleaboveskip=-6pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
linecolor=ocre,
backgroundcolor=ocre!5,
linewidth=2pt,
]{exoBox}
\newenvironment{exercise}[1][]{%
\refstepcounter{exo}
\ifstrempty{#1}%
{\begin{exoBox}[frametitle={\colorbox{white}{\space Exercize \theexo \space}}]\noindent}
{\begin{exoBox}[frametitle={\colorbox{white}{\space Exercize \theexo : #1\space}}]\noindent}
} %
{\end{exoBox}}
I have no clue to why these pagebreaks happen, if you have any hint on what I should do to analyse the problem (and hopefully solve it at the end of the day), I would be very grateful. Thank you
