tags:

views:

43

answers:

1

This is the code I have:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\tikz \node[rectangle split, rectangle split parts=2]
  {first\nodepart{second}second\linebreak{}third};
\end{document}

Second and third lines are glued to each other. When I'm adding text width=5em to the style of this node — everything works fine. How can I make this \linebreak work, without explicit specification of the node width? Thanks.

+1  A: 

There following example works here:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\tikz \node[rectangle split,draw,double]
  {first
    \nodepart{second}
    second
    \nodepart{third}
 third
};
\end{document}

With \nodepart you don't need a linebreak.

qbi