This might be of relevance:
- Theorem environment - line break after label
- pagebreak and amsmath theorem environment issue
- Avoid page break in theorem
Situation
I used the information provided in this answer to come up with this break-style:
\newtheoremstyle{break}
{2em} %spaceabove
{} %spacebelow
{} %\itshape} %bodyfont
{-1em} %indentamt
{\bfseries} %headfont
{} %headpunct
{\newline} %headspace
{
\thmnumber{#2}\thmname{ #1}%
\thmnote{ (#3) }
} %headspec
Note that I have no control over where my theorems are going to be placed, as they are imported into a main file and a compendium (using this method).
Attempts
Moreover I tried to put \unskip\pagebreak (from here (2.)) behind \newline in headspace as well as behind (#3) in headspec. This, however, achieved the opposite: pagebreaks after each theorem header.
Unfortunately I do not have enough insight in LaTeX to adapt this (3.) to my needs. It will produce crammed pages with peculiar indentation on some theorems and alike, plus, it does not completely fix the problem (I got at least 1 instance of the very same problem in my compendium).
Question
How to avoid a page-break after the theorem-title when using my own theoremstyle that breaks the line.
Update:
- after try out alexraasch suggestion
\nobreak produces widows and orphans (at least title + first line) instead of breaking beforehand.
Plus I do use \newcommand{\spaceBeforeEnumOnly}{~\vspace{-1em}} in case a theorem or alike only consists of nothing but an enumeration - adding \nobreak did not work here.
- after adding the penalties
Personally I think this is rather unaesthetic, but LaTeX probably doesn't even recognize those as unpleasing. The first one appears more often and also in combination with the aforementioned \spaceBeforeEnumOnly.


\breakpenalty=10000or\nobreakin the headspec. – alexkelbo Mar 12 '16 at 14:48\breakpenalty=10000produces an error.\nobreakdoes have some impact, though it produces widows and orphans (at least title + first line) instead of breaking beforehand. Plus I do use\newcommand{\spaceBeforeEnumOnly}{~\vspace{-1em}}in case a theorem or alike only consists of nothing but a enumeration - adding\nobreakdid not work here. – BadAtLaTeX Mar 12 '16 at 15:08\nobreakin the headspec and add\widowpenalty=5000and\clubpenalty=5000to your document. If that doesn't work set these penalties to 10000. – alexkelbo Mar 12 '16 at 15:25