1

I am typesetting a Hebrew document using bidi. The material in the longtable environment still comes out LTR. How do I make it work?

\documentclass{article}
\usepackage{longtable}
\usepackage[no-sscript]{xltxtra} % loads fixltx2e, metalogo, xunicode, fontspec

\setmainfont{FreeSans}
\usepackage[rldocument]{bidi}

\begin{document}
\begin{center}
\begin{longtable}{@{\extracolsep{\fill}}llr}
\hline
מילה עברית&English Words&123, 456\\
\hline
English Text&מילים בעברית&12 3456\\
\hline
1234 56.&More English&עוד עברית\\
\hline
\end{longtable}

מילה עברית English Words 123, 456\\
English Text מילים בעברית 12 3456\\
1234 56. More English עוד עברית\
\end{center}
\end{document}

longtable doesn't seem to respect bidi

Here are the lines from the output which describe the software and package versions I'm using:

This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, uk
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)
 Copyright © 2009–2012 Vafa Khalighi
 v11.149, 2012/01/01
6
  • ah. The maintainer of bidi contacted me a while back about that. It doesn't work I need to add some hooks to longtable but it isn't exactly clear where. (I thought it was clear but when I tried it it didn't work, I need to get back to it). Sorry about that. (If anyone else answers could they ping me either through the @ mechanism here or via email) Aug 16, 2012 at 22:03
  • @DavidCarlisle And Vafa is unfortunately no longer maintaining bidi.
    – Alan Munn
    Aug 16, 2012 at 22:11
  • @AlanMunn Oh it was only last month he mailed me? Aug 16, 2012 at 22:12
  • @DavidCarlisle He sent mail announcing it to the XeTeX list on Aug 5.
    – Alan Munn
    Aug 16, 2012 at 22:20
  • Yes, I tried sending e-mail to Vafa, but I got back and 'e-mail address does not exist' from google. Aug 17, 2012 at 3:50

2 Answers 2

6

Try developing final version of bidi package. It provides an experimental bidi-longtable package.

1
  • Thank you! I've tried it with a few documents and it seems to work quite well. Oct 25, 2012 at 13:39
2

You could add the necessary commands to switch directions manually:

\documentclass{article}
\usepackage{longtable}
\usepackage[no-sscript]{xltxtra} % loads fixltx2e, metalogo, xunicode, fontspec

\setmainfont{Arial Unicode MS}
\usepackage[rldocument]{bidi}

\begin{document}
\begin{longtable}{@{\extracolsep{\fill}}llr}
\hline
מילה עברית&English Words&123, 456\\
\beginR מילה עברית\endR &English Words&123, 456\\
\RL{מילה עברית} &English Words&123, 456\\
\end{longtable}
\end{document}
1
  • I was afraid that would be the answer. At least \usepackage{array} \newcolumntype{R}{>{\beginR}r<{\endR}} seems to work. Is there any difference here between the \beginR primitive and \RL{}? Is there no way to get xetex to start the columns on the right side, aside from entering them in reverse order? Aug 19, 2012 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .