1

I have a running series of parboxes that contain interlinear glosses. Because of the parbox (and the gloss), there is no breaking across pages. As a result, the parboxes are evenly distributed vertically on the page. I do not want distribution like this. Instead, I want the parboxes to have a pre-defined space in between each one so that any remaining white space will accumulate at the bottom of the page (instead of in between parboxes). See below for a pictorial description of what I want.

EDIT: To clarify, I want consistent spacing between parboxes throughout the document (not just on a single page as per \raggedbottom), and I want to be able to dictate what that space is.

enter image description here MWE:

\documentclass{book}
\usepackage{microtype}
\usepackage{expex}

\lingset{
    everygla=\large,
    everyglb=\scriptsize,
    everyglc=\scriptsize,
    glwordalign=center,
    glhangindent=0em,
    glrightskip=0pt,
    aboveglbskip=-0.9ex,
    aboveglcskip=-0.9ex
}

\definelingstyle{justified}{glrightskip=0pt,glspace=0.5em plus 3em minus 0.15em,everyglft=\justifying\noindent}

\usepackage{ifoddpage}

\newcommand{\swapboxes}[2]% #1 = wide text, #2 = narrow text
{\noindent\makebox[\textwidth]{\checkoddpage
 \ifoddpageoroneside
   \parbox[t]{.71\textwidth}{#1}\hfill\parbox[t]{.26\textwidth}{#2}%
 \else
   \parbox[t]{.26\textwidth}{#2}\hfill\parbox[t]{.71\textwidth}{#1}%
 \fi}}

\begin{document}

\swapboxes{\exdisplay\begingl
  \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

  \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccccccccc dddd eeee ffff gggg hhhh //

  \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

\endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\swapboxes{\exdisplay\begingl
  \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

  \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

  \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

\endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\swapboxes{\exdisplay\begingl
  \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

  \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccccccccc dddd eeee ffff gggg hhhh //

  \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

\endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\swapboxes{\exdisplay\begingl
  \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

  \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

  \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

\endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\swapboxes{\exdisplay\begingl
  \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

  \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

  \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

\endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\swapboxes{\exdisplay\begingl
  \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

  \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

  \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

\endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\end{document}

I saw this Q&A but didn't find it helpful in my case (or I just didn't understand it well enough).

2
  • 1
    Try using the \raggedbottom directive in your preamble.
    – Bernard
    Mar 8, 2017 at 1:16
  • What if I want tighter spacing than what \raggedbottom provides?
    – AML
    Mar 8, 2017 at 1:58

1 Answer 1

3

Together with \raggedbottom, you may use \setlength{\parskip}{...} to adjust the height between paragraphs as you like.

\documentclass{book}
\usepackage{microtype}
\usepackage{expex}
\raggedbottom
\setlength{\parskip}{-.7\baselineskip}% you can adjust the height as you prefer

\lingset{
    everygla=\large,
    everyglb=\scriptsize,
    everyglc=\scriptsize,
    glwordalign=center,
    glhangindent=0em,
    glrightskip=0pt,
    aboveglbskip=-0.9ex,
    aboveglcskip=-0.9ex
}

\definelingstyle{justified}{glrightskip=0pt,glspace=0.5em plus 3em minus 0.15em,everyglft=\justifying\noindent}

\usepackage{ifoddpage}

\newcommand{\swapboxes}[2]% #1 = wide text, #2 = narrow text
{\noindent\makebox[\textwidth]{\checkoddpage
        \ifoddpageoroneside
        \parbox[t]{.71\textwidth}{#1}\hfill\parbox[t]{.26\textwidth}{#2}%
        \else
        \parbox[t]{.26\textwidth}{#2}\hfill\parbox[t]{.71\textwidth}{#1}%
        \fi}}

\begin{document}

    \swapboxes{\exdisplay\begingl
        \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

        \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccccccccc dddd eeee ffff gggg hhhh //

        \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

    \swapboxes{\exdisplay\begingl
        \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

        \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

    \swapboxes{\exdisplay\begingl
        \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

        \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccccccccc dddd eeee ffff gggg hhhh //

        \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

    \swapboxes{\exdisplay\begingl
        \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

        \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

    \swapboxes{\exdisplay\begingl
        \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

        \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

    \swapboxes{\exdisplay\begingl
        \gla Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. Some non lipsum text to fill the gloss. //

        \glb aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \glc aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh aaaa bbbb cccc dddd eeee ffff gggg hhhh //

        \endgl\xe}{\exdisplay\footnotesize{Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification. Some text to demonstrate justification.} \xe}

\end{document}

enter image description here

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.