Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!elroy!cit-vax!ucla-cs!othar From: othar@CS.UCLA.EDU Newsgroups: comp.text Subject: Trees in TeX/LaTeX Message-ID: <10250@shemp.CS.UCLA.EDU> Date: 11 Mar 88 01:07:12 GMT Sender: news@CS.UCLA.EDU Reply-To: othar@CS.UCLA.EDU () Distribution: na Organization: UCLA Computer Science Department Lines: 54 Has anyone solved this problem already? If so, please send me the answer. I need to put tree diagrams into a paper. The trees look like: d / \ / \ / \ / \ b f / \ / \ / \ / \ a c e g where a,g are arbitrary boxes filled with text. Ideally I'd like to specify this with something as simple as: \tree{d}{\tree{b}{a}{c}} {\tree{f}{e}{g}} or \begin{tree} d \begin{subtree} b \begin{subtree} a \end{subtree} \begin{subtree} c \end{subtree} etc. We could assume binary branching if that's easiest. Could this be done easily? or has somebody done it already? I know TeX is great at vertical and horizontal layout, but it really doesn't handle the diagonal at all, so I'm leery of diving into this. Note: I have something that does |--g |---f---| | |--e d-| | |--c |---b---| |--a but that's not as appealing. Othar Hansson ( othar@cs.ucla.edu ..!{ucbvax|ihnp4}!ucla-cs!othar )