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.

I have a split rectangle node, and I would like either for the entire node to be a certain height, with the splits spread equally, or each nodepart to be a certain height. I have the following code, in which only the first part is stretched, how can I apply this to all nodeparts?

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}

\begin{tikzpicture}[auto,
    rect/.style={
        rectangle split,
        rectangle split parts=4,
        draw=black,
        rounded corners, 
        text width=7cm,
        text height=3cm
    }]  


    % Split Rectangle
    \node [rect] {
        First Item
        \nodepart{two} Second Item
        \nodepart{three} $\vdots$
        \nodepart{four}  Last Item
        };

\end{tikzpicture}
\end{document}

enter image description here

share|improve this question
3  
From the manual page 450, When split vertically, the rectangle split will observe any minimum width requirements but any minimum height will be ignored. But you can use inner sep, not so useful though. If necessary, switch to matrix node. –  percusse May 3 '12 at 17:56
add comment

1 Answer

up vote 6 down vote accepted
\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
  \def\mystrut{\vrule height 1.5cm depth 1.5cm width 0pt} 

 \begin{document}    

   \begin{tikzpicture}[auto,
    rect/.style={
        rectangle split,
        rectangle split parts=4,
        draw=black,
        rounded corners
    }]  


    % Split Rectangle
    \node [rect] {
      \mystrut  First Item
        \nodepart{two}\mystrut Second Item
        \nodepart{three} $\vdots$
        \nodepart{four} \mystrut Last Item
        };

\end{tikzpicture}
\end{document}    

enter image description here

share|improve this answer
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.