# Issue with arabxetex and equation numbers

There seems to be some issue with printing equation numbers when using the arabxetex package.

Here is a minimal example:

\documentclass{article}

\usepackage{arabxetex} %
%\usepackage{bidi} %

\begin{document}

$$E=mc^2$$

\end{document}


When I compile this I get

E=mc^2          )(1

Whereas if I comment out arabxetex and comment in bidi, it prints correctly.

Any ideas about how to fix this?

(PS: Maybe someone with a higher reputation could add arabxetex to the tags.)

• – Ronen Feb 24 '14 at 22:52
• @Ronen: The answer you are referring to is very wrong. See my answer below. – user45710 Feb 28 '14 at 4:48

ArabXeTeX is not aware of \if@Latin boolean of bidi package. Fix is easy:

\documentclass{article}

\usepackage{arabxetex}
\newfontfamily\arabicfont[Script=Arabic]{Arial}
\makeatletter
\@Latintrue
\makeatother
\begin{document}

$$E=mc^2$$

\end{document}


Rule of thumb: \if@Latin should be true in LTR-based script and false in RTL-based scripts.