3

I am using gb4e.sty to provide inter-linear language glossing. This works well, but I want to get wider spacing between lines when sentences have 2 or more lines like this; screenshot_gb4e

Here is my source code:

\documentclass{article}
\usepackage{times}
\usepackage{gb4e}
\noautomath
\let\eachwordone\it
\setlength{\glossglue}{10pt plus 2pt minus 1pt}

\begin{document}
\begin{exe}
\ex
\gll mukasi monosugoka jii atama=no an wanrjoku=no an samurai=ga utan=bee=cjo\\
old.days very good head=NOM exist strength=NOM exist samurai=NOM existed=HSY=ASS\\
\trans `Once upon a time, there was a samurai with a smart brain and strength.'
\end{exe}
\end{document}

Does anyone have a solution to this problem?

2 Answers 2

5

You can redefine \eachwordtwo to include more space. If that leaves too much space between the free translation and the gloss line, you can redefine \trans to have a small negative \vspace{}. If you have three line glosses, you need to redefine \eachwordthree.

I've made some corrections to your document: the times package is deprecated, and you shouldn't use it. Instead use newtxtext and newtxmath. Also, two letter font changing commands are also deprecated, and you should use their proper replacements (in this case \itshape).

\documentclass{article}
\usepackage{newtxtext}
\usepackage{gb4e}
\noautomath
\setlength{\glossglue}{10pt plus 2pt minus 1pt}
\renewcommand{\eachwordtwo}{\rule[-10pt]{0pt}{0pt}\itshape}
\begin{document}
\begin{exe}
\ex
\gll mukasi monosugoka jii atama=no an wanrjoku=no an samurai=ga utan=bee=cjo\\
old.days very good head=NOM exist strength=NOM exist samurai=NOM existed=HSY=ASS\\
\trans `Once upon a time, there was a samurai with a smart brain and strength.'
\end{exe}
\end{document}

output of code

2
  • Could you please explain why \rule[-10pt] has this effect? I don't understand how the tweak works. Jan 17, 2023 at 20:57
  • 1
    @VincentKrebs The \rule macro takes 2 obligatory arguments (a width and a height) and an optional depth argument (relative to the baseline). When the depth argument is negative that has the effect of lowering the rule below the baseline. So in this case we can add more space by adding a negative depth rule with zero height and zero width.
    – Alan Munn
    Jan 17, 2023 at 21:48
1

Would switching to a different gloss package be an option? In general, expex gives much better control over spacing and formatting than gb4e, and the extraglskip parameter in that package does exactly what you're asking for.

1
  • Thank you for yout help, Leah! My problem has solved. expex.sty is customizable and works well than gb4e.sty so far.
    – Kato Kanji
    Oct 23, 2017 at 16:29

You must log in to answer this question.

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