0

I want to repeat a node multiple times, but displaced each time, something like:

enter image description here

However, in my case, the top node is a fitted node, that contains some other nodes. I do not know the size of the fitted node. So I dont know how big to make the nodes underneath. The nodes underneath should be blank, nothing drawn in them (unlike my example above). How can I create nodes that are the exact same size as the top fitted node?

By the way, the code to produce the pictured example was:

\begin{tikzpicture}
\foreach \i in {1,2,3} {
  \pgfmathsetmacro\exx{\i * 0.2};
  \pgfmathsetmacro\exy{\i * 0.2};
  \node [block, xshift=\exx cm, yshift=\exy cm] (inner_example) {This is some text};
}
\end{tikzpicture}

(but in my actual case, I don't want to just repeat the drawing in each of the lower nodes, since it is a complicated picture, and seems wasteful to do so.)

  • You may create a pic where you draw everything (your nodes and your fitting node), then use it into your foreach loop. Would you mind sharing the complete MWE, if you don't know how to proceed? – SebGlav Apr 12 '21 at 12:20
  • Apart from that, your question remains unclear to me. Maybe should you share a sketch of what you need. – SebGlav Apr 12 '21 at 12:28
  • 1
    Like this? https://tex.stackexchange.com/a/316544/1952 – Ignasi Apr 12 '21 at 13:46
  • @Ignasi Yes :) That's what I was looking for, right :) – Hugh Perkins Apr 13 '21 at 00:23

0 Answers0