Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Very Wide Tables in LaTeX

Tags:

latex

Is there a way to have a table in LaTeX that spans multiple pages width-wise, rather than length-wise? As far as I can tell, both longtable and supertabular will break tables over multiple pages, but only by breaking between rows and I need to break between columns. Even better would be if it were possible to have a few columns repeated at on each page.

like image 960
hoyland Avatar asked Sep 10 '10 00:09

hoyland


1 Answers

I am using this not so nice and manually configured code to split a too wide tabular:

\usepackage{tikz}

\newsavebox{\boxFinal}
\begin{lrbox}{\boxFinal}
  \scalebox{0.6}{
  \begin{tabular}{...}
...
  \end{tabular}
  }
\end{lrbox}

\begin{table}[htb]
  \centering
  \begin{tikzpicture}
    \clip (0,-\dp\boxFinal) rectangle (0.5\wd\boxFinal,\ht\boxFinal);
    \pgftext[left,base]{\usebox{\boxFinal}};
  \end{tikzpicture}
  \label{table_test1}\caption{Part 1 of 2.}
\end{table}

\begin{table}[htb]
  \centering
  \begin{tikzpicture}
    \clip (0.5\wd\boxFinal,-\dp\boxFinal) rectangle
      (\wd\boxFinal,\ht\boxFinal); \pgftext[left,base]{\usebox{\boxFinal}};
  \end{tikzpicture}
  \label{table_test2}\caption{Part 2 of 2.}
\end{table}

There is usually a need to manually correct split offsets. You can do this by adding or subtracting from 0.5\wd\boxFinal value.

The idea was taken from http://www.latex-community.org/forum/viewtopic.php?f=5&t=2867

like image 188
gw0 Avatar answered Nov 07 '22 18:11

gw0