General ⇒ table spanning two pages in portrait format
-
- Posts: 12
- Joined: Sun Oct 26, 2008 1:22 am
table spanning two pages in portrait format
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
table spanning two pages in portrait format
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 12
- Joined: Sun Oct 26, 2008 1:22 am
Re: table spanning two pages in protrait format
table spanning two pages in portrait format
Code: Select all
\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}