Closed seloumi closed 2 years ago
With bidi=basic math in first column of tabular or array environments appears in reverse direction (from right to left) , If we include math of first column in \hbox we get a correct result. With bidi=basic-r option the result is fine.
bidi=basic
bidi=basic-r
\documentclass{article} \usepackage[bidi=basic]{babel} \babelprovide[import,main]{arabic} \begin{document} \[ \begin{array}{cc} ax+b & f(x)=x^2-3 \\ % \hbox{$ax+b$} & f(x)=x^2-3 give correct result ax+b & f(x)=x^2-3 \end{array} \]% \begin{tabular}{cc} $ax+b$ & $f(x)=x^2-3$ \\ $ax+b$ & $f(x)=x^2-3$ \end{tabular} \hrulefill \selectlanguage{nil} \[ \begin{array}{cc} ax+b & f(x)=x^2-3 \\ ax+b & f(x)=x^2-3 \end{array} \]% \begin{tabular}{cc} $ax+b$ & $f(x)=x^2-3$ \\ $ax+b$ & $f(x)=x^2-3$ \end{tabular} \end{document}
Removing this line give correct result https://github.com/latex3/babel/blob/f88bad9a03874f05acb82356197d44415726280a/babel.dtx#L9954
With
bidi=basic
math in first column of tabular or array environments appears in reverse direction (from right to left) , If we include math of first column in \hbox we get a correct result. Withbidi=basic-r
option the result is fine.