# Optimize space usage of paragraphs

I have sometimes encountered the problem in TeX, that a paragraph does not fit on one single page and is therefore splitted over two pages. This behavior makes of course sense.

However, I noticed that for some document classes, this split is wasting some space. I.e., if I have a paragraph like this:

``````Line1
Line2
Line3
Line4
``````

Assume that these four lines fit perfectly on one single page, being aligned to the bottom of that page (so the page is full).

However, now I add another sentence to that paragraph, I get the following:

``````Line1
Line2
Line3
------> page changes here
Line4
Line5
``````

So as you can see, although there seems to be enough space for 4 lines on the first page (first example), in the second one only 3 lines are placed there, thus wasting space of 1 line on that page, which doesn't make any sense to me.

I have tried using `\filbreak` and that works, but then I have to interupt the paragraph, making if effectivly two paragraphs which is not always desired.

Unfortunatly I was not able to reproduce that behavior with the standard standalone/article class, so I am not really sure where this problem originates.

Question: Did anyone ever had a similar problem and was able to resolve it? How can I optimize space by using all available lines on a page without splitting paragraphs?

you could set `\widowpenalty=0` and `\clubpenalty=0` so that TeX is not worried about separating off single lines. (The usual question is rather the opposite on how to absolutely prevent ever getting a widow line)