I am trying to create automated machine logs and I am failing because the contents for a cell of the table do not fit on one page. Is there a simple way to allow page breaks within individual cells? The page break between cells works perfectly, but cells larger than the page height make problems…
The following code illustrates the problem (text flows beyond the bottom of the page):
[MikTeX / Windows environment]
\documentclass[a4paper, 8pt]{article}
\usepackage[a4paper, left=15mm, right=15mm, top=45mm, bottom=35mm]{geometry}
\usepackage[ngerman]{babel}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{sectsty}
\usepackage{blindtext}
\usepackage{tabularray}
\begin{document}
\section{Einleitung}
\label{Einleitung}
\begin{flushleft}
Beispieltext
\newline
\begin{longtblr}[
entry=none
]{
width=\textwidth,
colspec = {X[l,t] X[l,t,70mm] X[l,t,70mm] X[l,t,14mm]},
rowhead = 1,
rowfoot = 0,
hline{2}={2pt, solid},
hline{3-Y}={1pt, solid},
vline{2-Y}={1pt, solid},
row{1} = {font=\bfseries},
}
{S1} & {S2} & {S3} & {S4} \\
{1} & {\blindtext[4]} & {\blindtext} & { - }\\
\end{longtblr}
\end{flushleft}
\end{document}
If there is no easy solution, I could change the paper size to A3, but that would not be an ideal solution.
Thank you!
Best Answer
It's possible to simulate a table in which cell would span multiple pages. As suggested, the main package would be
paracol
because in this environment paragraphs can continue on following pages. However, every row would have to be a separateparacol
environment. You can separate rows either with extra space or a rule. The limit however is you would have to give up on vertical lines. A caption can be simulated by\captionof{table}{...}
(requirescaption
).The example below combines all the above. I'd consider using
\RaggedRight
instead of\raggedright
for more balanced texts in narrow columns (requiresragged2e
package).