Closed Aljumaily closed 10 months ago
Well, the (non-spanning, see https://github.com/lvjr/tabularray/issues/434#issuecomment-1686778391) cells are still vertically centered. It's just the \rotatebox
(from graphicx
package that rotating
loads) that made the the baseline height of \rotatedbox{90}{Some text}
at its bottom, not half-height.
Setting rotation origin to the center (of box to be rotated) solves the problem. See user manual Packages in the ‘graphics’ bundle (2021-03-05, can be opened by texdoc graphicx
or texdoc grfguide
), sec. 4.2 "Rotation" for more info about key-values that \rotatebox
accepts as optional argument.
\documentclass[border=1cm]{standalone}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{hlines, vlines, cell{1}{2-Z}={8em, halign=c, valign=m, azure9}}
\rotatebox[origin=c]{90}{Some text} & Alpha & Gamma & Delta \\
\end{tblr}
\end{document}
The following example is expected to centre the text vertically. However, since
\rotatebox{...}{...}
is used, the text is aligned withb
alignment.