# Adding a cost of extra pages / forcing a page limit

TeX creates a document by solving an optimization problem, where different spacings etc. are assigned different costs, or "badness".

All writers of papers, especially for conferences proceedings have to battle with page limits. Right now it is very late and my coauthor removed a sentence, only to have the document grow beyond the page limit because TeX rearranged some figures.

Is it possible to assign an infinite "badness" to using more than a set number of pages? (I am not looking for a solution for this particular deadline, we'll solve our problem anyway)

-