Is it possible to set some columns in one table as RTL while other are LTR? I want to do something like this:

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = xelatex




\newfontfamily{\germanfont}[Mapping=tex-text,Scale=1,Script=Latin]{Times New Roman}
\newfontfamily{\hebrewfont}[Mapping=tex-text,Scale=0.80,Script=Hebrew]{David CLM}

שמות לד-ו       &וַיַּעֲבֹר יְהוׇֹה  עַל-פׇּנׇיו    &Also zog H’ über seinem Gesicht vorüber.
\\  &וַיִּקְרׇא &Also rief er:
\\  &יְהוׇֹה    &1 „ER – als der Barmherzige
\\  &יְהֹוׇה    &2 ER – Derselbe auch nach eines Menschen Sünde
\\  &אֵל    &3 G’tt – Herrscher
\\  &רַחוּם &4 Barmherziger – mitleidend
\\  &וְחַנּוּן  &5 Gnädiger – Schenkender
\\  &אֶרֶך אַפַּיִם &6 Langmütiger – Geduldig zum Zorn
\\  &וְרַב-חֶסֶד    &7 Meister der Freundlichkeit – voller Treue zur Gemeinschaft.
\\  &וֶאֱמֶת:   &8 und der Wahrheit – Wahrhaftig zu sich selbst
\\לד-ז      &נֹצֵר חֶסֶד לׇאֲלׇפִים &9 Bewahrer der Güte für Tausende
\\  &נֹשֵֹא עׇוֹן   &10 Ertragend Vergehen/hebt Vergehen weg
\\  &וׇפֶשַׁע   &11 und Frevel/Übeltat
\\  &וְחַטׇּאׇה &12 und Verfehlung
\\  &וְנַקֵּה לא יְנַקֶּה   &13 und rein machend (den Umkehrenden, nicht aber den, Unbußf.)
\\  &פֹּקֵד  עֲוֹן אׇבוֹת עַל-בׇּנִים   &beachtet Vergehen der Väter bei Kindern
\\  &וְעַל-בְּנֵי בׇנִים    &und bei Kindeskindern,
\\  &עַל-שִׁלֵּשִׁים    &bei dritten
\\  &וְעַל-רִבֵּעִים:   &und bei vierten.“

UPDATE: Here is a MWE. But the Hebrew word order is wrong. Although the text is aligned on the right, it runs from left to right and not from right to left.

  • 3
    yes it should work, does it not for you? It would help if the example were a complete document that people could run (and for those of us who can not read the script) an image of what you get and an indication of what's wrong. tabularx does not have an [m] option but that is probably not related to whatever problem you have. – David Carlisle Nov 4 '14 at 18:35
  • You should be using tabular not tabularx (as there are no X columns,) – David Carlisle Nov 4 '14 at 18:36
  • 2
    I echo David's comments about a compilable MWE. While waiting for that, one thought is that if you are using XeLaTeX, setting the language appropriately will likely give you the result you need. Setting the language to Hebrew should automatically set RTL text direction. – penguinpreferred Nov 4 '14 at 18:46
  • I do not want to set the document language to Hebrew. I just want two columns where the Hebrew text runs correctly from right to left. – Moked Nov 4 '14 at 19:46
  • I meant setting the language of each instance of Hebrew script. – penguinpreferred Nov 4 '14 at 22:38

\setRL is for paragraphs. I guess tabularx doesn’t treat r-type cells as paragraphs. You can either:

  • change the column type type to X:

  • or enclose each Hebrew phrase with \RL{}:

    \RL{שמות לד-ו}       &\RL{וַיַּעֲבֹר יְהוׇֹה  עַל-פׇּנׇיו}    &Also zog H’ über seinem Gesicht vorüber.

See also: bidi’s documentation.

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.