exercises/solutions/tikz-qtree-manual.tex
author Eugen Sawin <sawine@me73.com>
Sun, 03 Jun 2012 20:15:28 +0200
changeset 11 5112f3e2f3d2
permissions -rw-r--r--
Stuff.
sawine@11
     1
\documentclass{article}
sawine@11
     2
sawine@11
     3
\usepackage{xltxtra,fontspec}
sawine@11
     4
sawine@11
     5
\iffalse
sawine@11
     6
\setmainfont[Mapping=tex-text]{DejaVu Serif}
sawine@11
     7
\setmonofont[Scale=0.95]{DejaVu Sans Mono}
sawine@11
     8
\newfontfamily\verbfont[Scale=0.8]{DejaVu Sans Mono}
sawine@11
     9
\newfontfamily\ar[Script=Arabic]{DejaVu Sans}
sawine@11
    10
\newfontfamily\ja{VL Gothic}
sawine@11
    11
\newfontfamily\javerbfont[Scale=0.85,LetterSpace=5.0]{VL Gothic}
sawine@11
    12
\fi
sawine@11
    13
sawine@11
    14
\iftrue
sawine@11
    15
\setmainfont[Mapping=tex-text]{DejaVu Serif}
sawine@11
    16
\setmonofont[Scale=0.95]{DejaVu Sans Mono}
sawine@11
    17
\newfontfamily\verbfont[Scale=0.8]{DejaVu Sans Mono}
sawine@11
    18
\newfontfamily\ar[Script=Arabic]{DejaVu Sans}
sawine@11
    19
\newfontfamily\ja{Hiragino Maru Gothic Pro}
sawine@11
    20
\newfontfamily\javerbfont[Scale=0.85,LetterSpace=5.0]{Hiragino Maru Gothic Pro}
sawine@11
    21
\fi
sawine@11
    22
sawine@11
    23
\usepackage{tikz}
sawine@11
    24
\usepackage{tikz-qtree}
sawine@11
    25
sawine@11
    26
\usepackage{fullpage}
sawine@11
    27
sawine@11
    28
\usepackage{fancyvrb,fvrb-ex}
sawine@11
    29
\fvset{gobble=0,xleftmargin=0.5in,xrightmargin=2.75in,formatcom=\verbfont}
sawine@11
    30
\VerbatimFootnotes
sawine@11
    31
sawine@11
    32
\newcommand\tikztree{\texttt{tikz-qtree}}
sawine@11
    33
sawine@11
    34
\tikzset{>=latex}
sawine@11
    35
sawine@11
    36
\title{\tikztree: better trees with TikZ}
sawine@11
    37
\author{David Chiang}
sawine@11
    38
\date{Version 1.11 (Christmas 2010)}
sawine@11
    39
sawine@11
    40
\begin{document}
sawine@11
    41
sawine@11
    42
\maketitle
sawine@11
    43
sawine@11
    44
The \tikztree{} package provides a macro for drawing trees with
sawine@11
    45
TikZ\footnote{\texttt{http://sourceforge.net/projects/pgf/}} using the
sawine@11
    46
easy syntax of Alexis Dimitriadis'
sawine@11
    47
Qtree\footnote{\texttt{http://www.ling.upenn.edu/advice/latex/qtree/}}. It
sawine@11
    48
improves on TikZ's standard tree-drawing facility by laying out tree
sawine@11
    49
nodes without collisions; it improves on Qtree by adding lots of
sawine@11
    50
features from TikZ; and it improves on \verb|pst-qtree| in being
sawine@11
    51
usable with pdf\TeX{} and
sawine@11
    52
\XeTeX{}.\footnote{Although \XeTeX{} works with \verb|pst-qtree| using the \verb|xetex-pstricks| package. For typesetting very large trees or a large number of trees, this may be the better option.}
sawine@11
    53
sawine@11
    54
\section{Basics}
sawine@11
    55
sawine@11
    56
To load the package in \LaTeX{}:
sawine@11
    57
\begin{Verbatim}
sawine@11
    58
\usepackage{tikz}
sawine@11
    59
\usepackage{tikz-qtree}
sawine@11
    60
\end{Verbatim}
sawine@11
    61
%
sawine@11
    62
The simplest usage is identical to Qtree:
sawine@11
    63
\begin{center}
sawine@11
    64
\begin{SideBySideExample}
sawine@11
    65
\Tree [.S [.NP [.Det the ] [.N cat ] ] 
sawine@11
    66
          [.VP [.V sat ] 
sawine@11
    67
               [.PP [.P on ] 
sawine@11
    68
                    [.NP [.Det the ] [.N mat ] ] ] ] ]
sawine@11
    69
\end{SideBySideExample}
sawine@11
    70
\end{center}
sawine@11
    71
Subtrees are delimited by square brackets. A subtree's root label is
sawine@11
    72
joined by a dot (\verb|.|) to its opening bracket.\footnote{You can
sawine@11
    73
also write the label after the closing bracket instead of the opening
sawine@11
    74
bracket, or both, or neither. Please see the Qtree documentation for
sawine@11
    75
details.} As in Qtree, spaces are required after every (internal or
sawine@11
    76
leaf) node label. 
sawine@11
    77
sawine@11
    78
\verb|\Tree| works inside or outside a
sawine@11
    79
\verb|tikzpicture| environment, but many of the features described 
sawine@11
    80
below require the explicit \verb|tikzpicture| environment.
sawine@11
    81
sawine@11
    82
\goodbreak
sawine@11
    83
sawine@11
    84
\paragraph{Options} Some options for standard TikZ trees work for \verb|\Tree| as
sawine@11
    85
well:
sawine@11
    86
\begin{itemize}
sawine@11
    87
\item \verb|level distance|: vertical distance between the anchors of a parent and its children
sawine@11
    88
\item \verb|sibling distance|: horizontal distance between the boundaries of sister subtrees (not the anchors of their roots, as in standard TikZ trees). Note that TikZ nodes already have some horizontal space around them (\verb|inner xsep|, by default \verb|0.3333em|), so even \verb|sibling distance=0pt| leaves some room.
sawine@11
    89
\end{itemize}
sawine@11
    90
These are set either by writing
sawine@11
    91
\verb|\tikzset{|\textit{option}\verb|=|\textit{value}\verb|}| or by
sawine@11
    92
writing \verb|[|\textit{option}\verb|=|\textit{value}\verb|]| after a
sawine@11
    93
\verb|\begin{tikzpicture}| or \verb|\begin{scope}|.\footnote{Allowing
sawine@11
    94
options after \verb|\Tree| would have made sense, but there would be
sawine@11
    95
no way to disambiguate the two uses of square brackets.} For example:
sawine@11
    96
sawine@11
    97
\begin{center}
sawine@11
    98
\begin{SideBySideExample}
sawine@11
    99
\begin{tikzpicture}
sawine@11
   100
\tikzset{level distance=72pt}
sawine@11
   101
\Tree [.NP [.Adj tall ] [.N tree ] ]
sawine@11
   102
\end{tikzpicture}
sawine@11
   103
%
sawine@11
   104
\begin{tikzpicture}[sibling distance=72pt]
sawine@11
   105
\Tree [.NP [.Adj fat ] [.N tree ] ]
sawine@11
   106
\end{tikzpicture}
sawine@11
   107
\end{SideBySideExample}
sawine@11
   108
\end{center}
sawine@11
   109
sawine@11
   110
The \verb|grow=|\textit{direction}\/ and \verb|grow'=|\textit{direction}\/ options control the orientation of trees just as for standard TikZ trees. However, \textit{direction}\/ must be one of \verb|up|, \verb|down|, \verb|left|, or \verb|right|. The difference between \verb|grow| and \verb|grow'| is that \verb|grow| places children counterclockwise with respect to their parent and \verb|grow'| places them clockwise:
sawine@11
   111
\begin{center}
sawine@11
   112
\begin{SideBySideExample}
sawine@11
   113
\begin{tikzpicture}[grow'=down]
sawine@11
   114
\Tree [.NP [.Adj reverse ] [.N tree ] ]
sawine@11
   115
\end{tikzpicture}
sawine@11
   116
%
sawine@11
   117
\begin{tikzpicture}[grow'=up]
sawine@11
   118
\Tree [.NP [.Adj upside-down ] [.N tree ] ]
sawine@11
   119
\end{tikzpicture}
sawine@11
   120
\end{SideBySideExample}
sawine@11
   121
\vspace{3ex}
sawine@11
   122
\begin{SideBySideExample}
sawine@11
   123
\begin{tikzpicture}[grow=left]
sawine@11
   124
\tikzset{level distance=60pt,sibling distance=18pt}
sawine@11
   125
\tikzset{execute at begin node=\strut}
sawine@11
   126
\Tree [.NP [.Adj sideways ] [.N tree ] ]
sawine@11
   127
\end{tikzpicture}
sawine@11
   128
\end{SideBySideExample}
sawine@11
   129
\end{center}
sawine@11
   130
Note that in sideways trees, \verb|level distance| is horizontal and \verb|sibling distance| is vertical. Sideways trees do take a little extra adjusting to look right, since the defaults are geared towards vertically growing trees. The meaning of the option \verb|execute at begin node=\strut| is, before typesetting the label of every node, insert the command \verb|\strut|, which is an invisible box that maximizes the height and depth of the node.
sawine@11
   131
sawine@11
   132
\paragraph{Styles} TikZ lets you define \emph{styles}\/ which encapsulate multiple options:
sawine@11
   133
\begin{Verbatim}
sawine@11
   134
\tikzset{small/.style={level distance=20pt,sibling distance=0pt}}
sawine@11
   135
\end{Verbatim}
sawine@11
   136
Then the option \verb|small| causes the options in its definition to be used:
sawine@11
   137
\begin{center}
sawine@11
   138
\tikzset{small/.style={level distance=20pt,sibling distance=0pt}}
sawine@11
   139
\begin{SideBySideExample}
sawine@11
   140
\begin{tikzpicture}[small]
sawine@11
   141
\Tree [.NP [.Adj small ] [.N tree ] ]
sawine@11
   142
\end{tikzpicture}
sawine@11
   143
%
sawine@11
   144
\begin{tikzpicture}
sawine@11
   145
\Tree [.NP [.Adj normal ] [.N tree ] ]
sawine@11
   146
\end{tikzpicture}
sawine@11
   147
\end{SideBySideExample}
sawine@11
   148
\end{center}
sawine@11
   149
The following TikZ styles are automatically applied inside trees,
sawine@11
   150
providing a hook for you to change the appearance of particular kinds
sawine@11
   151
of tree parts:
sawine@11
   152
\begin{itemize}
sawine@11
   153
\item \verb|every tree node| to every (internal and leaf) node (default: \verb|anchor=base|)
sawine@11
   154
\item \verb|every internal node| to every internal node
sawine@11
   155
\item \verb|every leaf node| to every leaf node
sawine@11
   156
\item \verb|edge from parent| to every edge (default: \verb|draw|)
sawine@11
   157
\end{itemize}
sawine@11
   158
sawine@11
   159
The options for nodes and edges are all handled by TikZ and are
sawine@11
   160
described in detail in the TikZ documentation. For example, if you
sawine@11
   161
have a font named \verb|\ar| and want to set all the leaf labels in
sawine@11
   162
this font:
sawine@11
   163
\begin{center}
sawine@11
   164
\begin{SideBySideExample}
sawine@11
   165
\begin{tikzpicture}
sawine@11
   166
\tikzset{grow'=down}
sawine@11
   167
\tikzset{every leaf node/.style={font=\ar}}
sawine@11
   168
\Tree [.S [.NP القط ] 
sawine@11
   169
          [.VP [.V وجلس ] 
sawine@11
   170
               [.PP [.P على ] [.NP حصيرة ] ] ] ]
sawine@11
   171
\end{tikzpicture}
sawine@11
   172
\end{SideBySideExample}
sawine@11
   173
\end{center}
sawine@11
   174
sawine@11
   175
You can make the nodes in a sideways tree line up on their left edge using \verb|anchor=base west|:
sawine@11
   176
\begin{center}
sawine@11
   177
\begin{SideBySideExample}
sawine@11
   178
\begin{tikzpicture}
sawine@11
   179
\tikzset{grow'=right,level distance=32pt}
sawine@11
   180
\tikzset{execute at begin node=\strut}
sawine@11
   181
\tikzset{every tree node/.style={anchor=base west}}
sawine@11
   182
\Tree [.S [.NP [.Det the ] [.N cat ] ] 
sawine@11
   183
          [.VP [.V sat ] 
sawine@11
   184
               [.PP [.P on ] 
sawine@11
   185
                    [.NP [.Det the ] [.N mat ] ] ] ] ]
sawine@11
   186
\end{tikzpicture}                    
sawine@11
   187
\end{SideBySideExample}
sawine@11
   188
\end{center}
sawine@11
   189
sawine@11
   190
In Qtree, it was allowed to use a line break (\verb|\\|) inside a node. TikZ nodes by default don't allow this, but the \verb|align| option (in PGF/TikZ version 2.1 or later) enables it as a side effect:\footnote{Thanks to Alan Munn for figuring this out. Prior to PGF/TikZ version 2.1, the fix was to use the options \verb|text width=2em,text centered|.}
sawine@11
   191
\begin{center}
sawine@11
   192
\begin{SideBySideExample}
sawine@11
   193
\begin{tikzpicture}
sawine@11
   194
\tikzset{every tree node/.style={align=center,anchor=north}}
sawine@11
   195
\Tree [.S [.NP Det\\the N\\cat ]
sawine@11
   196
          [.VP V\\sat
sawine@11
   197
               [.PP P\\on
sawine@11
   198
                    [.NP Det\\the N\\mat ] ] ] ]
sawine@11
   199
\end{tikzpicture}
sawine@11
   200
\end{SideBySideExample}
sawine@11
   201
\end{center}
sawine@11
   202
sawine@11
   203
You can also define a style for all the edges in a tree. For example, if you want the edges to be a little darker:
sawine@11
   204
\begin{center}
sawine@11
   205
\begin{SideBySideExample}
sawine@11
   206
\begin{tikzpicture}
sawine@11
   207
\tikzset{edge from parent/.style={draw,thick}}
sawine@11
   208
\Tree [.S [.NP [.Det the ] [.N cat ] ] 
sawine@11
   209
          [.VP [.V sat ] 
sawine@11
   210
               [.PP [.P on ] 
sawine@11
   211
                    [.NP [.Det the ] [.N mat ] ] ] ] ]
sawine@11
   212
\end{tikzpicture}
sawine@11
   213
\end{SideBySideExample}
sawine@11
   214
\end{center}
sawine@11
   215
The \verb|draw| option is necessary, as by default they will not be
sawine@11
   216
drawn. As a more complex example, edges have an
sawine@11
   217
\verb|edge from parent path| option which lets you change the shape of
sawine@11
   218
the edge. Its value is a TikZ path expressed in terms of
sawine@11
   219
\verb|\tikzparentnode|, the parent node, and \verb|\tikzchildnode|,
sawine@11
   220
the child node.
sawine@11
   221
\begin{center}
sawine@11
   222
\begin{SideBySideExample}
sawine@11
   223
\begin{tikzpicture}
sawine@11
   224
\tikzset{edge from parent/.style=
sawine@11
   225
  {draw,
sawine@11
   226
   edge from parent path={(\tikzparentnode.south) 
sawine@11
   227
                          -- +(0,-8pt) 
sawine@11
   228
                          -| (\tikzchildnode)}}} 
sawine@11
   229
\Tree [.S [.NP [.Det the ] [.N cat ] ] 
sawine@11
   230
          [.VP [.V sat ] 
sawine@11
   231
               [.PP [.P on ] 
sawine@11
   232
                    [.NP [.Det the ] [.N mat ] ] ] ] ]
sawine@11
   233
\end{tikzpicture}                    
sawine@11
   234
\end{SideBySideExample}
sawine@11
   235
\end{center}
sawine@11
   236
sawine@11
   237
\clearpage
sawine@11
   238
sawine@11
   239
\section{Embedding TikZ nodes}
sawine@11
   240
sawine@11
   241
Inside a \verb|\Tree|, in place of a node label, you can use a TikZ
sawine@11
   242
\verb|\node| command.\footnote{\verb|\Tree| specifically watches out
sawine@11
   243
for the token \verb|\node|; do not use \verb|\path node| or other
sawine@11
   244
equivalents.}
sawine@11
   245
\begin{quote}
sawine@11
   246
\verb|\node [|\textit{options}\verb|] (|\textit{name}\verb|) {|\textit{label}\verb|};|
sawine@11
   247
\end{quote}
sawine@11
   248
Don't forget the terminating semicolon. The
sawine@11
   249
\verb|[|\textit{options}\verb|]|, which are optional, let you change
sawine@11
   250
the appearance of the node; for example, the \verb|draw| option draws
sawine@11
   251
a border around the node. The \verb|(|\textit{name}\verb|)|, which is
sawine@11
   252
also optional, can be used for drawing lines/arrows to/from the node.
sawine@11
   253
\begin{center}
sawine@11
   254
\begin{Example}
sawine@11
   255
\begin{tikzpicture}
sawine@11
   256
\Tree [.CP [.NP \node(wh){what}; ] 
sawine@11
   257
           [.C$'$ [.I did ] 
sawine@11
   258
                  [.\node[draw]{IP}; 
sawine@11
   259
                    [.NP [.Det the ] [.N cat ] ]
sawine@11
   260
                    [.VP [.V sit ] 
sawine@11
   261
                         [.PP [.P on ] 
sawine@11
   262
                              [.\node[draw]{NP}; 
sawine@11
   263
                                [.NP [.Det a ] [.N book ] ] 
sawine@11
   264
                                [.PP [.P about ] [.NP \node(t){$t$}; ] ] ] ] ] ] ] ]
sawine@11
   265
\draw[semithick,->] (t)..controls +(south west:5) and +(south:5) .. (wh);
sawine@11
   266
\end{tikzpicture}
sawine@11
   267
\end{Example}
sawine@11
   268
\end{center}
sawine@11
   269
sawine@11
   270
You can also refer to the whole subtree rooted at the node named \textit{name}\/ using \verb|\subtreeof{|\textit{name}\verb|}|:
sawine@11
   271
\begin{center}
sawine@11
   272
\begin{SideBySideExample}
sawine@11
   273
\begin{tikzpicture}
sawine@11
   274
\Tree [.S [.NP [.Det the ] [.N cat ] ] 
sawine@11
   275
          [.\node(site){VP}; [.V sat ] ] ]
sawine@11
   276
\begin{scope}[shift={(1in,0.5in)}]
sawine@11
   277
\Tree [.\node(root){VP}; VP$^\ast$
sawine@11
   278
                         [.PP [.P on ] 
sawine@11
   279
                              [.NP [.Det the ] [.N mat ] ] ] ]
sawine@11
   280
sawine@11
   281
\end{scope}
sawine@11
   282
sawine@11
   283
\draw[->](\subtreeof{root}.140) .. 
sawine@11
   284
  controls +(west:1) and +(east:1) .. (site);
sawine@11
   285
sawine@11
   286
\end{tikzpicture}
sawine@11
   287
\end{SideBySideExample}
sawine@11
   288
\end{center}
sawine@11
   289
sawine@11
   290
\noindent Another example for machine translation people:
sawine@11
   291
\begin{center}
sawine@11
   292
\fvset{formatcom=\javerbfont}
sawine@11
   293
\begin{SideBySideExample}
sawine@11
   294
\begin{tikzpicture}
sawine@11
   295
\Tree [.S [.NP [.Det \node(e1){the}; ] 
sawine@11
   296
               [.N \node(e2){cat}; ] ] 
sawine@11
   297
          [.VP [.V \node(e3){sat}; ] 
sawine@11
   298
               [.PP [.P \node(e4){on}; ] 
sawine@11
   299
                    [.NP [.Det \node(e5){the}; ] 
sawine@11
   300
                         [.N \node(e6){mat}; ] ] ] ] ]
sawine@11
   301
sawine@11
   302
\begin{scope}[yshift=-5in,grow'=up]
sawine@11
   303
\tikzset{every leaf node/.style={font=\ja}}
sawine@11
   304
\Tree [.S [.NP \node(j1){猫が}; ] 
sawine@11
   305
          [.VP [.PP [.NP [.NP \node(j2){マット}; ] 
sawine@11
   306
                         [.Part \node(j3){の}; ]
sawine@11
   307
                         [.NP \node(j4){上}; ] ] 
sawine@11
   308
                    [.P \node(j5){に}; ] ] 
sawine@11
   309
               [.V \node(j6){土}; ] ] ]
sawine@11
   310
\end{scope}
sawine@11
   311
sawine@11
   312
\begin{scope}[dashed]
sawine@11
   313
\draw (e1)--(j1);
sawine@11
   314
\draw (e2)--(j1);
sawine@11
   315
\draw (e3)..controls +(south:5) and +(north:4)..(j6);
sawine@11
   316
\draw (e4)--(j4);
sawine@11
   317
\draw (e4)--(j5);
sawine@11
   318
\draw (e5)--(j2);
sawine@11
   319
\draw (e6)--(j2);
sawine@11
   320
\end{scope}
sawine@11
   321
sawine@11
   322
\end{tikzpicture}
sawine@11
   323
\end{SideBySideExample}
sawine@11
   324
\end{center}
sawine@11
   325
sawine@11
   326
\section{Explicit edges}
sawine@11
   327
sawine@11
   328
The edge from a parent to a child node is normally automatically drawn
sawine@11
   329
for you, but you can do it yourself with an \verb|\edge| command
sawine@11
   330
\emph{before}\/ the corresponding child node. It is similar to the
sawine@11
   331
TikZ \verb|edge from parent| command.\footnote{Except that a TikZ
sawine@11
   332
\texttt{edge from parent} comes after the child node. I thought it was
sawine@11
   333
more logical to put it before.}
sawine@11
   334
\begin{quote}
sawine@11
   335
\verb|\edge [|\textit{options}\verb|];|
sawine@11
   336
\end{quote}
sawine@11
   337
Again, don't forget the semicolon. The
sawine@11
   338
\verb|[|\textit{options}\verb|]|, which are optional, let you change
sawine@11
   339
the appearance of the edge. You can also add an edge label:
sawine@11
   340
\begin{quote}
sawine@11
   341
\verb|\edge [|\textit{options}\verb|] node [|\textit{options}\verb|] {|\textit{label}\verb|};|
sawine@11
   342
\end{quote}
sawine@11
   343
Typically one will use the \verb|auto| option for edge labels, which
sawine@11
   344
places the label to the side of the edge.
sawine@11
   345
\begin{center}
sawine@11
   346
\begin{SideBySideExample}[xrightmargin=1.25in]
sawine@11
   347
\newcommand{\initial}[1]{\ensuremath{\alpha_{\textrm{\scriptsize #1}}}}
sawine@11
   348
\newcommand{\auxiliary}[1]{\ensuremath{\beta_{\textrm{\scriptsize #1}}}}
sawine@11
   349
sawine@11
   350
\begin{tikzpicture}[level distance=36pt,sibling distance=12pt]
sawine@11
   351
\Tree [.\initial{sat} 
sawine@11
   352
        \edge node[auto=right]{1}; \initial{cat} 
sawine@11
   353
        \edge[dashed] node[auto=left]{2}; 
sawine@11
   354
        [.\auxiliary{on} 
sawine@11
   355
          \edge node[auto=left]{2}; \initial{mat} ] ]
sawine@11
   356
\end{tikzpicture}
sawine@11
   357
\end{SideBySideExample}
sawine@11
   358
\end{center}
sawine@11
   359
The fact that \verb|auto=left| draws a label on the right and
sawine@11
   360
\verb|auto=right| draws a label on the left makes sense if you think
sawine@11
   361
about the tree growing from the root to the leaves.
sawine@11
   362
sawine@11
   363
There is a predefined style that draws a ``roof'' over a node, like Qtree's \verb|\qroof|:
sawine@11
   364
\begin{center}
sawine@11
   365
\begin{Example}
sawine@11
   366
\begin{tikzpicture}[level distance=36pt]
sawine@11
   367
\Tree [.S [.NP [.N this ] ] 
sawine@11
   368
          [.VP [.V is ] 
sawine@11
   369
               [.NP \edge[roof]; {a noun phrase 
sawine@11
   370
                                  the complexity of which 
sawine@11
   371
                                  is too great for me to parse} ] ] ]
sawine@11
   372
\end{tikzpicture}
sawine@11
   373
\end{Example}
sawine@11
   374
\end{center}
sawine@11
   375
sawine@11
   376
\section{Qtree compatibility}
sawine@11
   377
sawine@11
   378
For basic trees, \tikztree{} can be used as a drop-in replacement for Qtree, but most of Qtree's advanced features are either not accessed in the same way in \tikztree{} or not implemented at all. There is a package \verb|tikz-qtree-compat| which can be loaded to improve compatibility. Supported so far are:
sawine@11
   379
\begin{itemize}
sawine@11
   380
\item Superscripts and subscripts outside of math mode, and \verb|\automath|
sawine@11
   381
\item The \verb|\0|, \verb|\1|, and \verb|\2| commands, and \verb|\qtreeprimes|
sawine@11
   382
\item The \verb|\qroof| command
sawine@11
   383
\end{itemize}
sawine@11
   384
For unsupported commands, warning messages are printed, but at least your file should compile.
sawine@11
   385
sawine@11
   386
\section*{Acknowledgements}
sawine@11
   387
This was all Dan Gildea's idea. Thanks to Alan Munn for his very helpful suggestions.
sawine@11
   388
sawine@11
   389
\section*{Contact}
sawine@11
   390
Please send suggestions to \verb|chiang@isi.edu|.
sawine@11
   391
sawine@11
   392
\end{document}