I am using the memoir
class for a document with many chapters and parts.
In the ToC sometimes there is a page break between the name of \part
and the name of the next chapter.
Table of Contents
Part I
1. Chapter ........... 5
2. Chapter ........... 10
3. Chapter ........... 15
Part II
1. Chapter ........... 20
2. Chapter ........... 25
3. Chapter ........... 30
Part III
‹page breaks here›
I tried to find out in the memoir documentation, but as a beginner I did not understand how to avoid the page breaking after a new part.
As Steven explained to me here (look there for an example), I certainly have to use needspace
, but I don't now how.
\addtocontents{toc}{\protect\newpage}
before Part III works, but I would prefer a solution, that avoid such a page break in the header.