[Tex/LaTex] How to indent the second line of a linguistic gloss with gb4e.sty

expexformattinggb4eindentationlinguistics

In accordance with the documentation, I've been happily plodding along making interlinear glosses. So far so good! But things get ugly when I make a longer gloss.

Looking at example (5) on page (6) in the documentation here:
http://ftp.snt.utwente.nl/pub/software/tex/macros/latex/contrib/gb4e/gb4e-doc.pdf

\begin{exe}
\ex
\gll Wenn jemand in die W\"uste zieht ... \\
If someone in the desert draws and lives ... \\
\trans `if one retreats to the desert and ... '
\end{exe}

I wonder if there's a way to insert a line or indent between the long run-on lines to help make them easier to read and less like a block of text.

Any ideas would be appreciated!

Best Answer

A manual solution

The cgloss4e package (which is loaded by both gb4e and linguex to format glossed examples) provides very little customization options for the gloss spacing. If you only have a relatively small set of examples which will need extra formatting, it's possible to do it by splitting up the examples manually. It's not an ideal solution, but it is usable on an occasional basis. Here's an example:

\documentclass{article}
\usepackage{gb4e}
\usepackage{setspace}
\begin{document}
\begin{exe}
\ex[*]{ \gll {a delak }  {a uleker} er ngak el kmo ng-ngerai {a sensei}   {a milskak}\\
mother-my   asked P  me L Comp   CL-what teacher     gave \\}

\sn[]{\gll  {a buk} me   {a Toki} {a ulterur} \emph{e}_{i} er  ngak \\
   book and  Toki  sold {} P me\\
\trans `My mother asked me what the teacher gave me a book and Toki sold me`}
\end{exe}
\end{document}

output of gb4e code Here I've split the example into two parts and used the \sn macro (which is a numberless version of \ex to introduce the second line.

An automatic solution

If you routinely work with complex glossed examples, then you may want to consider switching to the very powerful ExPex package. It provides extensive methods for formatting glossed examples (and examples generally) and is highly customizable. Here is the same example glossed using this package.

\documentclass{article}
\usepackage{expex}
\begin{document}
\lingset{glhangindent=2em} % adjust as necessary

An example with a hanging indent for subsequent gloss lines (default).
\ex
\begingl
\gla{a delak }  {a uleker} er ngak el kmo ng-ngerai {a sensei}   {a milskak}  {a buk} me   {a Toki} {a ulterur} \emph{e}$_{i}$ er  ngak //
\glb mother-my   asked P  me L Comp   CL-what teacher     gave    book and  Toki  sold {} P me //
\glft `My mother asked me what the teacher gave me a book and Toki sold me`//
\endgl
\xe

An example with an explicit break (signified in the first line by ``+'')
\ex
\begingl
\gla{a delak }  {a uleker} er ngak el kmo ng-ngerai {a sensei} +   {a milskak}  {a buk} me   {a Toki} {a ulterur} \emph{e}$_{i}$ er  ngak //
\glb mother-my   asked P  me L Comp   CL-what teacher      gave    book and  Toki  sold {} P me //
\glft `My mother asked me what the teacher gave me a book and Toki sold me`//
\endgl
\xe


\end{document}

In the first example I've used the regular hanging indent to separate subsequent lines of the glosses. In the second example, I've marked an explicit break in the example itself (the gloss then lines up automatically based on that break.)

output of ExPex code

Related Question