How to draw a curved line in the qtree and add a description like the following picture?
\Tree [.n,v,aP [.n,v,a ] [.$\sqrt{P}$ [.$\sqrt{\alpha}$ ] [.$\sqrt{\beta}$ ] ] ]
Thanks!
How to draw a curved line in the qtree and add a description like the following picture?
\Tree [.n,v,aP [.n,v,a ] [.$\sqrt{P}$ [.$\sqrt{\alpha}$ ] [.$\sqrt{\beta}$ ] ] ]
Thanks!
Using forest or tikz-qtree is definitely the way to go for trees. I would recommend forest since it allows you to name nodes very simply which then allows all sorts of annotations of the sort you need to be made quite simply. tikz-qtree can do the same sort of thing, but you need to encode the nodes specifically in the tree, which makes the code much more clunky.
Here's both solutions, using the answer here:
And here's another couple of solutions, also using forest:
\documentclass{article}
\usepackage{tikz-qtree}
\usepackage[linguistics]{forest}
\usetikzlibrary{calc,positioning}
\begin{document}
\begin{tikzpicture}
\Tree [.n,v,aP [.n,v,a ] [.$\sqrt{P}$ [.\node (A){$\sqrt{\alpha}$};] [.$\sqrt{\beta}$ ] ] ]
\draw
([xshift=-14pt]A) arc[start angle=180,end angle=60,radius=2cm] node[below] {Spellout domain};
\end{tikzpicture}
\begin{forest}
[{n,v,aP} [{n,v,a} ] [$\sqrt{P}$ [$\sqrt{\alpha}$,name=A] [$\sqrt{\beta}$ ] ] ]
\draw
([xshift=-14pt]A) arc[start angle=180,end angle=60,radius=2cm] node[below] {Spellout domain};
\end{forest}
\end{document}
qtreeis a very old package and I wouldn't recommend using it. What you want to do is much easier usingtikz-qtreeorforest. Especially if you are just starting out drawing trees, I would definitely recommend learning to use them. – Alan Munn Apr 30 '23 at 07:55gb4eand I'm not aware of any real bugs, although it has some quirks. Most can probably be solved by adding\noautomathafter you load the package. If your glossing needs are very complex, thenexpexis a good alternative, but it's very non-latex in its syntax since the author is a plain TeX user. – Alan Munn Apr 30 '23 at 18:26