2

I'm writing a linguistics thesis using LaTex and having trouble with glossed examples.

I'd like to add glossed examples of poetic texts with line breaks at specific points, which should look like this:

enter image description here

And I'm unable to figure out how to do so with linguex.

If I try to put it this way:

\exg. Lorem ipsum dolor sit amet, \\
aaaa bbbb cccc dddd eeee\\
consectetur adipiscing elit, \\
ffff gggg hhhh\\
sed do eiusmod tempor\\
iiii jjjj kkkk llll\\

It would look like this: enter image description here

As you can see, only the first verse shows up properly, and the gloss gets misaligned from the second verse on.

Is there a way to insert line breaks without causing this misalignment? One thing I might be able to do would be to manually add \hspace[??mm] at the end of each word/gloss so that they will be aligned throughout the example——would that be the only solution?

If possible, I'd like to avoid using packages other than linguex (as only one of my many chapters requires this, and I've already written my other chapters using linguex without any problems).

I'm very new to LaTex and any advice would be highly appreciated.

2
  • Welcome to tex.sx. Aug 15 at 18:10
  • 2
    Welcome to TeX.se. This is not trivial to do with linguex because it has no concept of a numberless example. It's easy to do in gb4e.
    – Alan Munn
    Aug 15 at 19:07

1 Answer 1

2

The following uses a new experimental package that I wrote a number of years ago, but never released. It is now (August, 2023) available on CTAN, and if you have current TeXLive or MikTeX distribution you should be able to update it to install. If you're using Overleaf or an older TeX distribution you will need install the package yourself.

The expex-glossonly package allows gb4e, linguex and covington users to take advantage of the powerful glossing facilities of the ExPex package. It simply patches some of the ExPex code so that you can insert ExPex glosses into your regular gb4e, linguex or covington examples. The package does not remove any of the regular glossing functionality of those packages, but simply allows you to also use ExPex glossing macros.

ExPex allows you to insert a + to split a glossed example. So we can use the ExPex glossing macros to achieve the goal that you have.

The expex-glossonly package must be loaded instead of gb4e, linguex or covington and the example package you are using given as a package option. You will need to read the ExPex documentation for details on how the ExPex glossing macros work (sections 9-12 of the ExPex manual). One obvious difference is that ExPex uses // instead of \\ as the line delimiter in the glossing environment. It's also written with plain TeX users in mind, and so doesn't use the LaTeX \begin{...} ... \end{...} syntax for the glossing environment. But since the package doesn't affect any of the existing code from the other packages, you can use the ExPex form very selectively.

\documentclass{article}
\usepackage[linguex]{expex-glossonly}

\lingset{
    glhangstyle=none % comment this out if you like a hanging indent in the split lines
}

\begin{document}
\ex.
\begingl
\gla This is a long example + that should be broken + into three lines//
\glb This is a long example that should be broken into three lines//
\glft `This is the translation line'//
\endgl

\end{document}

output of code

You must log in to answer this question.

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