# Draw a complex tree - forest

Please, how can I do something like this? Thanks!

That's what I'm doing:

\documentclass[showtrims, 10pt]{memoir}
\usepackage{forest}
\begin{document}
\begin{forest}

[,phantom,s sep=2cm
[X
[Raiz-{[-cons.]}
[Altura][P.A.V],name=a2
]
]
[X[Raiz-{[+cons.]}[{[+nasal]}]], oi
]
[X[Raiz-{[+cons.]}[P.A.C]]
]
[{[+cons.]},before drawing tree={y=0cm,x=0.8cm},oi,oi,anchor=west]
[{[-soante]},before drawing tree={y=0.65cm,x=0.5cm},oi,oi,anchor=north west]
]
\end{forest}
\end{document}

• Welcome to TeX.SE! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. The easier it is to copy and test your code, the more likely your question will be answered and can help others in a similar situation. – thymaro May 21 '18 at 18:57
• You might want to check out the tikz-qtree package or conduct a search for "tree" on ctan. Next step: try something, come back here, add your MWE as advertised above. And you will most probably get an answer, if the remaining problem is specific enough and can be solved at all. The problem, in general terms, is that "please do this for me"-questions are not well received on the SE network. If you're lucky, however, some expert with nothing better to do is already working on it. Don't count on it, though ;) – thymaro May 21 '18 at 19:01
• Since you got the tags in the right category, you can search the big G or youtube for for a tutorial on LaTeX and ling trees or forest or anything related to the thing you want to do. Good luck to you. – thymaro May 21 '18 at 19:04
• You just asked a question here, where you showed that you are able to post MWEs. What made you lose this ability? (You just need to put grow=... at the right places.) ;-) – marmot May 21 '18 at 19:04
• @Amanda The first thing you might want to do is to remove the empty lines to make the code compilable and tell us what the forest style oi is because otherwise one cannot compile the snippet. Then grow affects the descendants. If you keep adjusting it, you should be able to create the zigzag. – marmot May 21 '18 at 22:44

Forest has the big advantage to do nice placements automatically. If you do not like the outcome, it is often easier to add a few more ingredients with the positioning library. And you did the right thing when starting to name the nodes. By naming all the relevant nodes, it is straightforward to add the dashed lines, as well as the decoration on an existing connection.

\documentclass[showtrims, 10pt]{memoir}
\usepackage{forest}
\usetikzlibrary{positioning,decorations.markings}
\begin{document}
\begin{forest}
for tree={calign=fixed edge angles,calign primary angle=-45,calign secondary angle=0}
[,phantom,s sep=2cm
[X
[Raiz-{[-cons.]},name=a2
[Altura]
[P.A.V]
]
]
[X,name=X2
[Raiz-{[+cons.]},name=Raiz2
[{[+nasal]},name=nas]
],green!50!blue
]
[X[Raiz-{[+cons.]},name=rh
[P.A.C]
]
]
]
\draw[dashed] (a2.south) -- (nas.north) -- (rh.south);
\node[above right=0.5cm of rh,green!50!blue] (cons) {[+cons.]};
\node[right=0.5cm of rh,green!50!blue] (soante) {[-soante]};
\draw[green!50!blue] (rh) -- (cons);
\draw[green!50!blue] (rh) -- (soante);
\draw[decorate,decoration={markings,mark=at position 0.5 with {
\draw (-1pt,-2pt) -- (-1pt,2pt);
\draw (1pt,-2pt) -- (1pt,2pt);}}] (Raiz2) -- (X2);
\end{forest}
\end{document}


• You're the best! Thanks a billion! :-) \O/ – Amanda May 22 '18 at 0:18