Using Tikz, placing three rectangles right above each other with dashed outline, how can I let tikz not draw the lines inbetween multiple times?
Also, the baseline of the text inside those rectangle is not always at the same height inside the box - it depends whether the text uses the cap line (like a 'b'), the descender line (like a 'q') or non (like an 'a').
MWE:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (A) [draw,rectangle,minimum width=37mm, minimum height=9mm, anchor=north, dashed] {a};
\node (B) at (A.south) [draw,rectangle,minimum width=37mm, minimum height=9mm, anchor=north, yshift=+0.4pt, dashed] {b};
\node (Q) at (B.south) [draw,rectangle,minimum width=37mm, minimum height=9mm, anchor=north, yshift=+0.4pt, dashed] {q};
\end{tikzpicture}
\end{document}

rectangleshape. Maybe you want to use therectangle splitshape? – Qrrbrbirlbel Mar 27 '23 at 14:24