Trees may be constructed using the commands specified in
lingmacros.sty and tree-dvips.sty. It is necessary to place a
tree within a figure environment: this ensures proper conversion to HTML,
as well as allowing the tree to float to a suitable place on the physical
page. The command \modsmalltree{<numberofcolumns>}{<treetable>}
(lingmacros.sty) allows tree
nodes to be arranged on the basis of a tabular (table) structure. That
is, each node is a cell of the table, and each row of the table represents
a level of the tree. Spacing is achieved by leaving empty cells.
A node itself is specified via a label and a contents
(typically, a flat feature bundle). Each label must be unique for the
tree it occurs in. The command \node{<label>}{<contents>}
(
tree-dvips.sty) is used to specify a node: each table cell to be used as
a node will thus have a \node{}{}
command embedded in it.
For example, \node{c}{finite}
labels a particular node as node `c'
and associates the feature value `finite' with it. The labels themselves do
not appear: they are used only to identify nodes for processing purposes.
Finally, nodes that are connected via branches are specified in a
separate series of \nodeconnect{<node>}{<node>}
commands, in
pairwise fashion.
This ensures that lines are drawn between all pairs of nodes that
are connected by branches. It is important
that \nodeconnect{}{}
commands are given outside the
\modsmalltree{}{}
command.
It is equally possible to draw trees using a graphics editor, producing an
EPS file and incorporating the tree in a figure environment as
previously explained.
Figure 3.2 contains a tree structure. The commands to produce
this structure are as follows:
\begin{figure}[!htb]
\vspace{1.5ex}
\centering
\modsmalltree{9}{&&&&\node{a}{Finiteness}\\
&\node{b}{non-finite}&&&&&\node{c}{finite}\\
&\node{d}{Verb-form/Mood}&&&&&\node{e}{Verb-form/Mood}\\
\node{f}{inf}&\node{g}{part}&\node{h}{ger}
&\node{i}{sup}&&\node{j}{ind}&\node{k}{sub}
&\node{l}{impr}&\node{m}{cond}
}
\nodeconnect{a}{b}
\nodeconnect{a}{c}
\nodeconnect{b}{d}
\nodeconnect{c}{e}
\nodeconnect{d}{f}
\nodeconnect{d}{g}
\nodeconnect{d}{h}
\nodeconnect{d}{i}
\nodeconnect{e}{j}
\nodeconnect{e}{k}
\nodeconnect{e}{l}
\nodeconnect{e}{m}
\caption{A tree structure\label{ls:ltree}}
\vspace{1.5ex}
\end{figure}
There are 4 rows to the table, i.e. 4 levels to the tree. The maximum
number of table rows used is 9 (seen in the bottom row). You do not have to
specify the remaining empty cells to the right of the rightmost occupied
cell of a row as can be seen in all rows except the bottom row. However,
it does not hurt to do so. Note that the \nodeconnect{}{}
commands
occur outside the scope of the \modsmalltree{}{}
command: they
immediately follow it and are still within the scope of the figure
environment. The reason for this is that conversion to HTML will produce an
image for the entire figure and requires commands to be in this order.
Figure 3.2: A tree structure
It is possible to produce numbered linguistic trees, however, as for
numbered linguistic example sentences, we do not recommend this unless
absolutely necessary, as again duplication of material is involved for
both LaTeX and HTML environments. Examples follow.
The index of the external thematic role is passed on to the
maximal projection of its predicate as indicated in (3)
where the external argument is underlined following Williams' notation.
(3)
| |
The example was produced by the following:
The index of the external thematic role is passed
on to the maximal projection of its predicate as
indicated in (\ref{3ex6}) where the external
argument is underlined following Williams' notation.
begin{latexonly}
\enumsentence{\label{3ex6}
\evnup[6ex]{
\modsmalltree{3}{&\node{a}{VP$_{i}$}\\
\node{b}{V$_{i}$}& &\node{c}{\ldots}\\
\node{d}{chased:($\earg{Agent$_{i}$}$,Theme$_{j}$)}&&
}
}
}
\nodeconnect{a}{b}
\nodeconnect{a}{c}
\nodeconnect{b}{d}
end{latexonly}
begin{htmlonly}
\par
\begin{tabular}{ll}
\begin{equation}
\mbox{\htmlimage{align=nojustify}.}
\end{equation}\label{3ex6}&\begin{figure}[h]
\htmlimage{align=middle}
\modsmalltree{3}{&\node{a}{VP$_{i}$}\\
\node{b}{V$_{i}$}& &\node{c}{\ldots}\\
\node{d}{chased:($\earg{Agent$_{i}$}$,Theme$_{j}$)}&&
}
\nodeconnect{a}{b}
\nodeconnect{a}{c}
\nodeconnect{b}{d}
\end{figure}
\end{tabular}
\par
end{htmlonly}
Points to note here are that again the layout format must be strictly
adhered to, with respect particularly to the placement of labels
and the inclusion of `.' in the equation environment. The
command \evnup{}
(lingmacros.sty) is required to line up the
enumerated tree with the associated number on the page. For the version
destined for conversion to HTML, the layout is quite complex: a tabular
(effectively within \modsmalltree{}{}
) inside a figure alongside
an equation, both the latter inside a tabular.
Predication is stated as a coindexing procedure which relates a
predicative phrase with a c-commanding NP at S-structure,
as in (4):
(4) | | | |
This example was produced as follows:
Predication is stated as a coindexing procedure
which relates a predicative phrase with a
c--commanding NP at S--structure,
as in (\ref{3ex8}):
begin{latexonly}
\enumsentence{\label{3ex8}
\evnup[9ex]{
\modsmalltree{4}{~&\node{a2}{S}&~&~\\
\node{b2}{NP}&~&\node{c2}{VP$_{i}$}&~\\
\node{d2}{John}&\node{e2}{V$_{i}$}&~&\node{f2}{\ldots}\\
~&\node{g2}{chased:($\earg{Agent$_{i}$}$, \ldots)}&~&~
}
$\Rightarrow$
\modsmalltree{4}{~&\node{A}{S}&~&~\\
\node{B}{NP$_{i}$}&~&\node{C}{VP$_{i}$}&~\\
\node{D}{John}&\node{E}{v$_{i}$}&~&\node{F}{\ldots}\\
~&\node{G}{chased:($\earg{Agent$_{i}$}$, \ldots)}&~&~
}
}
}
\nodeconnect{a2}{b2}
\nodeconnect{a2}{c2}
\nodeconnect{b2}{d2}
\nodeconnect{c2}{e2}
\nodeconnect{c2}{f2}
\nodeconnect{e2}{g2}
\nodeconnect{A}{B}
\nodeconnect{A}{C}
\nodeconnect{B}{D}
\nodeconnect{C}{E}
\nodeconnect{C}{F}
\nodeconnect{E}{G}
end{latexonly}
begin{htmlonly}
\par
\begin{tabular}{llcl}
\begin{equation}\mbox{\htmlimage{align=nojustify}.} <NO LINE BREAK>
\end{equation}\label{3ex8}&\begin{figure}[h]
\htmlimage{align=middle}
\modsmalltree{4}{~&\node{a2}{S}&~&~\\
\node{b2}{NP}&~&\node{c2}{VP$_{i}$}&~\\
\node{d2}{John}&\node{e2}{V$_{i}$}&~&\node{f2}{\ldots}\\
~&\node{g2}{chased:($\earg{Agent$_{i}$}$, \ldots)}&~&~
}
$\Rightarrow$
\modsmalltree{4}{~&\node{A}{S}&~&~\\
\node{B}{NP$_{i}$}&~&\node{C}{VP$_{i}$}&~\\
\node{D}{John}&\node{E}{v$_{i}$}&~&\node{F}{\ldots}\\
~&\node{G}{chased:($\earg{Agent$_{i}$}$, \ldots)}&~&~
}
\nodeconnect{a2}{b2}
\nodeconnect{a2}{c2}
\nodeconnect{b2}{d2}
\nodeconnect{c2}{e2}
\nodeconnect{c2}{f2}
\nodeconnect{e2}{g2}
\nodeconnect{A}{B}
\nodeconnect{A}{C}
\nodeconnect{B}{D}
\nodeconnect{C}{E}
\nodeconnect{C}{F}
\nodeconnect{E}{G}
\end{figure}
\end{tabular}
\par
end{htmlonly}
No comment, apart from enjoy yourself if you want to splurge the time and
effort required to do something like this and make sure that you follow
the layout format exactly.