# Incompatibilty between siuintx and linguex?

\documentclass{article}
\usepackage{linguex}
\usepackage{siunitx}
\begin{document}
Foo
\end{document}


This MWE produces a plethora of error messages, regardless of the order in which those two packages are loaded. It starts out with:

! Use of \fg doesn't match its definition.
\exp_not:V ...numeral:D \__exp_eval_register:N #1}

l.4 \begin{document}

! Argument of \@firstofone has an extra }.
<inserted text>
\par
l.6 \end{document}

! Paragraph ended before \@firstofone was complete.
\par
l.6 \end{document}


And then many of these follow:

! Undefined control sequence.
\GenericError  ...
#4  \errhelp \@err@     ...
l.18 \DeclareSIUnit
\A  {        \ampere }


While this eventually looks like something that needs to be fixed in one of these packages, I would be grateful for a temporary fix.

I'm using an up-to-date MiKTeX 2.9, but compiling the MWE on writeLaTeX produces errors as well, and I think that tool uses TeX Live.

-

linguex defines a command \bg. to introduce glosses. It also creates aliases to this command \cg., \dg., \eg. and \fg.. The \fg. command conflicts with SIUnitx, which defines \fg as femtogram. The simple solution is to load linguex and then redefine \fg. to nothing, and then load siunitx. Since the \fg. command isn't necessary in linguex (and isn't even really documented), it's an easily worked around problem, and not really a bug, since both are end user commands.

\documentclass{article}

\usepackage{linguex}
\def\fg{}
\usepackage{siunitx}

\begin{document}
Foo
\end{document}

-