4

Part of my data is verse text which I'd prefer to gloss line by line. I toyed with this setup (MWE):

\documentclass{article}
\usepackage{gb4e}

\begin{document}

\begin{exe}
\ex \gll der wídem vnd der zehent gar. \\
        of endowments and of tithe even \\
    \gll wærn \textbf{baidev} \textbf{warn} bar. \\
        would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
    \trans `the children would be bereft of endowments and thithes'
\end{exe}

\end{document}

This produces a line-by-line gloss as desired, however, the space between the \gll's and before \trans may stretch to stupid lengths—like about 10 mm. Is there a convenient way to keep vertical space between the elements reasonable, say, fix it at .5\baselineskip, without plastering examples with \vspace{-somevalue} manually? My current document setup already has

\renewcommand{\eachwordtwo}{\rule[-.5\baselineskip]{0pt}{0pt}}

to increase the space between glosses comprising multiple lines of running text.


EDIT

The most relevant actual settings as requested by @gernot. I tracked my problem down to the enumitem package preventing the manipulation of whitespace in the exe environment:

\documentclass{memoir}

\usepackage{enumitem}
\usepackage{gb4e}

\begin{document}
\OnehalfSpacing

\begin{exe}
\topsep=0pt
\partopsep=0pt
\ex \gll der wídem vnd der zehent gar. \\
        of endowments and of tithe even \\
    \gll wærn \textbf{baidev} \textbf{warn} bar. \\
        would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
    \trans `the children would be bereft of endowments and thithes'
\end{exe}

\end{document}

With enumitem: With enumitem loaded

Without enumitem: enter image description here

1
  • Off topic: I believe the spelling of the last word should be "tithes", not "thithes". Commented Aug 22, 2021 at 20:54

1 Answer 1

4

If you want to have control over the line breaks by using several \glls in a row, define an environment compactexe as follows (to be put into the preamble) and use it instead of the exe environment.

\makeatletter
\newenvironment{compactexe}{%
  \begin{exe}%
    \topsep=0pt% if package enumitem is not used
    \partopsep=0pt% if package enumitem is not used
    % Otherwise, if package enumitem is used:
    \expandafter\def\expandafter\@listi\expandafter{%
      \@listi
      \topsep=0pt
    }%
}{%
  \end{exe}%
}
\makeatother

If you don't care for the line breaks, use just a single \gll followed by the complete first line, \\, the complete second line, and another \\. The package will introduce line breaks as needed.

In the example below, both versions are illustrated.

enter image description here

\documentclass{memoir}
\usepackage{enumitem}
\usepackage{gb4e}
\makeatletter
\newenvironment{compactexe}{%
  \begin{exe}%
    \topsep=0pt% if package enumitem is not used
    \partopsep=0pt% if package enumitem is not used
    % Otherwise, if package enumitem is used:
    \expandafter\def\expandafter\@listi\expandafter{%
      \@listi
      \topsep=0pt
    }%
}{%
  \end{exe}%
}
\makeatother
\begin{document}

\begin{compactexe}
\ex \gll der wídem vnd der zehent gar. \\
        of endowments and of tithe even \\
    \gll wærn \textbf{baidev} \textbf{warn} bar. \\
        would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
    \trans `the children would be bereft of endowments and thithes'
\end{compactexe}

\begin{exe}
\ex \gll der wídem vnd der zehent gar. wærn \textbf{baidev} \textbf{warn} bar.\\
        of endowments and of tithe even 
        would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
    \trans `the children would be bereft of endowments and thithes'
\end{exe}

\end{document}
7
  • Yes, but even with the settings in the compactexe wrapper there may be a lot of whitespace introduced between lines by default: i.imgur.com/zB8KqPE.png. Since gb4e is essentially manipulating a list construct, I guess one might also want to set \itemsep. I'm getting OK-ish results setting negative values for the lenths, but some examples are still fairly widely spaced.
    – Jipí
    Commented Aug 21, 2021 at 18:54
  • @Jipí Negative values sound like a hack. You can try to set also \itemsep, \parskip and \parsep to 0pt. You can also try to add \raggedbottom. To be able to analyze the problem, you would have to post an example showing the issue.
    – gernot
    Commented Aug 21, 2021 at 19:02
  • I've just tested with my MWE demo document and what you propose seems to work there even when filling up the page with dummy text. Thing is, I'm using memoir for the actual thesis manuscript with one-half spacing, so that may have an adverse effect. Gotta look into that or just live with running lines of verse.
    – Jipí
    Commented Aug 21, 2021 at 19:13
  • @Jipí ... or you could post a MWE with your real settings, like document class. It is all about finding the right glue between the lines that may stretch with flush buttom. Seems doable ...
    – gernot
    Commented Aug 21, 2021 at 19:55
  • Alright, I edited my question. See the edit below the horizontal rule. A little try and error revealed that the problem is due to the presence of the enumitem package.
    – Jipí
    Commented Aug 22, 2021 at 12:09

You must log in to answer this question.

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