2

I'm trying to draw a pointed arrow which connects the two trees in tikzpicture below. So far I've only managed to draw a red line which connects one of the trees to the root node of the lower tree, however, I would like the line to be an arrow whose head is at the rood node of the lower tree, and I don't know how to do this. Furthermore, how can I ensure that the arrow does not go through any of the trees?

\documentclass[12pt,a4paper]{article}   
 \usepackage{tikz-qtree}
 \usepackage{tikz-qtree-compat}
 \usetikzlibrary{fit,shapes} % tikz libraries that are necessary to make the blue ellipses
\usepackage{amsmath} % for the \text{} command that exits math mode
\usepackage[normalem]{ulem} % provides \sout
\usepackage{lscape}

\begin{document}

\scalebox{.96}{ 

 \begin{tikzpicture}[baseline=(current bounding box.center), every tree node/.style={align=center,anchor=north}, level distance = 10ex, sibling distance=.1cm, scale= 1]
\Tree [.{$\ref{interpretation3ha}$} [.{$s : s$}  ] [.{$\textbf{t} $} [.{$u : p$} ]  [.{$ \overline{\textbf{t}}$}  [.{$(\eta \, (inductive))^{\bigstar}:$}\\{$ ((\overline{\textbf{e}} \,\overline{\textbf{t}}) \,\overline{\textbf{t}})\,\overline{\textbf{t}}$} \edge node[auto=left] {$\bigstar$}; [.{$ (\overline{\overline{\textbf{e}}\, \overline{\textbf{t}}})$} \edge node[auto=left] {$\eta$};  [.{$inductive : $}\\{$\overline{\textbf{e}}\, \overline{\textbf{t}}$}  ] ] ] [.{$(\overline{\textbf{e}} \,\overline{\textbf{t}}) \,\overline{\textbf{t}}$} [. {$\lambda R:\overline{\textbf{e}} \,\overline{\textbf{t}}$}  ] [.{$ \overline{\textbf{t}}$}  [.{$(\textbf{e} \, \overline{\textbf{t}}) \overline{\textbf{t}}$}  \edge node[auto=left] {$\bigstar$};  [.{$the.$}\\{$primes :$}\\{$ \overline{\textbf{e}}$} ] ] [.{$\textbf{e} (\overline{\textbf{t}})$} [.{$\lambda y$} ] [.\node(someone){$\overline{\textbf{t}}$} ; ] ]  ]  ] ]  ] ]

\begin{scope}[xshift=-4cm,yshift=-9cm,scale=1] % the inverse scope tree is positioned 9 cm to the right and 8 cm down
\Tree [. \node(existential-inverse){$\overline{\textbf{t}}$}; [.{$h: e$}  ] [.{$e\overline{\textbf{t}}$} [.{$prove$} ] [.{$\overline{\textbf{t}}$} \edge node[auto=left] {$\eta$};  [.{$\textbf{t}$}  [.{$u :P$}  ]  [.{$\overline{\textbf{t}}$}  [.{$\textbf{e}$} \edge node[auto=left] {$\eta$}; [.{$y : \textbf{e}$} ]    ]  [.{$\overline{\textbf{e}}\,\overline{\textbf{t}}$} [.{$not$} ] [.{$R: $}\\{$\overline{\textbf{e}} \, \overline{\textbf{t}}$}    ] ]  ] ] ] ] ] ]


\end{scope}
\draw[thick, color=red]
(someone)..controls +(-2,-3) and +(-2,-6)..(existential-inverse);

\end{tikzpicture}

}
 \end{document}

1 Answer 1

2

Something like this should do the trick. I just changed the values of the control points and added -> for the arrowhead.

\documentclass[12pt,a4paper]{article}   
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\usetikzlibrary{fit,shapes} % tikz libraries that are necessary to make the blue ellipses
\usepackage{amsmath,amssymb} % for the \text{} command that exits math mode
\usepackage[normalem]{ulem} % provides \sout
\usepackage{lscape}

\begin{document}

\scalebox{.96}{ 

 \begin{tikzpicture}[baseline=(current bounding box.center), every tree node/.style={align=center,anchor=north}, level distance = 10ex, sibling distance=.1cm, scale= 1]
\Tree [.{$\ref{interpretation3ha}$} [.{$s : s$}  ] [.{$\textbf{t} $} [.{$u : p$} ]  [.{$ \overline{\textbf{t}}$}  [.{$(\eta \, (inductive))^{\bigstar}:$}\\{$ ((\overline{\textbf{e}} \,\overline{\textbf{t}}) \,\overline{\textbf{t}})\,\overline{\textbf{t}}$} \edge node[auto=left] {$\bigstar$}; [.{$ (\overline{\overline{\textbf{e}}\, \overline{\textbf{t}}})$} \edge node[auto=left] {$\eta$};  [.{$inductive : $}\\{$\overline{\textbf{e}}\, \overline{\textbf{t}}$}  ] ] ] [.{$(\overline{\textbf{e}} \,\overline{\textbf{t}}) \,\overline{\textbf{t}}$} [. {$\lambda R:\overline{\textbf{e}} \,\overline{\textbf{t}}$}  ] [.{$ \overline{\textbf{t}}$}  [.{$(\textbf{e} \, \overline{\textbf{t}}) \overline{\textbf{t}}$}  \edge node[auto=left] {$\bigstar$};  [.{$the.$}\\{$primes :$}\\{$ \overline{\textbf{e}}$} ] ] [.{$\textbf{e} (\overline{\textbf{t}})$} [.{$\lambda y$} ] [.\node(someone){$\overline{\textbf{t}}$} ; ] ]  ]  ] ]  ] ]

\begin{scope}[xshift=-4cm,yshift=-9cm,scale=1] % the inverse scope tree is positioned 9 cm to the right and 8 cm down
\Tree [. \node(existential-inverse){$\overline{\textbf{t}}$}; [.{$h: e$}  ] [.{$e\overline{\textbf{t}}$} [.{$prove$} ] [.{$\overline{\textbf{t}}$} \edge node[auto=left] {$\eta$};  [.{$\textbf{t}$}  [.{$u :P$}  ]  [.{$\overline{\textbf{t}}$}  [.{$\textbf{e}$} \edge node[auto=left] {$\eta$}; [.{$y : \textbf{e}$} ]    ]  [.{$\overline{\textbf{e}}\,\overline{\textbf{t}}$} [.{$not$} ] [.{$R: $}\\{$\overline{\textbf{e}} \, \overline{\textbf{t}}$}    ] ]  ] ] ] ] ] ]

\end{scope}

\draw[thick, color=red, ->]
(someone)..controls +(-5,-5) and +(2,2)..(existential-inverse);

\end{tikzpicture}

}
 \end{document}

output of code

You must log in to answer this question.

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