I basically have the exact same problem as this question, only for multi-part nodes: I have a node that consists of 3 parts, each of which contains text. I want to have the text aligned by its baseline. I tried to achive this using the text height
and text depth
, which works fine for ordinary nodes, but not for multi-part ones. As you can see in the image below, only the first part of the node receives the correct alignment I want to achieve, the other two get "push up" by characters that extend below the baseline.
This is my latex-code:
\documentclass[tikz, 11pt,landscape]{article}
\usepackage[default,osfigures,scale=0.95]{opensans}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tgbonum}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\usepackage[a3paper]{geometry}
\begin{document}
\thispagestyle{empty}
\tikzset{normal/.style = {rectangle split, rectangle split horizontal, rectangle split parts=3, very thick, draw=black, minimum height=0.6cm,text height=1.5ex, text depth=0.25ex}}
\begin{tikzpicture}[remember picture, overlay]
\node[normal] at (current page.center) {\nodepart{one} ag \nodepart{two} ag \nodepart{three} ag};
\end{tikzpicture}
\end{document}
I found another post about someone having the same problem with transparency only beeing applied to the first part, but its solution didn't work for me. I do not care about multi-line text and actually only really care about the alignment in the second part of the node, I just included the other two texts for demonstration. It seems like whatever I try, it only gets applied to the first part.
Edit:
Using my screenshot as an example: I want the 2nd and 3rd box to be aligned to the height of the 1st one. I do NOT want to align the 1st box to the height of the 2nd and 3rd one, since that is quite high and looks strange if I have a text without characters that go below the baseline. The spacing will look very uneven.
tikz
libraryshapes.multipart
(or at least missed feature). – Zarko Feb 18 at 20:33