5

The package gb4e is used to create linguistic examples. I have noted, however, that the vertical space set before an exe environment in gb4e is larger than the space set after it. I don't really see why this is the case - ideally they should be the same, in my view. How can I set them to be identical?

MWE:

\documentclass{article}
\usepackage{setspace,gb4e}
\doublespacing
\begin{document}
\noindent Here is a German example:
\begin{exe}
    \ex
    \gll Den Hund des Mannes\\
         the.\textsc{acc} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
It would be better to write the following:
\begin{exe}
    \ex
    \gll Der Hund des Mannes\\
    the.\textsc{nom} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
These were two great examples!
\end{document}

enter image description here


EDIT

Implementing Werner's suggestion (which works and looks great), I've noticed that I get a massive vertical space after an exe environment which I have included in a minipage (in order to be able to place two examples side by side). How can I reduce this space to the regular \topsep distance?

MWE:

\documentclass{article}
\usepackage{setspace,gb4e}
\let\oldendexe\endexe
\def\endexe{\oldendexe\vspace{\topsep}}% Add \topsep gap below exe environment
\doublespacing
\begin{document}
\noindent Here is a German example:
\begin{exe}
    \ex
    \gll Den Hund des Mannes\\
    the.\textsc{acc} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
It would be better to write the following:
\begin{exe}
    \ex
    \gll Der Hund des Mannes\\
    the.\textsc{nom} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
These were two great examples! Below are some examples of German verbs and nouns.

\begin{table}[ht]
\begin{minipage}[t]{0.5\linewidth}
\doublespacing
\begin{exe}
    \ex
        \begin{tabular}[t]{l l}
            \multicolumn{2}{c}{Verbs}\\
            \textit{leben} & `live'\\
            \textit{haben} & `have'\\
            \textit{sehen} & `see'\\
        \end{tabular}
\end{exe}
\end{minipage}
\begin{minipage}[t]{0.5\linewidth}
\doublespacing
\begin{exe}
    \ex
        \begin{tabular}[t]{l l}
            \multicolumn{2}{c}{Nouns}\\
            \textit{Erde} & `earth'\\
            \textit{Hand} & `hand'\\
            \textit{Haus} & `house'\\
        \end{tabular}
\end{exe}
\end{minipage}
\end{table}
Aren't German words cool?
\end{document}

enter image description here

2
  • 1
    Don't place the items in a table (float) environment, since it necessary adds a vertical space of \intextsep above/below for floating purposes. See Space after float with [h] for some discussion on this. Also (but not a problem here) you have a too-wide block since there's a spurious space after the first minipage. Use \end{minipage}%.
    – Werner
    Oct 2, 2013 at 21:27
  • That took care of it! I had copied the code from an example that needed to be a float (because it was very large).
    – Sverre
    Oct 3, 2013 at 11:51

1 Answer 1

4

The exe environment merely sets a list, which usually starts with \topsep. You can add this to \endexe:

enter image description here

\documentclass{article}
\usepackage{setspace,gb4e}% http://ctan.org/pkg/{setspace,gb4e}
\let\oldendexe\endexe
\def\endexe{\oldendexe\vspace{\topsep}}% Add \topsep gap below exe environment
\doublespacing
\begin{document}
\noindent Here is a German example:
\begin{exe}
    \ex
    \gll Den Hund des Mannes\\
    the.\textsc{acc} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
It would be better to write the following:
\begin{exe}
    \ex
    \gll Der Hund des Mannes\\
    the.\textsc{nom} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
These were two great examples!
\end{document}
1
  • Your suggestion works great. However, it leads to another problem -- please see my updated question.
    – Sverre
    Oct 2, 2013 at 19:13

You must log in to answer this question.

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