Suppose there is a table too wide to fit on a page. What you can do in this case is to print the table on multiple pages, such that it can be seen side-by-side, by using multiple table environments and separating these with page breaks.
Given these column definitions:
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
Table code for a 2-page wide table is akin to:
\begin{longtable}{|L{80pt}|L{80pt}|}
\hline
header 1 & header 2 \\
\hline
value 11 this is a much longer value which causes issues by overflowing into another line and misaligning this table with the other table & value 12 \\
value 21 & value 22 \\
\hline
\end{longtable}
\pagebreak
\begin{longtable}{|L{80pt}|L{80pt}|}
\hline
header 3 & header 4 \\
\hline
value 13 & value 14 \\
value 23 & value 24 \\
\hline
\end{longtable}
Note that the values are variable. In essence, 'any reasonably long text' could be inside each cell.
This works and aligns as long as within the set of all the values there are no values which span multiple lines, e.g. no cells with line breaks. However, as soon as there are cells with line breaks, these line breaks will only appear in their respective table.
How does one go about aligning the tables? E.g. in table i, column j set its column height to be at least the maximum of the column heights of all the tables for column j.
L
column nor show any cells with a line break. Do you mean forced line breaks (from\newline
?) or automatic line breaks from long text? Your example should be complete from\documentclass
to\end{docuemnt}
and demonstrate the issue.longtable
if you are ending each table within one page and forcing a page break outside the table?