## LaTeX forum ⇒ General ⇒ table spanning two pages in portrait format

LaTeX specific issues not fitting into one of the other forums of this category.
greengrass
Posts: 12
Joined: Sun Oct 26, 2008 1:22 am

### table spanning two pages in portrait format

Is it possible to have a table span 2 pages in portrait format? i.e. if I have a table with 10 columns, can I have 5 columns on the left hand page and 5 columns on the right hand page, in a continuous fashion so that their row heights would match up?
Last edited by greengrass on Mon Oct 27, 2008 1:12 am, edited 1 time in total.

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
Have a look at the longtable package.

Best regards
Thorsten¹
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

greengrass
Posts: 12
Joined: Sun Oct 26, 2008 1:22 am
I am actually using the longtable package, but I don't think it allows for a column-wise split across pages (I'll be really happy if it actually does as that's exactly what I need!!) As I understand, it allows a row-wise split, e.g. a table of 15 rows can have 10 rows on one page and the remaining 5 rows on the next, in either landscape or portrait.

Juanjo
Posts: 656
Joined: Sat Jan 27, 2007 12:46 am
I've had an idea that perhaps may work. It is not an automatic, nor elegant solution, but, well, see if it may help. The idea basically consists in storing the whole table in a box and then printing it two times, cropping, in order, the right and the left parts with the help of Tikz/pgf:
\documentclass{article} \usepackage{booktabs}\usepackage{tikz}\usepackage{caption} \begin{document} % New box register where the whole table will be stored\newsavebox{\MyBox} % Store the table\begin{lrbox}{\MyBox}\Large\begin{tabular}{ccccc}    \toprule    AAAAAAAAAA & BBBBBBBBBB & CCCCCCCCCC & DDDDDDDDDD & EEEEEEEEEE \\    aaaaaaaaaa & bbbbbbbbbb & cccccccccc & dddddddddd & eeeeeeeeee \\    AAAAAAAAAA & BBBBBBBBBB & CCCCCCCCCC & DDDDDDDDDD & EEEEEEEEEE \\    aaaaaaaaaa & bbbbbbbbbb & cccccccccc & dddddddddd & eeeeeeeeee \\    \midrule    AAAAAAAAAA & BBBBBBBBBB & CCCCCCCCCC & DDDDDDDDDD & EEEEEEEEEE \\    aaaaaaaaaa & bbbbbbbbbb & cccccccccc & dddddddddd & eeeeeeeeee \\    AAAAAAAAAA & BBBBBBBBBB & CCCCCCCCCC & DDDDDDDDDD & EEEEEEEEEE \\    aaaaaaaaaa & bbbbbbbbbb & cccccccccc & dddddddddd & eeeeeeeeee \\    \midrule    AAAAAAAAAA & BBBBBBBBBB & CCCCCCCCCC & DDDDDDDDDD & EEEEEEEEEE \\    aaaaaaaaaa & bbbbbbbbbb & cccccccccc & dddddddddd & eeeeeeeeee \\    AAAAAAAAAA & BBBBBBBBBB & CCCCCCCCCC & DDDDDDDDDD & EEEEEEEEEE \\    aaaaaaaaaa & bbbbbbbbbb & cccccccccc & dddddddddd & eeeeeeeeee \\    \bottomrule\end{tabular}\end{lrbox} % This shows the complete table, scaled down\scalebox{0.6}{\usebox{\MyBox}} % Coefficient between 0 and 1 which determines the ratio between% the left and  right parts of the table\newcommand{\Coefficient}{0.6} % Left part\begin{table}[p]    \centering    \begin{tikzpicture}       \clip (0,-\dp\MyBox) rectangle (\Coefficient\wd\MyBox,\ht\MyBox);       \pgftext[left,base]{\usebox{\MyBox}};    \end{tikzpicture}    \caption{An example of wide table}\end{table} % Right part\begin{table}    \ContinuedFloat    \centering    \begin{tikzpicture}       \clip (\Coefficient\wd\MyBox,-\dp\MyBox) rectangle (\wd\MyBox,\ht\MyBox);       \pgftext[left,base]{\usebox{\MyBox}};    \end{tikzpicture}    \caption{An example of wide table (cont.)}\end{table} \end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.