0

If I use a long table with a big cell, the whole cell will be moved to the next page. I'd like instead to cut it inside the cell. How could I do that, ideally making it also compatible with footnotes?

enter image description here

My attempts: I guess it might be non-trivial on arbitrary tables, so I’m fine to start with a solution for the specific kind of table I’m showing in the MWE (2 columns, first column that adapt to the larger element, second column that span the rest and that is often significantly larger than the first table, style being a background on even rows). I was thinking that it might be possible to (ab)use enumitem where the item could be a parbox like \item[{\parbox{}}], but I don't know how to add the background color to make it work at page break, or adapt the first column width… Maybe tcolor box could help, no idea.

\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}
\parindent=0pt
\usepackage{tabularray}
\usepackage{lipsum}

\begin{document}

\DefTblrTemplate{firsthead,middlehead,lasthead}{default}{}%
\DefTblrTemplate{firstfoot,middlefoot,lastfoot}{default}{}%  
\begin{longtblr}{colspec={cX},row{odd}={blue!7!white}}
  My item                                                & My content          \\
  {See that the first column\\adapts to the larger item} & Blablabla \\
  Footnotes                                              & I'd like footnote to be displayed on the good page ideally automatically\footnote{Which is not trivial to get with tables} \\
  {Some multiline\\stuff} C                              & \lipsum[1]\\
  Split cell                                             & I would like this column to be split between the 2 pages \lipsum[2-3] \\
\end{longtblr}

\end{document}
3
  • you need to split the text in all columns to two table rows so it can break Nov 7, 2023 at 22:20
  • 1
    use a list instead of a table. Nov 7, 2023 at 22:27
  • @UlrikeFischer Thanks, what would you recommend for the background? Something like tex.stackexchange.com/questions/149269/… where each item starts a new item that restart the previous enum?
    – tobiasBora
    Nov 7, 2023 at 23:43

0

You must log in to answer this question.

Browse other questions tagged .