[Tugindia] How to add tree type structure?

Radhakrishnan CV cvr at river-valley.org
Wed Jul 23 04:20:41 CEST 2003


>>>>> "Kev" == Kev  <sooltaal at yahoo.com> writes:

    Kev> Hello all, I am a college student, and a new user of
    Kev> LateX2e. I am using MiKTeX and WinEdt. I am writing some
    Kev> chemistry notes and wish to know how I can create a tree type
    Kev> stucture such as this:
      
    Kev>   |---Compound |--|
    Kev>      |
    Kev>      |--|
    Kev>         |
    Kev>         |....Compounds..

An elegant way would be to use pstricks or xypic macros.  However this
can be accomplished by an array construct as given below:

\arraycolsep2pt
\def\hr{\rule[.5ex]{2em}{.2pt}} 
% define a horizonal rule

\def\vr{\vrule depth -.5ex height 10pt width .2pt}
% define a vertical rule

$\begin{array}{lllll}
\vline\hr &\multicolumn{3}{l}{\mbox{Compounds}}\\
\vr\hr    &\multicolumn{3}{l}{\mbox{Compounds}}\\
   &\:\:\vline\hr &\multicolumn{3}{l}{\mbox{Radical}}\\
   &\:\:\vr\hr    &\multicolumn{3}{l}{\mbox{Radical}}\\
   &&&\:\:\vr\ldots\ldots    &\mbox{Atoms}
\end{array}$


Best

Radhakrishnan


More information about the tugindia mailing list