6

How can I stop LaTeX from creating vertical space between paragraphs to fill the page although parskip=false is set (actually by default in scrbook).

Usually not a problem it becomes really ugly when a new section starts at the next page and there is just not enough space on the one before. Then there is a lot of whitespace on the first page and parskip is maximally stretched although it does not fill the page.

Is there a more elegant solution than \setlength{\parskip}{0pt plus 0pt minus 0pt} for that page?

i don't want to set this because on pages where there is not as much whitespace it might look better wit a little stretching.

Example with the first few paragraphs of Sherlock Holmes:

\documentclass{scrbook}

\usepackage{fontspec}

\begin{document}
\chapter{Chapter}
To Sherlock Holmes she is always the woman.
I have seldom heard him mention her under any other name.
In his eyes she eclipses and predominates the whole of her sex.
It was not that he felt any emotion akin to love for Irene Adler.
All emotions, and that one particularly, were abhorrent to his cold, precise but admirably balanced mind.
He was, I take it, the most perfect reasoning and observing machine that the world has seen, but as a lover he would have placed himself in a false position.
He never spoke of the softer passions, save with a gibe and a sneer.
They were admirable things for the observer—excellent for drawing the veil from men’s motives and actions.
But for the trained reasoner to admit such intrusions into his own delicate and finely adjusted temperament was to introduce a distracting factor which might throw a doubt upon all his mental results.

Grit in a sensitive instrument, or a crack in one of his own high-power lenses, would not be more disturbing than a strong emotion in a nature such as his.
And yet there was but one woman to him, and that woman was the late Irene Adler, of dubious and questionable memory.
I had seen little of Holmes lately.
My marriage had drifted us away from each other.
My own complete happiness, and the home-centred interests which rise up around the man who first finds himself master of his own establishment, were sufficient to absorb all my attention, while Holmes, who loathed every form of society with his whole Bohemian soul, remained in our lodgings in Baker Street, buried among his old books, and alternating from week to week between cocaine and ambition, the drowsiness of the drug, and the fierce energy of his own keen nature.

He was still, as ever, deeply attracted by the study of crime, and occupied his immense faculties and extraordinary powers of observation in following out those clues, and clearing up those mysteries which had been abandoned as hopeless by the official police.
From time to time I heard some vague account of his doings: of his summons to Odessa in the case of the Trepoff murder, of his clearing up of the singular tragedy of the Atkinson brothers at Trincomalee, and finally of the mission which he had accomplished so delicately and successfully for the reigning family of Holland.
Beyond these signs of his activity, however, which I merely shared with all the readers of the daily press, I knew little of my former friend and companion.

One night—it was on the twentieth of March, 1888—I was returning from a journey to a patient (for I had now returned to civil practice), when my way led me through Baker Street.
\section{test}
As I passed the well-remembered door, which must always be associated in my mind with my wooing, and with the dark incidents of the Study in Scarlet, I was seized with a keen desire to see Holmes again, and to know how he was employing his extraordinary powers.
\end{document}

edit

Maybe a solution is to invoke \raggedbottom automatically at the first page of a chapter. How can i call \flushbottom automatically again for the next page?

MaxNoe
  • 6,136

2 Answers2

5

You're unlucky. A book should have equal height pages, so \flushbottom is in force. However, the text before \section is too short to fill the page and an underfull page is shipped out, because the alternative of having the section title at the bottom is not taken into consideration, because there's space for just one line of text after the section title.

You can verify this by modifying the start of the text after \section as

\section{test}
As \pagebreak I passed the well-remembered door, [...]

If you compile this you'll see that the section title find its place in the first page along with a club line.

What are the alternatives? If you add \looseness=1 just before the second paragraph like in

[...] which might throw a doubt upon all his mental results.

\looseness=1
Grit in a sensitive instrument, or a crack in one of his own high-power lenses, [...]

you gain one line, but still the text is too short. The other paragraphs won't benefit of this setting, because their last lines are too short.

Now add also \enlargethispage{-3\baselineskip} after \looseness=1 and the page will be typeset without spaces between paragraphs. It will be three lines shorter than normal, but the trick may become almost unnoticeable if the preceding page is blank or short anyway.

Reserve these tricks when the document is in its final form and you have decided about the shape of chapter and section headings and, above all, the dimension of the text block. Changes to these settings may result in making your adjustments obsolete and perhaps nefarious for page breaking.

egreg
  • 1,121,712
  • I know the reason why this happens;) I speciafically choosed the exmaple to reproduce this ;) – MaxNoe Jan 12 '15 at 19:11
  • @MaxNoe Well, there is no catch-all answer. Even a \raggedbottom command for the first chapter page isn't: it would solve this problem, but the same can appear elsewhere: being at the first page of a chapter is not the problem; the problem is the section title too near the bottom of the page. – egreg Jan 12 '15 at 20:33
4

parskip=never removes the stretching component in \parskip.

Manuel
  • 27,118