1

I want to draw arrows from different words under a roof. In my example "Mary saw who" is under the roof, and I want I an arrow from "Mary" and another arrow from "who" pointing to "Mary" and "who" further up in the tree. I can't label the separate words as nodes under the roof, only the whole phrase (as in my example). When I do that, I can draw an arrow that I can manipulate to point from "who" and "saw" by changing the value of [xshift] or the coordinates, but I can't get it to point from "Mary" for some reason.

\documentclass{report}  
\usepackage{tikz-qtree}  
\usepackage{tikz-qtree-compat}  

\begin{document}

\begin{tikzpicture}  
\tikzset{every tree node/.style={align=center,anchor=north}}  
\Tree   
[.CP [.specCP \node(wh){$[$Q, $\phi$^{\textsc{epp}} $]$ \\ who}; ]    
[.C\1 [.C  ]  
[.TP [.DP \node(DP2){Mary}; ]  
[.T\1 [.T saw ]  
[.$v$P [.DP \node(wh2){who}; ]  
[.$v$\1 \edge[roof];  \node(x){Mary saw who}; ]  
  ] ] ] ] ] ]   
 \draw [->] ([xshift=0.1em]x.south) to[out=-90,in=-90,looseness=2] (DP2.south);  
 \draw [->] (x.south)++(1,0) to[out=-90,in=-90,looseness=2] (wh2.south);  

\end{tikzpicture}

\end{document}

1 Answer 1

1

Instead of x.south you can use x.south west and x.south east for easier positioning the starting point for your arrows. After some tests I've got:

\documentclass{report}  
\usepackage{tikz-qtree}  
\usepackage{tikz-qtree-compat}  

\begin{document}

\begin{tikzpicture}  
\tikzset{every tree node/.style={align=center,anchor=north}}  
\Tree   
[.CP [.specCP \node(wh){$[$Q, $\phi$^{\textsc{epp}} $]$ \\ who}; ]    
[.C\1 [.C  ]  
[.TP [.DP \node(DP2){Mary}; ]  
[.T\1 [.T saw ]  
[.$v$P [.DP \node(wh2){who}; ]  
[.$v$\1 \edge[roof];  \node(x){Mary saw who}; ]  
  ] ] ] ] ] ]   
 \draw [->] ([xshift=1.75em]x.south west) to[out=-90,in=-90,looseness=2] (DP2.south);  
 \draw [->]  ([xshift=-1em]x.south east) to[out=-90,in=-90,looseness=2] (wh2.south);  

\end{tikzpicture}

\end{document}

enter image description here

0

You must log in to answer this question.

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