othar@CS.UCLA.EDU (03/11/88)
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 )