
Eu tenho várias tabelas largas que preciso dividir em várias páginas de um livro. A ideia é que a página esquerda mostre a metade esquerda da tabela e a página direita a metade direita.
Por exemplo algo assim
Encontrei o pacote hvfloat, que funciona para 1 tabela. Mas se eu fizer mais de 1 tabela ele simplesmente colocará várias cópias da mesma tabela (a última a ser armazenada no HVObox) no documento.
Como faço para criar várias tabelas como esta no mesmo documento?
Responder1
São ambientes flutuantes, por isso só funcionará se você tiver texto suficiente entre essas tabulares de dupla face (Caixas). Caso contrário, não é possível posicionar o objeto de forma correta. Um exemplo prático:
\documentclass[12pt,twoside]{article}
\usepackage{geometry}
\usepackage{hvfloat,booktabs,blindtext}
\renewcommand\thepage{\Huge\arabic{page}}
\begin{document}
\Blindtext
\savebox\hvOBox{%
\begin{tabular}{l*{18}r} \toprule
& \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976}& \textbf{1977} & \textbf{1978} &
\textbf{1979} & \textbf{1980} & \textbf{1981} & \textbf{1982} & \ textbf{1983} & \textbf{1984} & \textbf{1985}&
\textbf{1986} & \textbf{1987} & \textbf{1988} & \textbf{1989} \\\midrule\addlinespace[3pt]
Zeile1&1&3&1&1&1&0&1&1&0&0&0&0&20&0&2&2&2&1\\\addlinespace[3pt]
Zeile2&1&1&3&1&0&0&0&0&0&0&2&1&3&4&4&6&4&2\\\addlinespace[3pt]
Zeile3&2&1&2&1&0&0&0&0&0&0&0&1&5&3&1&7&7&3\\\addlinespace[3pt]
Zeile4&1&0&5&1&2&0&0&0&0&2&1&0&1&0&3&7&2&1\\\addlinespace[3pt]
Zeile6&2&1&1&0&0&0&0&0&0&1&2&0&5&2&2&5&4&2\\\addlinespace[3pt]
Zeile5&0&0&4&2&1&2&2&1&0&0&0&1&1&0&2&5&4&3\\\addlinespace[3pt]
Zeile8&0&1&1&0&0&0&1&1&0&3&2&1&2&1&3&5&3&4\\\addlinespace[3pt]
Zeile9&0&0&0&0&0&1&2&1&0&0&0&0&4&2&1&4&5&2\\\addlinespace[3pt]
Zeile10&0&1&3&0&1&0&1&0&0&1&1&0&1&1&1&4&4&1\\\addlinespace[3pt]
Zeile11&0&2&2&1&1&0&1&0&0&0&0&2&6&1&0&2&1&1\\\addlinespace[3pt]
Zeile12&2&0&2&4&1&0&4&0&0&0&0&0&0&0&0&1&0&3\\\addlinespace[3pt]
Lärm &2&3&0&0&0&0&0&0&0&0&1&0&2&0&0&2&2&2\\\addlinespace[3pt]
Zeile13&0&1&0&0&1&0&3&0&0&0&0&0&2&0&1&3&0&2\\\addlinespace[3pt]
Zeile14&0&1&0&0&0&0&0&0&0&0&0&0&3&3&2&1&1&0\\\addlinespace[3pt]
Zeile15&0&0&0&0&0&0&0&0&0&1&0&0&4&0&0&3&1&1\\\addlinespace[3pt]
Zeile16&0&0&0&0&0&1&0&0&0&0&0&0&0&0&3&5&0&1\\\addlinespace[3pt]\midrule
Artikelgesamt&2&6&13&8&4&3&5&4&0&6&3&5&23&10&8&15&13&1\\ \bottomrule
\end{tabular}}
\hvFloat[doublePage,useOBox,capPos=right,capVPos=top,floatCapSep=12pt]%
{table}%
{}%%%%%%%%%%%%%%
[A doublepage tabular with a caption on the right side of the
right part.]%
{A caption for a double-sided tabular that will be placed on the right side of the right-hand part of the illustration.}%
{tab:doublePage0}
\Blindtext[8]
\savebox\hvOBox{%
\begin{tabular}{l*{18}r} \toprule
& \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976}& \textbf{1977} & \textbf{1978} &
\textbf{1979} & \textbf{1980} & \textbf{1981} & \textbf{1982} & \ textbf{1983} & \textbf{1984} & \textbf{1985}&
\textbf{1986} & \textbf{1987} & \textbf{1988} & \textbf{1989} \\\midrule\addlinespace[3pt]
Zeile1&1&3&1&1&1&0&1&1&0&0&0&0&20&0&2&2&2&1\\\addlinespace[3pt]
Zeile16&0&0&0&0&0&1&0&0&0&0&0&0&0&0&3&5&0&1\\\addlinespace[3pt]\ midrule
Artikelgesamt&2&6&13&8&4&3&5&4&0&6&3&5&23&10&8&15&13&1\\ \bottomrule
\end{tabular}}%%%%%%%%%%%%%%
\hvFloat[doublePage,useOBox,capPos=right,capVPos=top,floatCapSep=12pt]%
{table}%
{}
[A doublepage tabular with a caption on the right side of the right part.]%
{A caption for a double-sided tabular that will be placed on the right side of the right-hand part of the illustration.}%
{tab:doublePage1}
\Blindtext
\end{document}
Altere a linha \Blindtext[8]
entre as duas tabulares para \Blindtext[4]
e falhará, muito menos texto entre os objetos.
Uma solução alternativa é colocardoistabulares na caixa ou usar ambientes não flutuantes e colocar os objetos manualmente nas páginas opostas.