Page Layoutspacing in table of contents

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
brt381
Posts: 4
Joined: Sat Aug 15, 2009 9:43 pm

spacing in table of contents

Post by brt381 »

I have written a document containing three pages of table-of-contents; unfortunately, the last page consists of just a single section, which looks ugly. If I could remove a bit of space between the "Contents" heading and the first ToC entry on the first page, all of the entries would fit on two pages. Can anyone tell me how to do this?

Thanks!

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

spacing in table of contents

Post by gmedina »

Hi,

two alternatives: the first one is the one you suggest: add something like the following

Code: Select all

\addtocontents{toc}{\protect\addvspace{-2\baselineskip}}
just before the first sectional unit that will go to the table of contents (of course, instead of -2\baselineskip, use the length that suits your needs). This approach however might cause the first entry to be placed too close to the "Contents" heading; in this case, you could use the second alternative: add something like

Code: Select all

\addtocontents{toc}{\protect\enlargethispage{\baselineskip}}
somewhere near some of a sectional unit that will appear in the second page of the table of contents; of course, you can use 2\baselineskip or any other length, instead of \baselineskip.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
cocka
Posts: 9
Joined: Sat Sep 26, 2009 2:46 pm

Re: spacing in table of contents

Post by cocka »

I didn't want to open a new topic for this. I use the \linespread option, because I'm expected to form the document in that way (I'm not really keen on more space between lines), but I don't want to have more space among the lines of table of contents. How to reduce the space there, if I use \linespread at the same time too? :?:
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

spacing in table of contents

Post by Stefan Kottwitz »

Don't hesitate to open new topics for new questions.
You could use \linespread after \tableofcontents, or use the setspace package instead.

Stefan
LaTeX.org admin
Post Reply