I am attempting to vertically centre a multiline cell, so far without success. In the following diagram A is fine, but B/C seem to be pushed to the top, rather than placed around the middle of the box. Also the spacing between them is larger than I would prefer:
The main table definition is:
\begin{longtblr}[theme = fancy, entry=none,label=none]{
colspec = {|l|l|Q[h,l]|},
stretch = 0,
columns = {colsep=1mm},
column{1} = {leftsep=0pt},
column{3} = {rightsep=0pt},
}
and the multicell:
\inst{B} &
\R{1},\DSXB{2} &
\SetCell[r=2]{m} \Wrap{\RSFullFull{\add}} \\*
\inst{C} &
\R{1},\DLXB{2} &
-- \\ \hline
(Horizontal and vertical lines added just to see the issue more clearly: will be removed)
Full MWE:
\documentclass[8pt]{extarticle}
\usepackage[papersize={105mm,297mm}, margin=5mm]{geometry}
\pagenumbering{gobble}
\usepackage[T1]{fontenc}
\usepackage{tgadventor}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[english]{babel}
\usepackage{ragged2e}
\usepackage[x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes.misc, shapes,arrows,chains, arrows.meta, calc, decorations.pathmorphing}
\usepackage{tabularray}
%%%%% tabularray settings
\NewTblrTheme{fancy}{
}
\DefTblrTemplate{contfoot}{default}{}
\DefTblrTemplate{conthead}{default}{}
\DefTblrTemplate{caption-tag}{default}{}
\DefTblrTemplate{caption-sep}{default}{}
\DefTblrTemplate{caption-text}{default}{}
\DefTblrTemplate{conthead-text}{default}{}
\tikzset{
Register/.style={
rectangle,
minimum height = 1cm,
minimum width = 8cm,
},
point/.style={circle, inner sep=0pt, minimum size=2pt, fill=red},
sizenode/.style = {font=\fontsize{22}{22}\selectfont\bfseries\sffamily, white},
node distance = 5mm and 10mm,
>=Kite,
every node/.style={transform shape},
}
\newcommand\RSFullFull[2][]{
\node (x) [Register] {};
\fill [black!20] (x.south west) +(0,0) rectangle +(20,5);
}
\def\add{\raisebox{-1.5em}{{\fontsize{20}{20}\selectfont{+}}}}
\newcommand\lowersub[1]{\raisebox{-0.1ex}{\textsubscript{#1}}}
\newcommand\raisesup[1]{\raisebox{0.1ex}{\textsuperscript{#1}}}
\newcommand\subsup[2]{\rlap{\lowersub{#1}}\raisesup{#2}}
\newcommand{\R}[1]{R\textsubscript{#1}}
\newcommand{\RE}[1]{R\subsup{#1}{E}}
\newcommand{\I}[1]{I\textsubscript{#1}}
\newcommand{\D}[1]{D\textsubscript{#1}}
\newcommand{\DS}[1]{D\subsup{#1}{12}}
\newcommand{\DL}[1]{D\subsup{#1}{20}}
\newcommand{\X}[1]{X\textsubscript{#1}}
\newcommand{\B}[1]{B\textsubscript{#1}}
\newcommand{\inst}[1]{\textbf{#1}}
\newcommand{\DSB}[1]{\DS{#1}(\B{#1})}
\newcommand{\DLB}[1]{\DL{#1}(\B{#1})}
\newcommand{\DSXB}[1]{\DS{#1}(\X{#1},\B{#1})}
\newcommand{\DLXB}[1]{\DL{#1}(\X{#1},\B{#1})}
\newcommand{\DXB}[1]{\D{#1}(\X{#1},\B{#1})}
\newcommand\Wrap[1]{
\scalebox{0.3}{
\begin{tikzpicture}[ scale=1.0, baseline=(current bounding box.center)] % .north
#1
\useasboundingbox
([shift={(0mm,2mm)}]current bounding box.north east)
rectangle
([shift={(0mm,-2mm)}]current bounding box.south west);
\end{tikzpicture}
}
}
\begin{document}
\begin{longtblr}[theme = fancy, entry=none,label=none]{
colspec = {|l|l|Q[h,l]|},
stretch = 0,
columns = {colsep=1mm},
column{1} = {leftsep=0pt},
column{3} = {rightsep=0pt},
}
\hline
\inst{A} &
R\textsubscript{1},R\textsubscript{2} &
\Wrap{\RSFullFull{\add}} \\ \hline
\inst{B} &
\R{1},\DSXB{2} &
\SetCell[r=2]{m} \Wrap{\RSFullFull{\add}} \\*
\inst{C} &
\R{1},\DLXB{2} &
-- \\ \hline
\end{longtblr}
\end{document}
For @Zarko: