%%
%% Test file for linguistics macros
 
\documentclass[12pt]{article}
\usepackage{robmacs}

\begin{document}

This file shows how some of my linguistics macros work.  Here's a numbered
example:
\begin{enum}[ex1]
Here's a numbered example.
\end{enum}
We can refer to that example as \exref{ex1}.  We can also refer to
subexamples:
\begin{eenum}[ex2]
\item Here are\ldots
\item \ldots a bunch of\ldots
\item \ldots examples.
\end{eenum}
In \exref{ex2}, we have \exref[a]{ex2}, \exref[b]{ex2}, and \exref[c]{ex2}.
We can also have example that don't ever get referred to:
\begin{enum}
Who cares?
\end{enum}

Examples can also consist of trees:
\begin{eenum}
\item
\begin{tree}
\br{NP}{\br{NP$_i$}{\tlf{Pat('s)}}
        \br{N$'$}{\br{N}{\lf{ING}}
                  \br{VP}{\br{VP}{\br{AdvP}{\lf{not}}
                                  \br{VP}{\br{NP$_i$}{\lf{PRO}}
                                          \br{V$'$}{\br{V}{\lf{being}}
                                                    \br{AdjP}{\lf{happy}}}}}
                          \br{AdvP}{\tlf{for\ldots}}}}}
\end{tree}
\item
\begin{tree}
\br{NP}{\br{NP$_i$}{\tlf{Pat('s)}}
        \br{N$'$}{\br{N}{\lf{ING}}
                  \br{VP}{\br{AdvP}{\lf{not}}
                          \br{VP}{\br{VP}{\br{NP$_i$}{\lf{PRO}}
                                          \br{V$'$}{\br{V}{\lf{being}}
                                                    \br{AdjP}{\lf{happy}}}}
                                  \br{AdvP}{\tlf{for\ldots}}}}}}
\end{tree}
\end{eenum}
or AVMs:
\begin{enum}
\begin{avm}
\[ \emph{word}\\
   PHON & \q<\emph{book}\q>\\
   SYNSEM\|LOCAL & \[ CAT & \[ HEAD & \[ \emph{noun}\\
                                         CASE & \emph{case}\\
                                      \]\\
                               VALENCE & \[ SUBJ \q<\ \q>\\
                                            COMPS \q<\ \q>\\
                                            SPR \q<\ DetP \q>\\
                                         \]
                            \]\\
                      CONT & \[ \emph{book-rel}\\
                                INST & \emph{3sg}
                             \]
                   \]
\] 
\end{avm}
\end{enum}
or even trees of AVMs:
\begin{enum}
% The example number would normally get aligned with the middle of the top
% node in the tree.  By putting the tree (or anything else) inside \evnup, we
% get the example number lined up with the top of the tree.
%
% We want the tags numbered consecutively starting from one in each example.
% If we left out \resettags, the tag numbering would continue from the
% previous example.
\evnup{\begin{avmtree}\resettags
\br{\[ \emph{nonfin-head-subj-cx}\\
       CAT \[ HEAD & \tag{head}\\
              VAL & \[ SUBJ & \q<\ \q>\\
                       COMPS & \q<\ \q>\\
                       SPR & \q<\tag{s}\q>
                    \]
           \]
    \]}
    {\br{\tag{s}\[ CAT\|HEAD & \[ \emph{noun}\\
                                  CASE \emph{acc}
                               \]
                \]}
        {\lf{Pat}}
     \br{\[ \emph{head-comp-cx}\\
            CAT \[ HEAD & \tag{head}\\
                   VAL & \[ SUBJ & \q<\tag{s}\q>\\
                            COMPS & \q<\ \q>\\
                            SPR & \q<\tag{s}\q>
                         \]
                \]
         \]}          
        {\br{\[ CAT \[ HEAD & \tag{head}\emph{gerund}\\
                       VAL & \[ SUBJ & \q<\tag{s}\q>\\
                                COMPS & \q<\tag{ns}\q>\\
                                SPR & \q<\tag{s}\q>
                             \]
                    \]
             \]}
            {\lf{folding}}
         \br{\tag{ns}\[ CAT\|HEAD \emph{noun} \]}
            {\lf{the napkins}}}}
\end{avmtree}}
\end{enum}
You need to run \LaTeX\ on the file twice to get trees to come out right.  

Here's a glossed example:
\begin{enum}
\gll nahotv$_i$ [ ne' thikv $t_i$ ] sa- hnoskwa- hnut- e'\\
     what {} \f{ne} that {} {} \f{2sO}- cheek- {be full in cheek}- \f{punc}\\
\glt `What is that you have in your cheek?' \shove{\cite[77]{bear-fox}}
\end{enum}
and here's a fancier one:
\begin{enum}
\glll kunngip panippassuaqarpoq\\
      kunngi-p panik-passuaq-qar-poq\\
      king-\f{erg} daughter-many-have-\f{indic/3s}\\
\glt `There are many king's daughters (i.e., princesses).' 
\shove{\cite[96]{Sadock91}}
\end{enum}



\end{document}