I have set up a layout using paracol
with expex
glosses in one column and regular text in the other column directly across.
At the page break of the MWE below, you can see that the regular-text column does not stay in alignment with the gloss. I have even added and adjusted a special strut
just for that final paragraph but to no avail (if you adjust the strut so that the regular text moves over to the next page, then it does not come close to aligning properly). Most of the time, the gloss page breaks work just fine, but special cases like this do happen regularly over a long document.
How can the code be adjusted to yield proper alignment, even when this happens at a page break in the middle of a document?
Note: you must use the latest expex
package for the glbreaking
feature to work.
MWE (XeTeX):
\documentclass{book}
\usepackage{microtype}
\usepackage[
paperwidth=7.5in,
paperheight=9.25in,
inner=0.5in,
outer=0.5in,
bindingoffset=0.25in,
top=0.75in,
bottom=1.25in,
twoside,
%showframe
]
{geometry}
\usepackage{paracol}
\twosided[pc]
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{Arial}
\newfontfamily\englishfont{Linux Libertine O}
\usepackage{expex}
\lingset{
everygla=\Large,
everyglb=\scriptsize\englishfont\it,
everyglc=\scriptsize\englishfont,
glwordalign=center,
glhangindent=0em,
glrightskip=0pt,
glhangstyle=none,
aboveglbskip=-0.7ex,
aboveglcskip=-0.7ex,
glbreaking
}
\columnratio{0.71}
\setlength{\columnsep}{1.0em}
\newenvironment{interlinearfirst}%
{\begin{leftcolumn*}\begin{hebrew}\mystrutfirsta\sloppy\begingl}%
{\endgl\end{hebrew}\end{leftcolumn*}}
\newenvironment{translationfirst}%
{\begin{rightcolumn}
\footnotesize\noindent\ignorespaces\mystrutfirstb\sloppy}
{\end{rightcolumn}}
\newcommand{\mystrutfirsta}{\rule{0pt}{0pt}}
\newcommand{\mystrutfirstb}{\rule{0pt}{22pt}}
\newenvironment{interlinear}%
{\begin{leftcolumn*}\begin{hebrew}\mystruta\sloppy\begingl}%
{\endgl\end{hebrew}\end{leftcolumn*}}
\newenvironment{translation}%
{\begin{rightcolumn}
\footnotesize\noindent\ignorespaces\mystrutb\sloppy}
{\end{rightcolumn}}
\newcommand{\mystruta}{\rule{0pt}{0pt}}
\newcommand{\mystrutb}{\rule{0pt}{12pt}}
\newenvironment{interlinearspecial}%
{\begin{leftcolumn*}\begin{hebrew}\mystrutc\sloppy\begingl}%
{\endgl\end{hebrew}\end{leftcolumn*}}
\newenvironment{translationspecial}%
{\begin{rightcolumn}
\footnotesize\noindent\ignorespaces\mystrutd\sloppy}
{\end{rightcolumn}}
\newcommand{\mystrutc}{\rule{0pt}{0pt}}
\newcommand{\mystrutd}{\rule{0pt}{13pt}}%adjust this strut for the last paragraph
\begin{document}
\begin{paracol}{2}
\begin{interlinearfirst}
\gla אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד //
\glb aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\glc aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\end{interlinearfirst}
\begin{translationfirst}%
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
\end{translationfirst}
\begin{interlinear}
\gla אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד //
\glb aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\glc aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\end{interlinear}
\begin{translation}%
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
\end{translation}
\begin{interlinear}
\gla אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד //
\glb aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\glc aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\end{interlinear}
\begin{translation}%
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
\end{translation}
\begin{interlinear}
\gla אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד //
\glb aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\glc aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\end{interlinear}
\begin{translation}%
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
\end{translation}
\begin{interlinear}
\gla אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד //
\glb aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\glc aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\end{interlinear}
\begin{translation}%
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
\end{translation}
\begin{interlinearspecial}
\gla אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד אאאאא בבבבב גגגגג דדדדד //
\glb aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\glc aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd aaaaa bbbbb ggggg ddddd //
\end{interlinearspecial}
\begin{translationspecial}%
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
\end{translationspecial}
\end{paracol}
\end{document}
\strutd
to 20pt and add a\flushpage
before the lasttranslationspecial
doesn't this do what you want? (No need for theinterlinearspecial
it seems.) It's not totally automatic, but can be done once at in the final stages of the document.\flushpage
beforeinterlinearspecial
but nottranslationspecial
. That's a good worst case scenario for me, but I would much prefer an automatic solution if possible. Is this a bug in the underlyingexpex
package that can be fixed?flushpage
before actually, and when I searched the site for it I found this answer. Perhaps it's relevant for automating.interlinealspecial
though, just thetranslationspecial
. Shall I add this as an answer? Do these bad breaks come up a lot in the document?strut
ininterlinearspecial
is set to zero so it shouldn't matter that it's there, right? I just placed it there in case there was ever a need to adjust it.