Vertical left branch in qtree

March 24   tikz qtree 0 1 Views

Let's consider a really simple tree like the following :

\documentclass[12pt]{beamer} \usepackage{qtree, tikz-qtree, tikz} \begin{document}  \begin{frame}{Title} \begin{tikzpicture} \Tree      [.XP     [.X ] [.compl ] ]    \end{tikzpicture} \end{frame}  \end{document} 

In its natural form, it looks like two symetric branches /\ . How can I make it looks like |\ (or eventually the reverse, /|). In other words, given that I only use binary branches, how can I "tell my tree" to put a branch straight, and the other one oblic left of oblic right? I may eventually want to draw a tree like this :

 |\  |\ /| 


I don't know with qtree but with forest it's easy with options calign=first or calign=last.

%\usepackage{qtree, tikz-qtree, tikz}

    [XP, for tree={calign=first}
    [X [a [A, calign=last [B] [D]] [B]] [b] [c]] [compl, calign=last [A] [B] ] ]


Vertical left branch in qtree

Tags: tikz qtree, qtree
PC site About | Contact

©2016 all rights reserved

processed in 0.122 (s). 5 q(s)