Page LayoutFinding how much space is left on a page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
stormy
Posts: 4
Joined: Mon Jun 14, 2010 9:55 pm

Finding how much space is left on a page

Post by stormy »

Hello,

I am trying to generate a very large (>100 pages) latex document consisting mostly of a number of \longtables. I would like to pagebreak in a good way...I don't want only a couple lines from a table on one page, and the rest of it on the next page. Right now I have a lot of tables with page breaks very close to the start or the end, and I would like to avoid this. I put \pagebreak[3] commands between all of the tables, but the problem persists. \pagebreak[4] commands have the opposite problem, they put page breaks between tables that could fit on the same page. I've tried fiddling with \clubpenalty and \widowpenalty also, with no effect.

Is there a better way to implement page breaks when dealing with large tables? If not, is there a variable associated with how much space is left on the page? Perhaps if I could figure out how much space was left on the page, I could compare with the size of the table and decide to pagebreak based on that.
Last edited by stormy on Thu Jun 17, 2010 3:36 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Finding how much space is left on a page

Post by Stefan Kottwitz »

Hi stormy,

welcome to the board!
Perhaps the needspace package could be useful for you.

Stefan
LaTeX.org admin
stormy
Posts: 4
Joined: Mon Jun 14, 2010 9:55 pm

Re: Finding how much space is left on a page

Post by stormy »

That is what I was looking for. Thanks!
Post Reply