I'm trying to create a TikZ flowchart where I need to differentiate between serial and parallel streams. Here's an example with serial to parallel:
I've managed to create a multiple stack of rectangles, but struggle to centre text and it can't be incorporated as a node shape. I could always manually draw it all, but I'm wondering whether there's an easier way to accomplish this? Particularly, is there a way to create a TikZ style with multiples overlaid rectangles that could easily be incorporated into nodes?
Here's my code, which recreates the bottom rectangle, with poorly centred text:
\newcommand{\pstack}[3]{
\draw[fill=white, minimum height=4em] #1 rectangle #2;
\draw[fill=white, minimum height=4em] #1 ++(-0.05,0.05) ++(-0.05,0.05) rectangle +#2;
\draw[fill=white, minimum height=4em, thick] #1 ++(-0.1,0.1) ++(-0.1,0.1) rectangle +#2;
\path #1 -- +#2 node[pos=0.75] {#3};
}
\begin{tikzpicture}[node distance = 2cm, auto]%[scale=.8, z={(-.707,-.3)}]
\pstack{(0,0)}{(2,1)}{some text};
\end{tikzpicture}