Newsgroups: comp.archives Path: utzoo!utgpu!news-server.csri.toronto.edu!ox.com!emv From: lee@uhccux.uhcc.Hawaii.Edu (Greg Lee) Subject: [tex] Re: Hierarchical trees (request) Message-ID: <1991Feb6.100625.19566@ox.com> Followup-To: comp.text.tex Sender: emv@ox.com (Edward Vielmetti) Reply-To: lee@uhccux.uhcc.Hawaii.Edu (Greg Lee) Organization: University of Hawaii References: <11274@uhccux.uhcc.Hawaii.Edu> Date: Wed, 6 Feb 1991 10:06:25 GMT Approved: emv@ox.com (Edward Vielmetti) X-Original-Newsgroups: comp.text.tex 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 , 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