I am trying to get what's below in order in the sense of: (a) the black text on the left (xx, yy, zz) should be vertically aligned with respect to the relevant table cell on the right; (b) there is no so much space between the left column and the right column with the boxes; (c) this is a tricky one: as you can see, in the lowest set of boxes on the right, I am trying to align D and E with B and C, but for some reason, the tikz picture gets "cropped".
I should mention I am using tabularray after finding the following answer: How to vertically-center the text of the cells?
Here is the MWE:
\documentclass{article}
\usepackage{tabularray}
\usepackage{tikz}
\begin{document}
\begin{tblr}{
colspec = {X[l,m]X[l,m]},
rowsep = 0pt,
colsep = 0pt
}
zz: & something \
yy: & \begin{tikzpicture}[cc/.style={fill=blue!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},cyellow/.style={align=center,fill=yellow!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},cgreen/.style={fill=green!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},corange/.style={fill=orange!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm}]
\path (0,0) node[cc] (A) {A} (2.3,0) node[cc] (B) {B} (4.6,0) node[cc] (C) {C};
\draw[->] (A)--(B);
\draw[->] (B)--(C);
\end{tikzpicture} \
xx & \begin{tikzpicture}[cc/.style={fill=blue!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},cyellow/.style={align=center,fill=yellow!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},cgreen/.style={align=center,fill=green!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},corange/.style={align=center,fill=orange!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm}]
\path (2.3,0) node[cyellow] (AA) {D} (4.6,0) node[cgreen] (BB) {E};
\draw[->] (AA)--(BB);
\end{tikzpicture}
\end{tblr}
\end{document}






Xstretches the column to fill a horizontal space. If you don't want that don't use it. You can usebaseline=(A.base)orbaseline=(AA.base)to vertically align the TikZ pictures correctly. – Qrrbrbirlbel Mar 03 '23 at 11:02