TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

During the last phase of layout I frequently get a single line or two on a separate page. Rather then pulling the whole paragraph on that last page I would like to "squeeze" the lines on the previous page a bit.

Is there a way to mark the current page to be squeezed a bit if necessary, but let LaTeX reset this marking automatically after the page is done?

share|improve this question
up vote 28 down vote accepted

Use \enlargethispage or \enlargethispage*

According to the documentation,



Enlarge the \textheight for the current page by the specified amount; e.g. \enlargethispage{\baselineskip} will allow one additional line.

The starred form tries to squeeze the material together on the page as much as possible. This is normally used together with an explicit \pagebreak.

share|improve this answer
I just wanted to mention "enlarging the page may be dangerous, and is there a way to reduce the baselineskip by 2% on the current page." but googling for your anser revealed: "The starred form tries to squeeze the material together on the page as much as possible. This is normally used together with an explicit \pagebreak." So: Thanks, perfect! – towi Oct 20 '11 at 6:47
it's often useful to look back a few pages to see if there is an earlier instance of two lines being broken to a new page, where allowing one more line on the previous page would actually move two lines. it's nice to keep the bottoms of facing pages aligned, so two pages might be adjusted at the same time. and sometimes as little as .25\baselineskip is enough to move a line "up". – barbara beeton Oct 20 '11 at 11:17
Thanks @towi, I'm not sure why I didn't include the documentation about the starred version, but this is now an improved answer. – bryn Oct 20 '11 at 20:36
In such cases I go over the preceding paragraphs to see if there is something that can be said more concisely. Only if that fails would I take such extreme measures. – vonbrand Feb 24 '14 at 17:00
I encountered an issue with the method of avoiding widows/orphans by using \enlargethispage{\baselineskip} -- I often get the "fatal error" \pdfendlink ended up in different nesting level than \pdfstartlink. Any idea what to do? – ClintEastwood Mar 4 at 12:30

Well for two lines, you should not change too much, but the one line (also called widow or widowed line) should be avoided (also the single line of a starting paragraph at the end of a page - called orphan). So instead of doing it manually for a single page, which you would have to change if you add a new word or sentence, you could tell TeX to avoid widows and orphans by adding

\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000

That would not avoid the two lines on a seperate page, because that is still okay in typographical philosophy, but at least the one line.

share|improve this answer
Ok, two lines I will not touch. I heard the terms before, but as "Schusterjunge" and "Hurenkind" (which is not always an orphan, though :cough:). – towi Oct 20 '11 at 7:14
Yep, i'm also thinking mor of the german terms, and find them easier to remember (okay i'm german, that might be a reason), but i thought for an english comment, i should use the english terms. As you can see in the commands, orphans may also be called clubs, i think. – Ronny Oct 20 '11 at 13:45

Your Answer


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.