3

I'm trying to condense the space around examples in gb4e, with the goal of removing unnecessary whitespace around examples in an abstract. Here's what gb4e gives me now:

gb4e default spacing

What I'd like is for the examples to essentially look like part of the running text, as follows:

enter image description here

In sum, I'd like to remove the left indent before the top level item numbers, remove the vertical space between examples, and remove the vertical space above and below the exe environment.

I think \vspace commands might work here, but it would get very tedious to do this every time, and I'd also like to do it the 'right' way.

(I also think linguex might be able to do this without too much fuss, but I'm used to using gb4e so I'd prefer to stick with it if there's a way to do this.)

MWE:

\documentclass{article}

\usepackage{gb4e}
\usepackage{lipsum}

\begin{document}
    \lipsum[1]
    \begin{exe}
        \ex Blah \begin{xlist}
            \ex Blah
            \ex Blah
        \end{xlist}
        \ex Blah
        \ex Blah
    \end{exe}
    \lipsum[1]
\end{document}
1
  • 1
    I've updated the code slightly. There was one spacing parameter that I left out, which interacted with examples with grammaticality judgements.
    – Alan Munn
    May 17, 2018 at 13:40

1 Answer 1

5

The gb4e package isn't really designed to be customizable in this way, but it's not to hard to fix as a one time thing:

\documentclass{article}
\usepackage{etoolbox}
\usepackage{gb4e}
\makeatletter
\renewcommand{\@subex}[2]{\settowidth{\labelwidth}{#1}\itemindent\z@\labelsep#2%
         \topsep0\p@\itemsep0\p@%
         \parsep\p@\partopsep0\p@%
         \leftmargin\labelwidth%
         \ifnum\the\@xnumdepth=1
         \else\advance\leftmargin#2\relax\fi}
\makeatother
\usepackage{lipsum}
\begin{document}
\lipsum[1]
    \begin{exe}
        \ex Blah \begin{xlist}
            \ex Blah
            \ex Blah
        \end{xlist}
        \ex Blah
        \ex Blah
    \end{exe}
    \lipsum[1]
\end{document}

output of code

Adjusting the left margin alone

If you just want to adjust the left margin, but leave the interline spacing the same then use the following redefinition:

\renewcommand{\@subex}[2]{\settowidth{\labelwidth}{#1}\itemindent\z@\labelsep#2%
         \ifnum\the\@xnumdepth=1%
           \topsep 7\p@ plus2\p@ minus3\p@\itemsep3\p@ plus2\p@\else%
           \topsep1.5\p@ plus\p@\itemsep1.5\p@ plus\p@%
           \parsep\p@ plus.5\p@ minus.5\p@%
           \advance\leftmargin#2\relax\fi}

You must log in to answer this question.

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