[Tex/LaTex] tikz: Anchoring to rectangle split

tikz-pgf

Is there an easy way I can anchor to the center of the second part of a rectangle split node? Here is what I am currently working on:

\documentclass[letterpaper,oneside]{report}
\usepackage{tikz}
\usetikzlibrary{shapes,shapes.multipart}
\begin{document}
\begin{tikzpicture}[node distance=5mm,>=stealth',auto]
    \tikzstyle{bucket}=      [rectangle,draw=black!50,fill=black!20,
                              minimum size=5mm,inner sep=0mm]
    \tikzstyle{listitem}=    [rectangle split,rectangle split horizontal,
                              rectangle split parts=2,
                              draw=black!50,fill=black!20,
                              inner sep=0mm,text width=5mm,
                              minimum height=4mm,rectangle split part align=center,
                              rectangle split empty part width=2mm]
    \tikzstyle{every label}= [font=\footnotesize]  

    \node[bucket] (B0) [label=above:$B$,label=left:0] {};
        \draw (B0.south west) -- (B0.north east);
    \node[bucket] (B1) [below of=B0,label=left:1] {};
    \node[listitem] (B1') [right of=B1,node distance=1.5cm] {.13 \nodepart{two}}
        edge [<-] (B1.center);
    \node[listitem](B1'') [right of=B1',node distance=1.5cm] {.16 \nodepart{two}}
        edge [<-] (B1'.two);
        \draw (B1''.two split south) -- (B1''.north east);
\end{tikzpicture}
\end{document} 

Here is what I end up with: (well, I have an image, but can't post it here…)

I would like the arrow from B1' to B1'' to start at "B1'.two center", but that anchor does not exist? How can I define it, or at least how can I use what it would be as the start point of my arrow? (See the arrow from B1 to B1' for how I want it to look).

Thanks everyone for the help!

Best Answer

That anchor indeed doesn't exist however you can cheat a little by taking the intersection of the east and south but if your linewidth is not negligible this needs a little bit more push using [xshift=-\pgflinewidth].

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart,arrows}
\begin{document}
\begin{tikzpicture}[node distance=5mm,>=stealth',auto]
    \tikzstyle{bucket}=      [rectangle,draw=black!50,fill=black!20,
                              minimum size=5mm,inner sep=0mm]
    \tikzstyle{listitem}=    [rectangle split,rectangle split horizontal,
                              rectangle split parts=2,
                              draw=black!50,fill=black!20,
                              inner sep=0mm,text width=5mm,
                              minimum height=4mm,rectangle split part align=center,
                              rectangle split empty part width=2mm]
    \tikzstyle{every label}= [font=\footnotesize]  

    \node[bucket] (B0) [label=above:$B$,label=left:0] {};
        \draw (B0.south west) -- (B0.north east);
    \node[bucket] (B1) [below of=B0,label=left:1] {};
    \node[listitem] (B1') [right of=B1,node distance=1.5cm] {.13 \nodepart{two}} 
        edge [<-] (B1.center);
    \node[listitem](B1'') [right of=B1',node distance=1.5cm] {.16 \nodepart{two}}
        edge [<-] (B1'.two south |- B1'.two east);
        \draw (B1''.two split south) -- (B1''.north east);
\end{tikzpicture}
\end{document} 

enter image description here