I would like to generate a multi-column table that wraps within columns of the document, and splits across pages. There are a couple of similar questions here

How do I create a really long table in a two column layout?

Two-column longtable or tabular

But neither seem really to resolve the problem.


The table/list will be generated with a loop, with an arbitrary number of rows. It should split over pages. It should be usable in a multicols environment.

The closest solution seems to be to use a list instead of a table, but this has the problem of lining up the top rows when the list is wrapped in a multicols environment. Below is a sample document:

\def\stnum{30} % number of items


\item[Item \#]
\item \begin{tabular}{CC}T & F\end{tabular}

The main problem is how to line up the rows properly (as if this were a table.) A secondary problem would be to have the equivalent of a repeated column header when the columns wrap.

Here's a partial picture of the output of the document above:

output of code

  • I don't understand what "line up the rows properly " means, or how your example fails to do so.
    – lockstep
    Commented Apr 2, 2011 at 21:19
  • If this were a table, then the 19 (the top of the second column) would line up with the 1 (the top of the first column.) If I take out the "Item #" line, that will happen for the first page of the example, but is not guranteed to happen in subsequent pages. Is that clearer?
    – Alan Munn
    Commented Apr 2, 2011 at 21:22
  • "Is not guaranteed" -- do you mean that a new multicol column could start with a grey-colored rule?
    – lockstep
    Commented Apr 2, 2011 at 21:33
  • @lockstep Yes, exactly. But that just gave me an idea for a solution.
    – Alan Munn
    Commented Apr 2, 2011 at 21:39

2 Answers 2


It's possible to trick supertabular to work inside a multicols environment by redefining \newpage to be \columnbreak in the first column and \newpage in the second. I also needed to stick a height 0, width \linewidth rule at the bottom of the first column. Strange things happen without it.

        \advance\n by1
                \hfill T\hfill\hfill F\hfill\hskip0pt\endgraf
                \hrule height3ex
                \hrule width\linewidth height0pt
\tablehead{Item \#&\\}

I'm not actually sure that this is the best way to generate the body, but it works. enter image description here

  • Very nice. Thanks. Deciding on who gets the bounty is going to be tough!
    – Alan Munn
    Commented Apr 3, 2011 at 0:31
  • Playing around with this, it seems that the table is shorter than it needs to be (by about 2 rows) This can be fixed by adding \shrinkheight{-.3em} to the table body command.
    – Alan Munn
    Commented Apr 3, 2011 at 2:31
  • 1
    I've decided to accept this answer over lockstep's because it works using a tabular environment, which allows for more flexibility in formatting columns, and also allows a repeatable header row. Thanks for a great solution!
    – Alan Munn
    Commented Apr 7, 2011 at 1:04
  • 1
    @Alan: No problem. This is actually not the first time I've hacked on supertabular. Someone on irc wanted something that I cannot quite recall at the moment--maybe extending into the outside margin on twosided documents--a month or so back. I've never actually used it myself in a document (I've never needed long tables), but it seems pretty good. I hope Johannes and Theo continue working on it, providing built in support for things like multicols. The bits of the code I've had to look at seem pretty well written and easy enough to follow.
    – TH.
    Commented Apr 7, 2011 at 3:33
  • Very nice. A minor problem: If you set \columnseprule you notice that the last column has a height of \textheight. Is there any way around that? Commented Oct 25, 2011 at 16:48

What follows is a very crude solution to your main problem (lining up the rows properly): Use a tabbing environment. IIRC, there's no easy way to center the contents of a tabbing "cell", but column/page breaks inside a tabbing environment are permitted. The trick is to use \\* to forbid breaks after certain rows.




\def\stnum{30} % number of items



\rule{0.7in}{1pt} \= \rule{0.7in}{1pt} \= \rule{0.7in}{1pt} \kill
  \themytabbing  \> T \> F \\* % "\\" would produce an incorrect column break
  \> {\color{black!20}\rule{1.4in}{2.8ex}} \\

  • Thanks! I've never before found a use for the tabbing environment. As for centering the T's and F's, that can be done by embedding them in a tabular environment: \begin{tabular}{>{\centering}p{.5in}}T\end{tabular} will do the trick. Since there's a bounty, I'll wait a few days to see if any other solutions show up, but this is a pretty good solution to begin with.
    – Alan Munn
    Commented Apr 3, 2011 at 0:26
  • Thanks for your solution, lockstep. I've decided to accept TH's answer, since it allows for more flexibility in the formatting of the table, and also allows a header. But the \\* was a very clever way of solving the problem.
    – Alan Munn
    Commented Apr 7, 2011 at 1:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .