TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

How can I vary the vertical page length per page?

I want to have the page breaks at essentially arbitrary locations in the document, specified by a command, like \newpage but not necessarily this command. Moreover, I want these page breaks to determine the vertical length of the page.

(This must sound crazy!)


share|improve this question
up vote 14 down vote accepted

Do you mean physical dimensions of the page? If yes, I had a talk about it at TUG'11. Our paper is in the upcoming TUGboat, but the talk itself is here: http://river-valley.zeeba.tv/ebooks-and-paper-size-output-routine-hacking-made-easy/

There are snippets of code on the screen; if you are interested, let me know, and I put copies of them here.

Update: here is LaTeX example that shows the idea:

  \advance\pdfpageheight by 2in
  \advance\pdfpageheight by 2\topmargin
  \advance\pdfpageheight by \textheight
  \advance\pdfpageheight by -\pagegoal}


This line has a footnote\footnote{\lipsum[6-8]}.

And this line too\footnote{\lipsum[12]}.

share|improve this answer
Yes - I do mean the physical dimensions of the page. I'd be very interested in the actual code. – Bart Snapp Nov 23 '11 at 3:15
Thanks!!! Worked great! – Bart Snapp Nov 23 '11 at 4:28

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.