I am creating an environment just for the sake of illustration according to the following code:
Code: Select all
\documentclass{book}
\usepackage[a4paper,vmargin=7cm]{geometry}
\usepackage{multido,lipsum}
\newcounter{exercise}
\newenvironment{Exercise}{%
\refstepcounter{exercise}%
\vspace{10pt}\par\noindent%
\textbf{Exercise} \theexercise%
\begin{itshape}%
\par\noindent\ignorespaces}
{\end{itshape}\vspace{10pt}\par}
\begin{document}
\multido{\i=1+1}{30}{%
\begin{Exercise}
\lipsum[1-5]
\end{Exercise}}
\end{document}
My question is
1. how to force latex to avoid generating orphan?
2. is theorem environments (from amsthm.sty) orphan-free?
Thank you in advance.
Yuko.