6

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}

enter image description here

This should read:

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

How do I make that happen in a neat way?

Keelan
  • 5,425
  • 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
  • @AlanMunn that's strange. When I try with Times New Roman and David CLM I have the same problem still (both Liberation Serif and the real Times New Roman from ttf-mscorefonts-installer). I also tried on a different machine (Ubuntu 14, TL 2013) with the same results... – Keelan Feb 12 '16 at 19:25
  • BTW, there is a superfluous ת״ו in ‘תהָאָֽרֶץ’. – Júda Ronén Feb 13 '16 at 22:04

1 Answers1

6

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).