5

I am required to use amsbook for a project, but I find that it messed up the alignment of interlinear glosses with the gb4e package. Here's my code:

\documentclass{amsbook}
\usepackage{gb4e} 

\begin{document}
\begin{exe}
    \ex 
    \gll nya te ma\\
    small one PL\\
    \glt `little ones'\\
\end{exe}
\end{document}

The output looks like this:

Misaligned gloss

The third line should be left-aligned with the first two lines. How can I fix this without ruining indentation in other places in the document?

1 Answer 1

3

The amsbook class wants to keep the value of \parindent inside lists, so it sets \listparindent to \normalparindent. Set this one to zero inside exe, because exe expects \listparindent to be zero.

\documentclass{amsbook}
\usepackage{gb4e}

\AddToHook{env/exe/begin}{\setlength{\normalparindent}{0pt}}

\begin{document}

\begin{exe}
    \ex
    \gll nya te ma\\
    small one PL\\
    \glt `little ones'
\end{exe}

\end{document}

enter image description here

You don't want \\ at the end.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .