1

I'm working with the package qtree and I'd loved to make more levels. My code is:

\begin{frame}[t]{\secname}
    \Tree [.{L} [.{L1} {\textit{Lag}: \\ ${\textstyle x=y$ \\ \small{C}}  ]
                [.{L2} {\textit{Lag}: \\  ${\textstyle x=z$} ] ]                                                                                                            

\end{frame} 

I would like to have that \small{C} is on e new level under {\textit{Lag}: \\ ${\textstyle x=y$ but here it is in the same level (I've worked with \\ to put it on a new line)

I would also want more vspace between the levels, but I can't find how I must do that.

Can somebody help me?

1 Answer 1

1

Here's one possibility using the enhanced tikz-qtree package:

\documentclass{beamer}
\usepackage{tikz-qtree}

\begin{document}

\begin{frame}
\centering
\begin{tikzpicture}[
every tree node/.style={align=center, anchor=north},
level distance=50pt]
\Tree [. L [.L1 [.{\textit{Lag:}\\ $x=z$} {\small C} ] ]  
                [.L2 {\textit{Lag}:\\ $x=z$} ] ]                                                                                                            
\end{tikzpicture}
\end{frame} 

\end{document}

enter image description here

Using level distance=<length> you can control the vertical distance between the anchors of a parent and its children.

Not related to the problem, but \small is a font switch not a command with arguments; also there was no need to use \textstyle in your example code.

1
  • @Silke You're welcome! I'm glad I could help. If you consider the answer solved your problem, please consider marking it as accepted by clicking the checkmark to the left of the answer. In case of doubt, please see How do you accept an answer?. May 9, 2013 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .