[Tex/LaTex] Problem with inserting the symbols \times and \omega when using arabi package

arabicgreekpersiansymbols

Is it impossible to insert the mathematical symbol \times when using the arabi package?

After compiling

A\times B

it becomes AB and the sign \times disappears

See the example below.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[LFE,LAE,OT1]{fontenc}
\usepackage[farsi,english,arabic]{babel}

\begin{document}
\selectlanguage{farsi} 
سلام   
$A\times B$
\end{document}

Best Answer

I don't know whether this fact is documented (I can't see it in the manual, though), but the arabicfnt.sty that's automatically loaded has

\DeclareRobustCommand{\times}{\fontfamily{artimes}\selectfont}

which explains the mystery.

You can solve the problem by adding to your document

\DeclareMathSymbol{\mtimes}{\mathbin}{symbols}{"02}

and using \mtimes for the product symbol. If you want to use \times for the symbol, you have to rename the font changing command (or leave it out altogether):

\DeclareRobustCommand{\timesr}{\fontfamily{artimes}\selectfont}
\let\times\relax
\DeclareMathSymbol{\times}{\mathbin}{symbols}{"02}

Note that a similar problem happens for \omega, so either you do

\DeclareMathSymbol{\momega}{\mathord}{letters}{"21}

and use \momega for the Greek letter, or rename the font command

\DeclareRobustCommand{\omegar}{\fontfamily{aromega}\selectfont}
\let\omega\relax
\DeclareMathSymbol{\omega}{\mathord}{letters}{"21}
Related Question