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 generating a tex file that has a variable length table for each quarter of the year. I would like to keep the tables centered under one another unless there is not enough room for the table, in which case I would like to start another page. I am using the letter doc style but when I get a table that won't fit on the page is places it on the right had side of the columns on the same page. I would like to get it on a new page instead. I have tried using minipage but without success.

share|improve this question
Can you provide a minimal working example of the problem? – frabjous Aug 19 '11 at 3:01
Sounds like you're using the letter documentclass with a two-column page layout. Can you confirm this impression? – Mico Aug 23 '11 at 2:18
Maybe that's the problem. How do you know I'm using a two-column layout and how do I make it a one-column layout? – Robert Surtees Aug 23 '11 at 13:47
Here is a xelatex tex file that shows what I'm trying to do. I would also like the pages to not be vertically centered but have a ragged bottom. I'm not a latex expert even though I have read quite a few books and this example is basically the first time I have ventured into creating macros and counters. Any other suggestions would be very helpful. – Robert Surtees Aug 23 '11 at 13:53
The example is too long to include but example.tex should be accessable from public.me.com/rsurtees – Robert Surtees Aug 23 '11 at 14:04

Your 7 KB example.tex is not what we understand as a minimal example (and public.me.com didn't like my browser).

It is full of custom macro definitions, which one has to understand to solve your problem.

After quite some reading (and jumping around in your file), I think I found the origin of your problem:

\newcommand{\anotherhead}{ \\ \hline \hline


This is called after the summary lines, if there were enough lines before the last header line. \tablebot and \tabletop are defined like this (line-break added by me):

                       \begin{tabular}{||c|r||c|c|r||r||} \hline\hline}

So, in effect your \anotherhead creates this:


There is no space between them, which means, those two minipages will be put on the same horizontal line. Changing the \anotherhead command to this solves the problem:

\newcommand{\anotherhead}{ \\ \hline \hline


(This inserts a space at this point, leading to a possible line break.)

share|improve this answer
+1, and congrats for delving into that file! – lockstep Sep 3 '11 at 23:36
Thanks for your help. I have been using Tex/Latex for 20+ years, but this is the first time I have ventured into creating commands. Your answer solved the problem I was having. – Robert Surtees Sep 4 '11 at 20:53

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.