Discussion:
[Ling-TeX] forest tree
houda araj
7 years ago
Permalink
\documentclass{standalone}

\usepackage{tabularx}

\usepackage{forest}

\usetikzlibrary{shapes.geometric}


I want to put in a forest tree a box in which I can write a small text on several lines.

Thanks for your help.


\begin{document}

\begin{forest}

for tree={

child anchor=west,

parent anchor=east,

grow=east,

draw,

anchor=west,

edge path={

\noexpand\path[\forestoption{edge}]

(.child anchor) -| +(-5pt,0) -- +(-5pt,0) |-

(!u.parent anchor)\forestoption{edge label};

},

}

[...

[text text \\ text text [ text text... [... [... [...]

[...]][... [...] [... ]]] ]

[... [... [...][...]] ] ] ]

\end{forest}

\end{document}
Andy Lücking
7 years ago
Permalink
just add the "align"-option to your "for tree" propagator: align=left
(or center or right...). This wraps node contents into a parbox or
minipage, allowing line breaks.
...
Continue reading on narkive:
Loading...