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

Making a complicated table is a pain in LaTeX. I am using a longtable in my TeX and need to change the maximum number of rows in a page. Is there any way to set the maximum number of rows in a page?

share|improve this question
The number of rows in your table will depend on your paper size, font size and other things such as text or headings on that page. If you need to get more rows, try to enlage the page with \enlargethispage{<length>} (e.g. 2\baselineskip) or (not recommended) use the geometry package to change your page layout for the longtable pages. This will make your document slightly inconsistent, but might be alight in an appendix or so. – Martin H Jun 2 '11 at 16:43

It is true that the number of rows in your table depend on various parameters, such as the height of the page and of each row. However, you can always force a pace break at a given line by using \newpage or \pagebreak. You will have to add a \newpage command for each page you want to make by hand, which is OK if your table is not too long.

Alternatively, you can also make TeX insert a \newpage for you every n-th lines, add the following lines before your table:

  \global\advance\mylineno by 1

and replace every \\ in the table lines with a \mynewline. Replace the number 20 above with the number of lines you want in your table.

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.