Graphics, Figures & TablesAngled arrows with tikz-qtree?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
JasonM
Posts: 3
Joined: Fri Jun 13, 2014 4:48 pm

Angled arrows with tikz-qtree?

Post by JasonM »

Would anyone know how to get \abarnodeconnect (or something equivalent) to work with tikz-qtree? The classic example I'm looking to imitate is:

Code: Select all

\documentclass{minimal}
\usepackage{tree-dvips}
\usepackage{qtree}
\begin{document}

\Tree [.S [.NP \node{subj}{subj$_i$} ]
[.VP [.V verb ] [.NP \node{t}{t$_i$} ]]]
\abarnodeconnect[-6pt]{t}{subj}

\end{document}
Of course, this won't work with XeLatex, and I'm looking for a way to get the 'angled arrows' in the tree diagram using tikz-qtree.
Last edited by Stefan Kottwitz on Fri Jun 20, 2014 7:50 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Angled arrows with tikz-qtree?

Post by esdd »

Set the tree inside a tikzpicture. Then you can use the normal tikz syntax to draw the arrow:

Code: Select all

\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{tikz-qtree}
\begin{document}
\begin{tikzpicture}
\Tree [.S [.NP [.\node(subj){subj$_i$}; ] ]
          [.VP [.V verb ] [.NP [.\node(t){t$_i$}; ] ] ] ]
\draw[-latex](t.south)--+(0,-6pt)-|(subj);
\end{tikzpicture}
\end{document}
Note the additional code changes inside the \Tree command.
qtree.png
qtree.png (8.73 KiB) Viewed 4390 times
Best regards
Elke
Post Reply