bookclass), and am using the tocloft package to make my table of contents pretty.
I would like to add a horizontal line beneath each Part section of the ToC, but here I run into a problem. I use this to add an
\hruleafter each part entry, and this looks great.
However, when the ToC goes over more than one page, it happens that the entry is on one page and the line ends up on the next page.
Here is a minimal example showing what happens:
This results in the bottom of the first page looking like
while the top of the second page looks like
Is there any way that the line can be forced to follow the part entry, instead of seemingly floating free on its own? Preferably the part entry should simply be moved to the next page along with the line.
I know it should be possible to fill in extra space in the ToC here and there, when I get closer to finishing the thesis and know how the sections will actually be positioned on the contents pages, but it would be really nice for this to simply happen automatically.