I use mdframed for my theorems like this
\mdfdefinestyle{theoremstyle}{%
%adjustable lengths
%inner margins
innertopmargin=\topskip,
% outter margins
skipabove= 0.1in,
skipbelow= 0.1in,
% colrs
linecolor=red!60,
middlelinewidth=2pt,%
roundcorner=5pt,
apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
shade,left color=white, right color=blue!20}}},
% Title
frametitlefont=\TheoremHeaderFont\bfseries,
frametitlerule=true,%
frametitlerulecolor=orange!60,
frametitlerulewidth=2pt,
% Miscellaneous
nobreak=false,
}
Sometimes page break occurs right after the theorem title. How I can prevent to break the frame between title and content?
EDIT BY yori. I'm having the same problem, so here is a MWE:
\documentclass{article}
\usepackage{lipsum}
\usepackage{mdframed}
\usepackage[a4paper,margin=1.75in]{geometry}
\begin{document}
\lipsum[1-5]
\begin{mdframed}[frametitle={The title}]%
\[
x^2+y^2=z^2.
\]
\end{mdframed}
\end{document}
\documentclass{...}
and ending with\end{document}
, not just a snippet.