0

Consider this example, how to deactivate tabular layout in RTL context

\documentclass{article}
\usepackage[nil,bidi=basic-r,layout=counters.lists.tabular]{babel}
\babelprovide[import, main]{arabic}
\babelfont{rm}{Amiri}

\begin{document}

\begin{tabular}{c|c}
right text & left text  
\end{tabular}

% macro to deactivate tabular layout  

\begin{tabular}{c|c}
left text & right text  
\end{tabular}

\end{document}
2

There is no in-built command, but you can save the original definition before loading babel:

\documentclass{article}
\makeatletter
\let\@oritabular\@tabular
\newcommand\restoretabularlayout{\let\@tabular\@oritabular}
\makeatother

\usepackage[nil,bidi=basic-r,layout=counters.lists.tabular]{babel}
\babelprovide[import, main]{arabic}
\babelfont{rm}{Amiri}

\begin{document}

\begin{tabular}{c|c}
right text & left text
\end{tabular}

% macro to deactivate tabular layout
{
\restoretabularlayout

\begin{tabular}{c|c}
left text & right text
\end{tabular}
}

\begin{tabular}{c|c}
left text & right text
\end{tabular}


\end{document}

enter image description here

  • Thanks, how about adding layouts mid document, I think it is better if there is commands like \addlayout{...} and \removelayout{...} – Salim Bou Apr 22 at 21:07
  • Make a feature request. – Ulrike Fischer Apr 22 at 21:16

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.