I am using amsmath, thmtools and the following definition to get nice Theorem statements inside a light blue box:
\declaretheoremstyle[
shaded={bgcolor=blue!10},
numberwithin=section
]{mythmstyle}
\declaretheorem[style=mythmstyle]{theorem}
My problem is that these boxes containing theorem statements do not split between pages. Since I tend to use long statements, this produces big unbreakable blocks and the formatting of pages is terrible.
To clarify: I want to modify my settings so that page formatting can split Theorems between pages, which it seems unable to do at the moment. How can I do?
If I remove the `shaded' option, breaking returns to normal, so that should be the culprit
EDIT: a solution is to use the framed package. Using amsthm, I define a pre-theorem environment, to get counters right
\newtheorem{pretheorem}{Theorem}[section]
and then the true theorem environment is defined by inserting a frame as follows:
\newenvironment{theorem}
{\colorlet{shadecolor}{blue!15}
\begin{snugshade}\begin{pretheorem}}
{\end{pretheorem}\end{snugshade}}
Not too elegant but it seems to work.


ntheorempackaged which enables you to define framed, shaded and boxed theorems that can break across pages. This package requires theframedpackage and cooperates withthmtools. Have a look at § 237, "Framed and Boxed Theorems", pp. 9-10 in the documentation. – Bernard Aug 24 '22 at 14:17ntheoremconflicts withamsbookwhich I am using – Piero D'Ancona Aug 24 '22 at 23:12