3

Is there a way to use non-Western Arabic digits in formulas of an English tex document? For example in output of

$$\frac{100x}{25}$$

Arabic–Indic numerals/Eastern Arabic digits (٠ ١ ٢) will appear instead of Western Arabic (0, 1, 2) ones. I'm looking for a way workable with latex without using xetex.

8
  • Don't use $$...$$. Use \[...\] instead ;-). Far more important question: What are English digits?
    – user31729
    Mar 25, 2015 at 17:20
  • Is it obsolete? Mar 25, 2015 at 17:21
  • 2
    See tex.stackexchange.com/questions/503/why-is-preferable-to for the $$...$$ issue
    – user31729
    Mar 25, 2015 at 17:22
  • This question is misleading. We tend to name 1,2,3 etc as arabic digits, not as English digits
    – user31729
    Mar 25, 2015 at 18:25
  • 2
    I agree with @SoundsOfSilence that the wording is misleading. The Hindu-Arabic numeral system was adopted in Europe in the 12th century when al-Khwarizmi's book "Algebra" was translated and so the numbering became known as "Arabic numerals" (as opposed to "Roman numerals") which causes confusion. Perhaps it would be clearer if you replace "English digits" with "Western Arabic numerals" and "Arabic ones" with "Arabic–Indic numerals" or "Eastern Arabic numerals" for clarity. Mar 25, 2015 at 18:54

3 Answers 3

3

with arabtex package

enter image description here

\documentclass{article}     
\usepackage{arabtex,utf8}   \setcode{utf8}            
\begin{document}
test 
\[\ell+\frac{\RL{100}x}{\RL{25}}\]
\end{document}
2
  • \usepackage[arabic]{babel} was needed for me. Is there a way to change the digits' font? Mar 25, 2015 at 18:40
  • babel arabic have nothing to do here and no arabtex have only this font
    – touhami
    Mar 25, 2015 at 19:16
2

for Arabic numbers

\AtBeginDocument{\setdefaultlanguage[numerals=maghrib]{arabic}}

for indian numbers

\AtBeginDocument{\setdefaultlanguage[numerals=machriq]{arabic}}
1

You could use lualatex:

%!TEX TS-program = lualatex
\documentclass{article}

\usepackage{fontspec}
    \setmainfont{Times New Roman}
%   \newfontfamily\arabicfont[Script=Arabic,Numbers=Arabic]{Arial Unicode MS}

\begin{document}
test 
\[\ell+\frac{١٠٠x}{٢٥}\]
\end{document}

But I do not know how to use a specific font for the Arabic. Simply enclosing the numbers in \arabicfont(defined in preamble) does not seem to work in the environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .