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

I am writing a book and have already made contract for x pages with the printing company, so I want to create a PDF containing x pages. However, say that I only have material enough to fill x − y pages. Is there some package or simple hack available for adding y empty pages at the end of the document? I.e. I want to add empty pages until the latest added page is page number x.

share|improve this question
You could add clearpage\null the appropriate number of times. (And add \pagestyle{empty} after the first \clearpage\null.) – lockstep Aug 6 '11 at 9:34
up vote 7 down vote accepted

You can do this using a simple loop.

The following code will ensure the document to be e.g. 100 pages in size:






share|improve this answer

The memoir package provides the \leavespergathering{} command for a purpose closely related to yours. Ipsis literis from the manual:

The command \leavespergathering{num} ensures that there will be exactly the right number of pages output to make a complete set of gatherings of num leaves (2× num pages) each --- if necessary blank pages will be output at the end to make up the correct tally. If num is less than two (the default) then no additional pages will be output.

Thus, to fill to 84 pages, for example, you would use \leavespergathering{42}

share|improve this answer

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.