3

I am trying to write a chapter which has a lot of sections. At a certain amount of sections in a chapter (exact number depends on top/bottom marings) the paragraphs in the text are split by very large vertical spaces, which I do not want to have.

Here is a minimal example:

\documentclass[12pt, twoside, a4paper]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
%\raggedbottom

\begin{document}

\chapter{Chapter}
\lipsum
\section{Section 1}
\section{Section 2}
\section{Section 3}
\section{Section 4}
\section{Section 5}
\section{Section 6}
\section{Section 7}
\section{Section 8}
\section{Section 9}
\section{Section 10}
%\section{One More Section}

\end{document}

The result of this looks like this:

enter image description here

However if I also use the commented line, which adds one more section, I get this: enter image description here

My desired behaviour is that when I have a lot of sections this vertical splitting of paragraphs should not appear at all. And additional sections should appear on page three in the second image. All together the result should look like the first image with an additional page where at the top there is "1.11 One More Section".

I tried using "\raggedbottom" to solve this and it removes the vertical spaces, however all the sections are still being shown on the third page and there is a large unused space below the text on page two.

Can anybody tell me why this is happening and what a solution could look like? Thank you!

2
  • 1
    There is no legal page break point between consecutive \section commands. If the block doesn't fit in a page, it goes to the next one. Add text and the problem will disappear.
    – egreg
    Feb 26 at 23:43
  • 2
    use (say) \mbox{} between the sections you have not written so there is some "white text" to allow a page break Feb 26 at 23:44

1 Answer 1

4

I guess you're making a skeleton for your chapter, with the titles of the sections you plan to write. Then it's not time to worry about the typesetting, until you actually add the text in the sections.

If you don't like seeing large white spaces, just add some legal page break point between the sections: there isn't one between two consecutive section titles. Why? Suppose you have

\section{A title}
\subsection{A subtitle}

You don't want a page break between the two titles and LaTeX will in no circumstance separate them.

\documentclass[12pt, twoside, a4paper]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
%\raggedbottom

\begin{document}

\chapter{Chapter}
\lipsum
\section{Section 1}

[text]

\section{Section 2}

[text]

\section{Section 3}

[text]

\section{Section 4}

[text]

\section{Section 5}

[text]

\section{Section 6}

[text]

\section{Section 7}

[text]

\section{Section 8}

[text]

\section{Section 9}

[text]

\section{Section 10}

[text]

\section{One More Section}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .