GeneralTable of contents across several pages

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Skyflash
Posts: 4
Joined: Tue Apr 08, 2008 6:05 pm

Table of contents across several pages

Post by Skyflash »

Hi Guys (& Gals),

This might be a stupid question but i'll go ahead and ask it anyway.

I have a table of contents spread across several pages and at the bottom of one page I have the entry for say section 6 but at the top of the next page is the entry for subsection 6.1. This looks quite naff and I was wondering if there was anyway around this so that the entries are on the same page?

Any suggestions would be appreciated.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

Table of contents across several pages

Post by Stefan Kottwitz »

Hi,

you could insert directly before section 6:

Code: Select all

\addtocontents{toc}{\protect\newpage}
Alternatively you could enlarge the first page of the toc before subsection 6.1 or earlier:

Code: Select all

\addtocontents{toc}{\protect\enlargethispage{\baselineskip}}
Stefan
Skyflash
Posts: 4
Joined: Tue Apr 08, 2008 6:05 pm

Re: Table of contents across several pages

Post by Skyflash »

That's great, worked a treat. You've saved me countless hours!

Cheers :)
Post Reply