summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/LingTrees/READMORE.txt
blob: cd37b3ad6d0c420bfb2281c0ba1a9ade08a903af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123


       LingTrees Linguistics Tree-formatting Preprocessor and Macros
                  Avery D Andrews, March 2006

Purpose:

This is a LateX2e package for formatting linguistics trees (upside-down,
hanging by the root, with slanted branches from mother to daughters),
consisting of a prepreprocessor written in Python (freely downloadable from
http://www.python.org or http://www.activestate.com; the latter might be
easier to get working in Linux), and some LaTeX .sty files.  The preprocessor
allows trees to be entered as indented lists (no brackets to worry about),
and also deploys line-drawing and various other commands.  The macros are
responsible for the details of positioning.  Plain TeX is currently not
supported.

In addition to the preprocessor itself (trees.py), there's a simple
GUI for running it by pushing a button in the GUI subdirectory.
Free-standing executables for Windows may be found at:

 http://arts.anu.edu.au/Linguistics/People/AveryAndrews/Software/latex

The package is probably most suitable for irregularly-branching trees
with wide and complex node-labels, such as are prevalent for example in
LFG and HPSG. Other packages that might be worth looking at are pst-jtree
(good for heavily right-branching trees with small node-labels) and
qtree (which works with pdflatex).  It is an upwards-compatible
successor to the 'trees' package at CTAN/latex209/contrib/pstrees/trees.

Dependencies:

It requires either the pst-nodes module of the PSTricks, or Emma Pease's
tree-dvips (with less functionality), both available on CTAN.  The source
for the documentation file lingtrees.doc.txp also requires Chris
Manning's avm.sty, of which version 1.02 is also included here with
permission.

License:

  LaTeX macros:  LaTeX Project Public License
  trees.py:      GPL 2

Documentation:

The documentation for the macros and preprocessor commands is in the
file lingtrees.doc.pdf.  pst-nodes is accessed thru a partial emulation
of tree-dvips, documented in pst-tree-dvips-emu.doc.pdf.


Installation:

The .sty files are:

  lingtrees.sty
  pst-tree-dvips-emu.sty
  lingrees-without-pstricks.sty
  avm.sty and cm-lingamcros (by Chris Manning), needed for generating the
    docs; see http://nlp.stanford.edu/~manning/tex/ for more information.
  
put them whereever you put your custom LaTeX files.  You will
also need to have Pstricks or tree-dvips installed (both available
on CTAN, and already present in many LaTeX distributions).

For the preprocessor itself, script trees.py  can be
run directly with Python.  Or, Windows users can collect a free-standing
executable with an installer from

 http://arts.anu.edu.au/Linguistics/People/AveryAndrews/Software/latex

The exact procedure for running trees.py depends on the OS. A rather
generic procedure that should always work is:

  1. put trees.py in some folder, say c:\bin 
  2. have a terminal/dos window cd'd to the folder where your work is
  3. have the input file called something like work.txp  (.txp
        being the assumed extension for the input file)
  4. type:
        python c:\bin\trees.py work
     (no extension; assumes the Python executable is on your PATH)
  5. the output should be written to work.tex (.tex being
        the supplied extension for the output file)

It should however usually be possible to get the script to run just
by typing their names.

For Linux, Unix, etc. you can place the script somewhere on your PATH
variable, make it executable, and perhaps edit the 'shebang' line at
the top to reflect exactly where Python is (and maybe remove the .py
extension from the name).

For Windows 2000 and XP, you can again put the script somewhere on your
path, and then select Start|Settings|Control Panel|System|Advanced|
Environment Variables, and edit or add PATHEXT so that it ends with
.PY;.PYW. If you have Administrator privileges you can do this in the
System Variables for everybody; otherwise only in the User Variables for
yourself.

trees.py will also run as a filter, but due to a bug in the handling of
io-redirection in Windoze with PATHEXT, you have to explicitly invoke
Python in order for this to work, i.e.:

  python c:\exe\trees.py < work.txp > work.tex

Win9x users can use the generic method above, or get the free-standing
executable.  Frederik Lundh's exemaker program would also be a way
to avoid invoking Python explicitly (although it does require
python to be installed).

Generating the Docs:

The docs sources are in the Samples folder.  To generate them you'll
need cm-lingmacros.sty and amv.sty, included here in the CDM folder,
and:

  urls.sty ([CTAN]macros/latex/contrib/misc/url.sty)
  PStricks ([CTAN]graphics/pstricks; pst-node and pst-coil modules)
  
Both included in MikTeX large.