<div dir="ltr">Hello<br><br>I eventually came up with a hack for array.sty that make it work in RTL, this is what I have done:<br><br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>\documentclass{article}<br>\usepackage{array}<br>
\makeatletter<br>\TeXXeTstate=1<br>\def\@tabular{%<br> \leavevmode<br> \hbox \bgroup \beginR $\col@sep\tabcolsep \let\d@llarbegin\begingroup<br> \let\d@llarend\endgroup<br> \@tabarray}<br>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>\def\endarray{\crcr\egroup\egroup\endR\egroup \egroup \gdef\@preamble{}}<br>\def\endtabular{\endarray $\endR\egroup}<br>\expandafter\let\csname endtabular*\endcsname=\endtabular<br>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>\def\@array[#1]#2{\setbox\@arstrutbox=\hbox{\vrule<br> height\arraystretch \ht\strutbox<br> depth\arraystretch \dp\strutbox<br>
width\z@}\@mkpream{#2}\xdef\@preamble{\noexpand \halign \@halignto<br> \bgroup \tabskip\z@ \@arstrut \@preamble<br> \tabskip\z@ \cr}<br>\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi<br>
\bgroup \let\par\relax<br>\let\@sharp##\let\protect\relax \lineskip\z@\baselineskip\z@\m@th<br>\hbox\bgroup\beginR\vbox\bgroup<br>\@preamble}<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
\makeatother<br>\begin{document}<br>\begin{tabular}{|l|l|}\hline<br>vafa&khalighi\\ \hline<br>\end{tabular}<br>\end{document}<br><br><br><br><br>But unfortunately when compiling the document, I get the following error:<br>
<br>%%%%%%%%%%%%%%%%%%%%%%<br>This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)<br> %&-line parsing enabled.<br>entering extended mode<br>(./test.tex<br>LaTeX2e <2005/12/01><br>Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh<br>
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar<br>abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc<br>h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono<br>
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la<br>tin, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, r<br>omanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turki<br>
sh, ukenglish, ukrainian, uppersorbian, welsh, loaded.<br>(/usr/local/texlive/2008/texmf-dist/tex/latex/base/article.cls<br>Document Class: article 2005/09/16 v1.4f Standard LaTeX document class<br>(/usr/local/texlive/2008/texmf-dist/tex/latex/base/size10.clo))<br>
(/usr/local/texlive/2008/texmf-dist/tex/latex/tools/array.sty) (./test.aux)<br>! Missing $ inserted.<br><inserted text> <br> $<br>l.35 \end{tabular}<br> <br>? <br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
<br>I have got no clue where this error come from? can someone please help?<br></div>