Linguex and LFG f-structures (avms)

I am trying to put my LFG f-structures into numbered example environments. I had no problem when I was using Covington, but now that I have switched to linguex, my avms all fail to line up, and if I put it in the \ex. environment, it gives error messages for every &.

MWE:

\documentclass[12pt]{report}
\title{Grr}
\bibliographystyle{apa}

\usepackage{avm}
\usepackage{linguex}
\usepackage{covington}

\begin{document}
\ex. \label{FtransProp}
\begin{avm}
[   pred  & hammer < (subj) , (obj) , (xcomp) >'     \\
tense &  past                \\
subj  &  [ pred & kim']  \\
obj   &  @1 [ pred & metal'\\
def &   + ] \\
xcomp  & [ pred & flat < (subj) >'  \\
subj   &  @1] ]
\end{avm}
\end{document}


This code gives me an error for every &, but it does print something out. When the example is changed to the covington examples environment, I don't get the errors, but the avm is still wrong. (code for sub around the avm above)

\begin{examples}
\item \label{FtransProp}
\begin{avm}
[   pred  & hammer < (subj) , (obj) , (xcomp) >'     \\
tense &  past                \\
subj  &  [ pred & kim']  \\
obj   &  @1 [ pred & metal'\\
def &   + ] \\
xcomp  & [ pred & flat < (subj) >'  \\
subj   &  @1] ]
\end{avm}
\end{examples}


I did update my avm.sty from Chris Manning's page, as per instructions from another post, but I'm now at a loss as to where to go next.

• Your example doesn't compile for me even with the linguex package and code removed. Feb 25, 2015 at 21:16
• I forgot to include \avmoptions{active} above \begin{document}. But, by turning off the active option, and putting in the \ before the brackets and @ again, it works now. Feb 27, 2015 at 14:41

The problem has nothing to do with linguex, but with your avm syntax. The square brackets in an avm must be introduced with a backslash. If I fix all the brackets in your example, it works perfectly. The same goes for the @ character: in order to use it to make boxed numbers, it must also be introduced with a backslash.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{avm}
\usepackage{linguex}

\begin{document}
\ex. \label{FtransProp}
\begin{avm}
$pred & hammer < (subj) , (obj) , (xcomp) >' \\ tense & past \\ subj & \[ pred & kim'$  \\
obj   &  \@1 $pred & metal'\\ def & +$ \\
xcomp  & $pred & flat < (subj) >' \\ subj & \@1$ \]
\end{avm}

\end{document}