[XeTeX] Bidi in tables

François Charette firmicus at ankabut.net
Sat Dec 29 00:41:03 CET 2007


Anas Ghrab a écrit :
> Is there a way to let the bidi package working inside tables (so one  
> could use tables in ArabXeTeX correctly) ?
>
> \documentclass{article}
> \usepackage{bidi}
> \begin{document}
> \setRL
> Ceci est un test.  %% Here it works
> \begin{tabular}{r|r}
> \setRL Ceci est un test. & Ceci est un test.\\  %% But not here
> \end{tabular}
> \end{document}
>   

Hello Anas,

Unfortunately, LaTeX typesets tabular material rigidly from left to 
right, and the bidirectional primitives provided by eTeX have no effect 
here. There could be some way, which I have not investigated, to work 
around this limitation at the macro level (suggestions are welcome!), 
but I do think that it would be better to solve this problem at the 
level of the typesetting engine :-)

One workaround, which I used when I typeset my thesis with ArabTeX, is 
to wrap the content of each cell with \RL{...} and to use some macro in 
your favorite editor (or an external script) to flip the rows of your 
tables from
A & B & C & D \\
to
D & C & B & A \\

Best,
François



More information about the XeTeX mailing list