I'm new to LateX
and I would like to draw a complex picture which includes a couple of nodes. I have simplified my problem. My main problem is with drawing overlapping nodes. I have the following code, but I don't know how to make the overlapping that I want. Any help would be appreciated.
\documentclass[border=1pt, tikz]{standalone}
\usetikzlibrary{positioning, fit}
\begin{document}
\begin{tikzpicture}[draw=black, scale=1, transform shape
, every node/.style = {rectangle, draw=black, align=center, inner xsep=6mm, inner ysep=3mm}
]
% change default arrow style
\tikzset{very thick, ->, -latex, shorten <=0pt, shorten >=0pt}
\node[name=outer, minimum width = 4cm, minimum height= 3cm] {};
\node[name=inner, above=(2mm of outer.south)] {Inner Text};
\node[name=inner2, above=(10mm of outer.south)] {Inner Text2};
\end{tikzpicture}
\end{document}
What this code produces is like the following:
And what I expect is as the following picture shows:
Update: To describe my goal better, I would say that I need to have 4 rectangles (2 normal, 2 dashed-line rectangles). One of the dashed-line ones contain the above normal rectangle +2/3 of the other one and the second dashed-line rectangle includes the remaining 1/3 of the normal rectangle below.
I should mention that I need to use node
s, because all the boxes (rectangles) must have a caption.
Also, it is indifferent if the colors are as the picture or the rectangles are rounded.
Also, the exact place of captions is not that important to me. I just want them to be clear (which one relates to which rectangle). So, they can be centralized or left-adjusted or anything else.
Best Answer
Do you mean something like this?
You could do it entirely with nodes, but I think it is more straightforward to draw the boundaries of the outer boxes and place the texts separately in nodes without visible boundaries.