Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My friend is just about to submit her Diplomarbeit (German M.Sc.) and she bumped into a tiny corner of Koma-Script. The Table of Contents was just a tiny bit too long. Thus, one chapter was forced into a new page, which seemed quite ridiculous.

Toc Broken

She tried solving the problem on her own by using the geometry package, but that didn't work out (I didn't see her solution). So she called me for help. I knew she was using Koma, and I searched a bit, and bumped into the nice package called layouts.. So the question was: how do we change the height for the table of contents in the Koma package? Or more generally: how to control page geometry in the Koma package, when the Geometry package will not help?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

You can try saying

\AtBeginDocument{%
  \addtocontents{toc}{\protect\enlargethispage*{1\baselineskip}}%
}

just before \begin{document}.

If this is not sufficient, try with 2 instead of 1. Remember that two runs of LaTeX are necessary for such adjustments to be processed completely when a change is made.

You might also want to remove the page number, if it bumps with the line that's been added (this can happen when 2\baselineskip is needed); in this case say

\AtBeginDocument{%
  \addtocontents{toc}{\protect\enlargethispage*{2\baselineskip}}%
  \addtocontents{toc}{\protect\thispagestyle{empty}}%
}

The instruction \enlargethispage tells LaTeX to make some more space available in the page. However the footer doesn't change position, so it may interfere with the text; if the table of contents occupies only one page, the missing page number will not be noticed.

share|improve this answer
    
your solution is more complicated than mine, and answer the question: how to fine grain control more properties of the TOC in Koma. I am glad you showed us how! Thanks! –  Oz123 Oct 22 '12 at 5:28
add comment

Well, my solution is no big deal, and could be found in the Koma Manual. However, for a moderate Latex user the answer is not always straight forward, so I decided to post it here: Section 2.2.4 in the Manual states:

2.2.4
Uncommon Type Areas

\areaset[BCOR]{WIDTH }{HEIGHT }
To construct type areas with uncommon proportions or to specify type areas
which have exactly the values of the previous table (without adjusting to an
integer multiple of \baselineskip) it’s also possible to use \areaset 
instead of \typearea. \areaset sets the text width to {WIDTH} and the text 
height to HEIGHT (without any additional corrections) and computes the 
margins in a similar way as the \typearea command...

Hence,

\areaset{418.25555pt}{620.80026pt}
\tableofcontents
\areaset{418.25555pt}{595.80026pt}

Was a solution which allowed "forcing" the Table of Contents into a single page.

Fixed TOC

I hope this will save some time for new comers to Latex and Koma.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.