lee@uhccux.uhcc.Hawaii.Edu (Greg Lee) (02/06/91)
Archive-name: tex/macros/tree/1991-02-02 Archive: uhccux.uhcc.hawaii.edu:/linguist/tree1.1.tar.Z [128.171.7.2] Original-posting-by: lee@uhccux.uhcc.Hawaii.Edu (Greg Lee) Original-subject: Re: Hierarchical trees (request) Reposted-by: emv@ox.com (Edward Vielmetti) From article <MERNST.91Jan11023825@emu.lcs.mit.edu>, by mernst@theory.lcs.mit.edu (Michael Ernst): > >I'm looking for a macro that will let me draw hierarchical trees in the >style of genealogical, organizational, or parse charts. I'd like to get > > A > | > -------------------------------- > | | | > B J K > | | > -------------------------------- L > | | | | | > C D E I ------- > | | | > ------------ M N > | | | > F G H > >from the "obvious" input, say > >\tree{A}[\tree{B}[C,D,\tree{E}[F,G,H],I],J,\tree{K}[\tree{L}[M,N]]] A tree program is available by ftp from uhccux.uhcc.hawaii.edu in directory "linguist" in file "tree1.1.tar.Z" which produces either on-screen diagrams of trees (examples below) or plain TeX code. From either input, \tree A B C D E F G H I J K L M N or input \tree (A(B(C)(D)(E(F)(G)(H))(I))(J)(K(L(M)(N)))) it produces for on-screen display this, A _____|_____ | | | B J K ____|_____ | | | | | L C D E I _|__ ___|___ | | | | | M N F G H or this, A ____________|____________ | | | B | K _________|_________ | | | | | | | L | | E | | _|__ | | ___|___ | | | | | | | | | | | | | C D F G H I J M N or this, A _____|_____ | | | B| J K| ______|______ | | | | | L| C D E| I _|__ ___|___ | | | | | M N F G H or other variants, and corresponding prettier versions using TeX. For the latter, versions with slanty lines require a PostScript printer. Greg, lee@uhccux.uhcc.hawaii.edu