The multipart nodes have anchors called `<node name>.one`

, `<node name>.two east`

, etc., that allow you to reference the individual parts. The anchors for the `rectangle split`

node are shown in the section `Shapes with Multiple Text Parts`

of the pgfmanual. As percusse points out in the comment on the question, the node parts can also be referenced using `.second`

, `.third`

, etc., although this is not documented in the manual.

As a side note, for positioning your nodes in this case, I would not use a tree but rather the `positioning`

library, which introduces the syntax `right = of <node name>`

to place new nodes.

```
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning}
\begin{document}
\begin{tikzpicture}
\node[name=block, rectangle split, rectangle split parts=4, draw]
{ \textbf{Block 1}
\nodepart{second} connect to a
\nodepart{third} connect to b
\nodepart{fourth} connect to c
};
\node[name=block2, rectangle split, rectangle split parts=4, draw, right= of block]
{ \textbf{Block 2}
\nodepart{second} \Huge{a}
\nodepart{third} \Huge{b}
\nodepart{fourth} \Huge{c}
};
\draw [-latex] (block.two east) -- (block2.two west);
\draw [-latex] (block.three east) -- (block2.three west);
\draw [-latex] (block.four east) -- (block2.four west);
\end{tikzpicture}
\end{document}
```

The real trick here is how to put the outer boxes around the inner nodes.
As you may have already discovered, it's not possible to embed a `\node`

inside another `\node`

. It is also a really bad idea to embed one `tikzpicture`

inside another (which might appear to be another solution to this problem. Here's a solution that is based on Mark Everitt's answer to this question tikz: a big box with fixed width containing smaller boxes.

It uses the `shapes.multipart`

library to split the tree nodes, and the `fit`

library to put outer boxes around the tree nodes. The `positioning`

and `calc`

libraries are used to calculate the placement of the outer node text, and the `edge from parent`

path, so that although the tree is built on the inner nodes, the branches actually connect at a point that appears to be the edge of the outer nodes.

**Update:** Based on this question: How to make tikz multipart node parts have uniform size? I've added some code to make all the inner nodes (both split and single) uniform size.

```
\documentclass{article}
\usepackage{tikz-qtree}
\usetikzlibrary{fit,backgrounds,shapes.multipart,calc,positioning}
\begin{document}
\tikzset{
sibling distance=2cm,
level distance=2.5cm,
split/.style={draw,
rectangle split, rectangle split parts=2,draw,inner
sep=0pt,rectangle split horizontal,minimum size=3ex,text width=3ex,align=center,rectangle split part align=base},
boxed/.style={draw,minimum size=3ex,inner sep=0pt,align=center},
edge from parent/.style={draw,
edge from parent path={[->,thick]
(\tikzparentnode) -- ($(\tikzchildnode.north) + 25*(0pt,1pt)$) }}
}
\begin{tikzpicture}
\Tree [.\node[split] (M1) {g\nodepart{two}t};
[.\node[split] (M2) {h\nodepart{two}r};
[.\node[boxed] (M3) {o};
[.\node[boxed] (M4) {s};
[.\node[boxed] (M5) {t};
[.\node[boxed] (E1) {};]
]
]
]
[.\node[boxed] (M6) {e};
[.\node[boxed] (M7) {e};
[.\node[boxed] (M8) {n};
[.\node[boxed] (E2) {};]
]
]
]
]
[.\node[split] (M9) {a\nodepart{two}r};
[.\node[boxed] (M10) {n};
[.\node[boxed] (E3) {};]
]
[.\node[split] (M11) {e\nodepart{two}i};
[.\node[boxed] (M12) {e};
[.\node[boxed] (E4) {};]
]
[.\node[boxed] (M13) {e};
[.\node[boxed] (E5) {};]
]
]
]
]
\begin{pgfonlayer}{background}
\foreach \x in {1,...,13}{
\node (A\x) [above =5pt of M\x] {Middle};
\node[draw,red,] [fit=(M\x) (A\x) ] {};}
\foreach \x in {1,...,5}{
\node (B\x) [above =5pt of E\x] {End};
\node[draw,red,] [fit=(E\x) (B\x) ] {};}
\end{pgfonlayer}
\end{tikzpicture}
\end{document}
```

## Best Answer

UpdateNow the code is more efficient with Jake's idea.