I often prepare papers for conferences with an upper limit on the number of pages. I spend a lot of time thinking what words and characters to delete in order to make the paper fit in the page limit.

Recently, I run into an interesting and paradoxical phoenomenon: I remove some words, and the number of pages increases! As an example: I have a two-column paper. I remove two words from the top of column #2 at page #1. As a result, LaTeX takes the last line from column #1 and puts it on top of column #2. Now, the last line of column #2 is pushed to page #2, and so on, and this leads to page overflow.

It is very difficult to create a minimal working example since this behavior doesn't make much sense to me. So before I spend time to create an MWE, I will be happy to know if this behavior is known.

  • 3
    i'm really not sure why this question has been down-voted. the behavior is definitely known, and i'm sure i've seen it explained somewhere, although at the moment i can't remember where. – barbara beeton Jan 27 '18 at 20:10
  • @barbarabeeton I've up-voted it. I also have vague memories (something to do about references to another item in a paper) where LaTeX oscillates between OK and NBG as the reference shifts the referenced item, which invalidates the reference which modifies it which .... – Peter Wilson Jan 27 '18 at 20:54

For example, there is a paragraph with four lines, two lines are at the bottom of the column A and two lines are at the top of the next column B. Then, one or more words are removed with the result that TeX breaks the paragraph in three lines instead of four.

The document has set \clubpenalty and \widowpenalty to 10000 to prevent widows and orphans (page break right after the first line or right before the last line of a paragraph). The result is that TeX cannot break the paragraph of three lines.

If there is not enough place in column A (likely), then LaTeX has to move the paragraph to column B. Before the deletion of some words, column B got two lines, now column B takes the whole paragraph with three lines. The extra line can now cause a further page, because at every next page breaks stuff is moved to the next page.

  • Very nice explanation! Is there a way to mark the regions in which removing words will make the document longer and/or adding words will make it shorter? In other words, is there a variable that one may watch, some kind of badness or so? – user121799 Jan 27 '18 at 20:36
  • @marmot No, there are too many parameters to consider, what is deleted, where it is deleted, influence on line breaking, influence on page breaking, float placement, ... – Heiko Oberdiek Jan 27 '18 at 20:52

Here is a very simpleminded approach to the problem. (And yes, I also remember that I experienced similar things.) This fragile code marks paragraphs that TeX thinks are "bad".

\typeout{paragraph \thePars good}%
\typeout{paragraph \thePars bad}%







Let me stress that I am not an expert and hope not to do any major harm. However, this snippet seems really to identify some "problematic" paragraphs. And of course one can play with the threshold or replace \badness by some other measure. And, as Heiko explained, of course the problematic positions may shift if one makes changes at other places. Nevertheless, my hope is that this code may help you to identify locations worthwhile being modified somewhat more efficiently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.