This question is a follow up to this question, which asked about justifying all the glosses. The solution worked for justifying \gla
, \glb
, and \glc
but not for \glft
. The problem is clearly because the default language is Hebrew \setdefaultlanguage{hebrew}
, but I don't know how to get around it.
MWE:
\documentclass{book}
\usepackage{ragged2e}
\usepackage{expex}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\newfontfamily\hebrewfont[Script=Hebrew]{FrankRuehl}
\newfontfamily\englishfont{Corbel}
\begin{document}
\lingset{
everygla=\Large,
everyglb=\footnotesize\englishfont,
everyglc=\footnotesize\englishfont,
everyglft=\small,
glftpos=right,
glwordalign=center,
glhangindent=0em,
}
\definelingstyle{justified}{
glrightskip=0pt,glspace=0.5em plus 3em minus 0.15em,
everyglft=\justifying\noindent
}
\exdisplay[lingstyle=justified]
\begingl
\gla אאאא בבגגגגב גגגג דדדדדדדד אאאא בבבב גגגג דדדד אאאא בבבב גגגג דדדד אאאאאאאא בבבב גגגג דדדד אאאא בבבב גגגג דדדדדדדד אאאאאאא בבבב גגגג דדדד אאאא בבגגגגבב גגגג דדדדדד //
\glb aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd //
\glc aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd aaaa bbbb gggg dddd //
\glft
\textenglish{Some English text so that you can see whether the hyphenation and justification provided by \LaTeX{} are actually working in this free translation. Some English text so that you can see whether the hyphenation and justification provided by \LaTeX{} are actually working in this free translation.} //
\endgl
\xe
\end{document}
As you can see, the Hebrew gloss is nicely justified, but the English free translation is ragged left, even though in a fully English environment it comes out fully justified.
\hebrewfont
in\gla
) it works as expected, and the free translation appears on the right of the page instead of the left.\begin{hebrew}...\end{hebrew}
(and\englishfont\setLTR
in English gloss lines) puts you back with the problem you have in your MWE.