How do I draw a B+ tree with tikz in latex with more than 4 Key value pair in a node

I'm using

child {node {1 \nodepart{two} 2 \nodepart{three} 3 \nodepart{four} 4 \nodepart{five} 5 \nodepart{six} 7}}


to create a node in btree. However it seems that \nodepart{five} and \nodepart{six} get ignored and the rest gets cut off (KVP 5 and 6 do not show up).

How do I draw more than 4 KVPs?

-
Can you turn your code into a complete compilable example? –  Alan Munn Jun 15 '11 at 0:57

When using multi-part rectangular nodes with the shapes.multipart library, the shape can be split into a maximum of twenty parts. However, only four boxes are allocated by default.

To use the rectangle split shape with more than four boxes, the extra boxes must be allocated first, and this can be done using the key rectangle split parts=<number>.

A little example: on the left the wrong result (only the default four parts are shown and the last two are lost); on the right, the correct output (after using rectangle split parts=6):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}

\begin{document}

\begin{tikzpicture}
\node[draw,rectangle split]
at (0,0)
{a\nodepart{two}b\nodepart{three}c\nodepart{four}d\nodepart{five}e\nodepart{six}f};
\node[draw,rectangle split,rectangle split parts=6]
at (2,0)
{a\nodepart{two}b\nodepart{three}c\nodepart{four}d\nodepart{five}e\nodepart{six}f};
\end{tikzpicture}

\end{document}


-
Your wording suggests the example is going to demonstrate rectangle split allocate boxes, but there's no mention of that key in the example. –  Rob Kennedy Apr 17 at 16:33
@RobKennedy You're right. I've corrected the example. Thnaks. –  Gonzalo Medina Apr 17 at 18:48