Skip to content

Symmetrically spread extra row height in cells adjacent to a tall multirow cell #3

@Sonja-K

Description

@Sonja-K

tabularray seems to avoid overflowing contents of tall \multirow cells by enlarging the height of the last row that the \multirow cell spans. Is there already a way to instead evenly distribute the extra row height over all rows that the \multirow cell spans or is such a feature planned?

Here is a MWE comparing the current output using tabularray as well as two mock-up versions showing such an evenly distributed additional row height:

tabularray-example3

\documentclass{article}
\usepackage{tabularray}
\usepackage{multirow}

\begin{document}

\begin{tblr}{hlines,vlines, colspec={lp{3.25cm}}}
  Column1 & Column2  \\
  Row1 & \multirow{3}{=}{Long text that needs multiple lines. Long text that needs multiple lines.  Long text that needs multiple lines.}  \\ 
  Row2 &  \\  
  Row3 &  \\ 
  Row4 &  short text  \\ 
\end{tblr}

\bigskip
\begin{tabular}{|l|p{3.25cm}|}
  \hline
  Column1 & Column2  \\ 
  \hline
  Row1 & \multirow{6}{=}{Long text that needs multiple lines. Long text that needs multiple lines. Long text that needs multiple lines.} \\
  &\\ 
  \cline{1-1}
  Row2 &  \\
  &\\
  \cline{1-1}
  Row3 &  \\
  &\\
  \hline  
  Row4 &  short text  \\
  \hline
\end{tabular}
\quad
\begin{tabular}{|l|p{3.25cm}|}
  \hline
  Column1 & Column2  \\ 
  \hline
  \multirow{2}{*}{Row1} & \multirow{6}{=}{Long text that needs multiple lines. Long text that needs multiple lines. Long text that needs multiple lines.} \\
  &\\  
  \cline{1-1}
  \multirow{2}{*}{Row2} &  \\
  &\\
  \cline{1-1}
  \multirow{2}{*}{Row3} &  \\
  &\\ 
  \hline 
  Row4 &  short text  \\ 
  \hline
\end{tabular}

\end{document} 

Some related questions/comments:

https://tex.stackexchange.com/q/581298
https://tex.stackexchange.com/q/359003
https://tex.stackexchange.com/questions/343779/multirow-cell-content-overflows#comment843635_343779

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions