6

I am using gb4e for several hundred interlinear glosses in my dissertation. Several of the examples span more than one page, that is, the vernacular and gloss will be on one page, while the free translation appears at the top of the next page.

How can I keep all three elements together on the same page? I often have subexamples (a, b, c) that don't need to stay together. That is, 1a can be on one page, and 1b on the next, as long as vernacular-gloss-free translation for each subpart stay together.

In the MWE below, the free translation is at the top of page 2, while the vernacular and gloss are at the bottom of page 1.

\documentclass[11pt,letterpaper]{article}
\usepackage{lipsum}
\usepackage{gb4e}
\noautomath
\begin{document}
\lipsum[1-4]
\begin{exe}
    \ex \gll wuz x̃ũch it-ak xohish-em\\
             1\textsc{sg.prn} bread eat-\textsc{inf} want.\textsc{prs}-1\textsc{sg}\\
        \glt `I want to eat bread.' 
\end{exe}
\end{document}

A solution was proposed to a similar question (Prevent page break after first line of example), but it requires me to manually look for what could be dozens of orphans throughout my dissertation (and doesn't work when applied to my example, since it still strands the FT). I would prefer a more elegant solution that takes care of the problem automatically.

  • This is probably the same problem as asked about here. – Sverre Oct 28 '14 at 12:17
  • 1
    @Sverre, thanks for the suggestion. Unfortunately cgloss doesn't fix the problem (I still have orphans) in this case. It also introduces another problem: my dissertation is double-spaced, and cgloss keeps a double space between the vernacular and the gloss, but it remain single-spaced between the gloss and the free translation. – ToddAO Oct 29 '14 at 2:18
  • This is interesting, because cgloss explicitly states: Modified \glt to keep translation on the same page as the text. I don't have a solution, but it would perhaps be a good idea to e-mail the author of cgloss with a MWE illustrating this problem. – Sverre Oct 29 '14 at 12:43
  • 1
    I switched from gb4e to expex a few years ago because it always keeps gloss lines together, gives you the option of "preamble" lines, and allows for much more fine-grained control over formatting. I realize that deciding to switch packages would likely need to wait until after you finish your dissertation (converting examples between the two isn't horrible but it's not trivial either), but it still might be something to look into. – Jason Zentz Nov 9 '14 at 1:28
4
+50

\glt is a very simple macro and it seems you can add \nobreak and it works in this case at least...

\documentclass[11pt,letterpaper]{article}
\usepackage{lipsum}
\usepackage{gb4e}
\def\glt{\nobreak\vskip.17\baselineskip}
\noautomath
\begin{document}
\lipsum[1-4]
\begin{exe}
    \ex \gll wuz x̃ũch it-ak xohish-em\\
             1\textsc{sg.prn} bread eat-\textsc{inf} want.\textsc{prs}-1\textsc{sg}\\
        \glt `I want to eat bread.' 
\end{exe}
\end{document}
3

Here is a different solution that works for both gb4e and linguex (which doesn't require the use of the \glt macro to introduce the translation line):

With gb4e

\documentclass[11pt,letterpaper]{article}
\usepackage{lipsum}
\usepackage{etoolbox}
\usepackage{gb4e}
\makeatletter
\apptocmd{\gl@stop}{\nobreak}{}{}
\makeatother
\noautomath
\begin{document}
\lipsum[1-4]
\begin{exe}
\ex
\begin{xlist}
    \ex \gll wuz x̃ũch it-ak xohish-em\\
             1\textsc{sg.prn} bread eat-\textsc{inf} want.\textsc{prs}-1\textsc{sg}\\
        \glt `I want to eat bread.'
    \ex This is another example. 
\end{xlist}
\end{exe}
\end{document}

With linguex

\documentclass[11pt,letterpaper]{article}
\usepackage{lipsum}
\usepackage{etoolbox}
\usepackage{linguex}
\makeatletter
\apptocmd{\gl@stop}{\nobreak}{}{}
\makeatother
\begin{document}
\lipsum[1-4]
\exg. wuz x̃ũch it-ak xohish-em\\
         1\textsc{sg.prn} bread eat-\textsc{inf} want.\textsc{prs}-1\textsc{sg}\\
          `I want to eat bread.'

\ex.    This is another example.

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.