Tell me more ×
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.

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?

share|improve this question
3  
Can you turn your code into a complete compilable example? – Alan Munn Jun 15 '11 at 0:57

1 Answer

up vote 4 down vote accepted

When using multi-part 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 manually, and this can be done using the key rectangle split allocate boxes=<number>. A little example (a modification of an example in Section 48.6 Shapes with Multiple Text Parts of the pgfmanual):

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

\begin{document} 

\begin{tikzpicture}[my shape/.style={
rectangle split, rectangle split parts=#1, draw, anchor=center}]
\node [my shape=5] at (0,1)
{a\nodepart{two}b\nodepart{three}c\nodepart{four}d\nodepart{five}e};
\node [my shape=10, rectangle split horizontal] at (3,2)
{1\nodepart{two}2\nodepart{three}3\nodepart{four}4\nodepart{five}5
  \nodepart{six}6\nodepart{seven}7\nodepart{eight}8\nodepart{nine}9\nodepart{ten}10};
\end{tikzpicture}

\end{document}

share|improve this answer

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.