11

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}
12

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}
  • Many thanks, I confirm that your solution perfectly works. – Name Oct 15 '14 at 7:17
  • I am interested to know from where the numbers 21 and 02 in your answer comes. And if there is a comprehensive list of such numbers, I would be glad to know about it. – Name Nov 25 '14 at 11:27
  • 3
    @Name You can find them reading the file fontmath.ltx – egreg Nov 25 '14 at 12:29
  • Perfect as usual. Why is there nothing to see with \times or \omega? What's the purpose of the commands in arabicfnt.sty? – Dr. Manuel Kuehner Mar 28 '17 at 9:21
  • 1
    @Dr.ManuelKuehner The commands are redefined as font selection commands; not a good choice, in my opinion. – egreg Mar 28 '17 at 11:40

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.