I'm using tabularray
to create a table cause it was supposed to be simple to configure the alignment of the cells. Especially, I want to use the vertical alignment to center the text in specific cells. It works for multirow cells (e.g., \SetCell[r=2]{m}
), but not when r=1
. Example:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularray}
\usepackage{lipsum}
\begin{document}
\begin{table}[]
\footnotesize
\centering
\caption{Test table}
\begin{tblr}{X[1,l]X[2,l]}
\hline
& \SetCell[]{c}A\\
\hline
\SetCell[r=2]{m} XX & \lipsum[1-1] \\
& \lipsum[2-2] \\
\hline
\SetCell[r=1]{m} YY & \lipsum[3-3]\\
\hline
\end{tblr}
\label{tab:test}
\end{table}
\end{document}
Generates
So clearly "XX" is being centralized (across two rows), but "YY" is not (in a single row). Omitting r=1
changes nothing (it is the default value).
How do I centralize the single-row, single-column "YY" text vertically using tabularray?
\SetCell{m}
or even better, this column specify (in your case) asX[1,l,m]
.