# Conflict between gb4e and standalone

Using an \exe environment in a document with the class ‘standalone’ is problematic for me. Here’s a MWE:

\documentclass[12pt]{standalone}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex German:
\gll Dies ist    ein            Test. \\
This be.3SG INDEF.M.SG.NOM test. \\
\glt “This is a test.”
\end{exe}
\end{document}


What happens is that I always get errors of the following kind:

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.8     \ex G
erman:


Using \documentclass{article}, this code compiles without problems. It seems that standalone has a problem with the way gb4e uses lists to handle the individual rows in interlinear glosses?

The output should be a PDF/PNG file that looks like this:

Use either preview or varwidth option.

\documentclass[12pt,varwidth,border=3]{standalone}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex German:
\gll Dies ist    ein            Test. \\
This be.3SG INDEF.M.SG.NOM test. \\
\glt “This is a test.”
\end{exe}
\end{document}


• Can someone explain why this works? – Azor Ahai Apr 25 '17 at 17:42