I am trying to convert my tree-dvips
trees into something that is compatible with xelatex. I had a look at the tikz-qtree
package, but it seems to be impossible to set complex nodes.
In the old qtree
package there was a low level syntax that I could use (leaf, branch, ...), but this seems to be gone. In tree-dvips
I just put the complex stuff inside of \node{...}
, but how do I do this with tikz-qtree
?
\documentclass{scrbook}
\usepackage{tikz-qtree}
\begin{document}
This is some text and the figure should be the size of the text not larger and not smaller.
\begin{figure}[h]
\begin{tikzpicture}
\Tree[.{V[\begin{tabular}[t]{@{}l@{}}
spr eliste,\\
comps eliste ]
\end{tabular}} [.NP dogs ] [.V sleep] ]
\end{tikzpicture}
\end{figure}
This is some text and the figure should be the size of the text not larger and not smaller.
\end{document}
Edit: Tried to do without the tabular environment, but adding the left/north option gives me a funny result. Look at the "man" in the following figure. It is too much north.
\documentclass{scrbook}
\usepackage{tikz-qtree}
\tikzset{every tree node/.style={align=left, anchor=north}}
\begin{document}
\begin{tikzpicture}
\tikzset{level 1+/.style={level distance=3\baselineskip}}
\tikzset{frontier/.style={distance from root=12\baselineskip}}
\Tree[.{V[{\sc comps} { }]}
[.{{1} NP} man ]
[.{V[{\sc comps} { {1} }]}
[.{{2} NP} ketābāro ]
[.{V[{\sc comps} { {1}, {2} }]}
[.{{3} PP} \edge[roof]; {be Sepide} ]
[.{V[{\sc comps} { {1}, {2}, {3} }]} dādam ]
]
]
]
\end{tikzpicture}
\end{document}