7

enter image description here

I'm trying to do some branches at the east of the node 'Raiz' (as is demonstrated in the image). I've tried use grow=east, but it didn't work. Thanks!!

Here is what I used:

\documentclass[article]
\usepackage{forest} 
\begin{document}
\begin{forest}

    [Raiz
    [laríngeo [vozeado]]
    [lateral]
    [nasal]
    [Cavidade Oral
    [P.A.C
    [LABIAL]
    [CORONAL[anterior]]
    [DORSAL[recuado]]
    ]
    [distensão retardada]
    [contínuo]
    ]
    ]


\end{forest}
\end{document}

I don't know how to put [+consoante] and [soante] in `Raiz'. I also don't know how to keep [ ] between the words as presented in the image.

  • Welcome to TeX.SX! Could aou add your code as (MWE). It will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}, that illustrates your problem. – Bobyandbob May 21 '18 at 16:44
  • \documentclass[showtrims, 10pt]{memoir} \usepackage{forest} \begin{document} \begin{forest} [Raiz [laríngeo [vozeado]] [lateral] [nasal] [Cavidade Oral [P.A.C [LABIAL] [CORONAL[anterior]] [DORSAL[recuado]] ] [distensão retardada] [contínuo] ] ] \end{forest} \end{document} – Amanda May 21 '18 at 17:11
5

Something like that?

\documentclass[showtrims, 10pt]{memoir} 
\usepackage{forest} 
\begin{document} 
\begin{forest} 
 [Raiz,blue!50!green 
   [laríngeo 
     [vozeado]
     ] 
   [lateral] 
   [nasal] 
   [Cavidade Oral 
      [P.A.C 
        [LABIAL] 
        [CORONAL
          [anterior]
          ] 
        [DORSAL
          [recuado]
          ] 
        ] 
      [distensão retardada] 
      [contínuo] 
    ]
    [{[soante]},before drawing tree={y=0cm,x=1cm},blue!50!green,edge=blue!50!green,anchor=west] 
    [{[+consoante]},before drawing tree={y=0.95cm,x=1cm},blue!50!green,edge=blue!50!green,anchor=north west] 
  ] 
\end{forest} 
\end{document}

enter image description here

1
% maybe this?
\documentclass[showtrims, 10pt]{article}
\usepackage{forest} 
\begin{document} 
\begin{forest} 
 [Raiz,blue!50!green 
   [Laríngeo 
     [{[vozeado]}]
     ] 
   [{[lateral]}] 
   [{[nasal]}] 
   [Cavidade Oral 
      [P.A.C 
        [LABIAL] 
        [CORONAL
          [{[anterior]}]
          ] 
        [DORSAL
          [{[recuado]}]
          ] 
        ] 
      [{[distensão retardada]}] 
      [{[contínuo]}] 
    ]
    [{[soante]},before drawing tree={y=0cm,x=1cm},blue!50!green,edge=blue!50!green,anchor=west] 
    [{[+consoante]},before drawing tree={y=0.95cm,x=1cm},blue!50!green,edge=blue!50!green,anchor=north west] 
  ] 
\end{forest} 
\end{document}

The curly brackets around nodes such as [nasal] are necessary to get the square brackets typeset in the node, rather than being parsed by Forest as part of the specification of the tree's structure.

solution including square brackets in nodes

  • This was supposedly be a nice indented code, why it becomes so horrible? – Alcino Dall Igna Junior Jun 20 '18 at 17:44
  • What is the differece to the accepted answer? – dexteritas Jun 20 '18 at 18:05
  • @dexteritas It will get the formatting of some nodes right, whereas the accepted answer gets them wrong, where 'right' and 'wrong' are understood as agreeing or disagreeing with the OP's target image. – cfr Jun 20 '18 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.