# Right-to-left interlinear translation, multiple words for one translation

I'm using ExPex for an interlinear translation in Hebrew. I'm having issues when translating one Hebrew word with multiple English words: the English words are right-to-left, while they should be left-to-right. See the example:

\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\englishfont[Mapping=tex-text]{Latin Modern Roman}
\newfontfamily\hebrewfont[Scale=MatchLowercase]{Ezra SIL}
\usepackage{expex}

\begin{document}

\begin{hebrew}
\ex[everyglc=\englishfont] \begingl
\gla 7225 1254 430 853 8064 853 776//
\glb בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃ //
\glc {In the beginning} created God - {the heavens} and {the earth.}//
\endgl\xe
\end{hebrew}

\end{document}


the earth. and the heavens - God created In the beginning


How do I make that happen in a neat way?

• When I compile your example, the English words are LTR as you want them. – Alan Munn Feb 11 '16 at 16:44
• If I remove the everyglc=\englishfont then the text comes out RTL. Are you sure in your actual document you have specified \englishfont for everyglc? – Alan Munn Feb 11 '16 at 16:53
• So this might be a version related issue. @Camil: try updating your TeX distribution. – Júda Ronén Feb 11 '16 at 17:57
• @AlanMunn this is my actual document for the time being :) but that's strange, that it's working for you. What version are you using? I have XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/dev/Debian) (preloaded format=xelatex). All my packages are up to date. – Keelan Feb 12 '16 at 11:07
• This is somehow font-related. I changed the fonts in my initial test, since I didn't have your fonts available. Using used David CLM and Times the problem doesn't arise, but using Linux Libertine instead of Times, I can now reproduce the problem. It's not obviously version related, since I get no difference with TL 2014 or TL 2015. – Alan Munn Feb 12 '16 at 19:17

# An explicit (=cumbersome) and cleaner solution

A quick solution would be to use the bidi package’s \LR{} command:

\glc \LR{In the beginning} created God - \LR{the heavens} and \LR{the earth.}//


See §1.8 (Typesetting Short LTR and RTL Texts) in the documentation for further information.

# A somewhat easier to use solution

Add \beginL to the everyglc hook. This can be done locally (changing \ex[everyglc=\englishfont] to \ex[everyglc=\englishfont\beginL] in the question) or globally, by using the \lingset command like this:

\lingset{everyglc=\englishfont\beginL}


The downside of this solution is that it uses an internal macro of bidi; I’m not sure how risky it is to use this, but it seems like a good hack to me and I don’t think it is going to break easily soon (not unless radical changes will be made in bidi or expex).

• Thank you, but I was hoping for a solution where I wouldn't have to type that every time. Do you happen to have that as well? :) – Keelan Feb 11 '16 at 16:32
• :-). I tried to use the \begingl option everyglc=\setLR, but it didn’t work. – Júda Ronén Feb 11 '16 at 16:52
• I tried that too, and it didn't work; I'm not quite sure why. – Alan Munn Feb 11 '16 at 21:09
• @Alan Munn: I guess because \setLR sets the direction of a paragraph, not of a segment within a paragraph. – Júda Ronén Feb 13 '16 at 21:45
• @CamilStaps — I’ve just added another solution which I think solves your problem. – Júda Ronén Feb 13 '16 at 21:59