[Help] [LaTeX top]

Latex trees

tree-dvips.sty is a collection of macros that allow one to draw trees (and other lines) in a tex/latex file.

To use, type

\documentstyle[tree-dvips]{...}
run through latex as you normally do and remember to send it to a postscript printer. Note that you have to use dvips and that dvips must be able to find the tree-dvips.pro file.

The relevant commands are listed below, check with the manual (which can be found under the name /usr/local/lib/texmf/tex/csli/tree-manual.tex) for complete information.

% for defining nodes
\node{nodename}{Actual Text}
\nodepoint{nodename}[horizontal displace][vertical displace]

% for connecting nodes with straight lines.  The second has an arrow
\nodeconnect[fromloc]{fromnodename}[toloc]{tonodename}
\anodeconnect[fromloc]{fromnodename}[toloc]{tonodename}

% For connecting nodes by bars like this
%  |______________| 
\barnodeconnect[depth]{fromnodename}{tonodename}
\abarnodeconnect[depth]{fromnodename}{tonodename}

% For connecting nodes by curves
% The \aanodeconnect has arrowheads on both ends.
\nodecurve[fromloc][fromang]{fromnodename}[toloc][toang]{tonodename}{fdepth}[tdepth]
\anodecurve[fromloc][fromang]{fromnodename}[toloc][toang]{tonodename}{fdepth}[tdepth]
\aanodecurve[fromloc][fromang]{fromnodename}[toloc][toang]{tonodename}{fdepth}[tdepth]

% Odd things.  Makes a triangle 
\nodetriangle{fromnodename}{tonodename}
% causes a short line to cross perpendicular to the line at the
% midpoint between two nodes.
\delink[fromloc]{fromnodename}[toloc]{tonodename}{length}

% places a box, circle, or oval around a node
\nodebox{nodename}
\nodecircle[depth]{nodename}
\nodeoval{nodename}

Parameters

\nodemargin
\treelinewidth
\dashlength
\arrowwidth
\arrowlength
\arrowinset

[CSLI] [Help] [Stanford] [Search CSLI help pages] [Search CSLI pages] [Search Stanford]
Emma Pease
Last modified: Fri Nov 12 15:14:38 PST 1999 by emma@csli.Stanford.EDU