Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
    
As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again until you get more rep points. –  percusse Aug 29 '12 at 15:37
add comment

1 Answer 1

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

share|improve this answer
    
Thanks, percusse! That worked perfectly. –  Ken P Aug 29 '12 at 16:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.