Replies: 2 comments
-
Maybe this doesn't work in general cases. \documentclass{article}
\usepackage{tabularray}
\usepackage{xcolor}
% height of "normal" cells
% @row-height = x + \abovesep + \ht\strutbox + \dp\strutbox + \belowsep + x
% x = .5 * (@row-height - ...)
% required height of the first line in an h-aligned hspan cell
% x + \abovesep + \ht\strutbox
% = .5 * (@row-height - ...) + \abovesep + \ht\strutbox
% = .5 * (@row-height + \abovesep + \ht\strutbox - \belowsep - \dp\strutbox)
\ExplSyntaxOn
\makeatletter
\def\yShiftForHspanCell{
\rule{0pt}{
.5\dimexpr
% height of current row
\__tblr_data_item:nen { row } { \the\c@rownum } { @row-height }
+ \abovesep + \ht\strutbox - \belowsep - \dp\strutbox
}
}
\makeatother
\ExplSyntaxOff
\begin{document}
\begin{tblr}{hlines, vlines, colspec={*{6}{X}}, rows={30pt}}
Alpha & Beta & Gamma & Delta & Epsilon & Zeta \\
\SetCell[r=2]{h} Eta\yShiftForHspanCell
& Theta & Iota\llap{\textcolor{blue}{\rule{5cm}{.2pt}}}
& Kappa & Lambda & \SetCell[r=2]{m} Mu \\
& Xi & Omicron & Pi & Rho &
\end{tblr}
\end{document} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for your help and the solution! So in this special case a low-level solution is required, and it's not like I missed some high-level setting... Btw, a huge thank you for this awesome package that makes all other piece-meal packages for tables redundant (at least for me)!!! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Starting with the example on page 20 of the manual, I set a specific row height:
But then I am not able to place Eta at the same vertical position as Theta and the rest of that row:
Is there a way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions