jonalm
jonalm

Reputation: 955

Adjust white fill between paragraphs in LaTeX

Latex seems to fill in white space between the paragraphs by default, to get every page to end at approx the same height (at least with the book and scrreprt class). This is all fine, but I have a couple of pages with only two paragraphs. Latex insists on putting in 2cm of white space between them, which looks bad. I know that I can use \raggedrift for the whole document, but I kind of like the white fill except for the pages with only two paragraphs. I have also tried to adjust manually with \vspace{-1cm}, but it doesn't seem to work.

Is there a way to set a maximum value to the height of white fill between paragraphs?

Upvotes: 0

Views: 5663

Answers (2)

Maestro
Maestro

Reputation: 1

The solution is very simple. At the end of the last paragraph of the page, add '\vfill'. This will fill up the rest of the page, making the two paragraphs on it move as close to each other as they would normally. I just tested it myself and it works.

Upvotes: 0

Heatsink
Heatsink

Reputation: 7751

If your mostly-empty pages are because the following content starts on a new page (at the end of a chapter, for example), then the easiest way to fix it is probably to insert a vertical fill after your last paragraph. The vertical fill should expand to occupy the extra space, keeping the inter-paragraph fill small.

You can change the vertical space applied to every paragraph by setting the value of \parskip.

Upvotes: 1

Related Questions