[Tex/LaTex] Emphasized and italic are not taken into account in Arabic polyglossia

arabicpolyglossia

I'm writing a book about probability in Arabic, and I'm using the commands

\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Traditional Arabic}

With this package, the commands \emph and \textit have no effect, that is, it leaves the words in Roman. How I can repair this?

Here is an example:

\documentclass[a4paper]{book}
\usepackage[dvips]{graphicx}
\usepackage{boxedminipage}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{rotating}
\usepackage{fmultico}
\setlength{\columnseprule}{0.1pt}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Traditional Arabic}
\begin{document}
\hfill\LR{A sample of probabilistic arabic text}
نهتم، في كثير من الأحيان، بتحديد عدد 
\emph{المجموعات المختلفة} المتكونة من $r$
عنصر، التي يمكن تشكيلها من مجموعة فيها $n$ عنصر.
\end{document}

Best Answer

If you have to use the ‘Traditional Arabic’ font, which seems to have no italic/slanted version according to the comments, you can use either of two alternative methods to work around the problem:

  • One is to use the AutoFakeSlant feature in the font definition, thus:

    \newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.15]{Traditional Arabic}
    

    As the name suggests, it takes the regular upright letters and slant them automatically (using a simple transformation, I think).

  • The other method is to use a different font which does have a slanted version. This way Traditional Arabic will be used for upright letters, and whenever you use \emph or \textit fontspec will choose the other font. Notice that slanted version of Arabic fonts usually have Italic or Slanted after the font name. To use this method, define the font family thus:

    \newfontfamily\arabicfont[Script=Arabic, ItalicFont=AnotherArabicFont Slanted]{Traditional Arabic}
    

I think the first method is probably preferable, since finding another font which is similar enough typographically might be really tricky. I use this first method for my thesis: my main Hebrew font has no slanted version (grosso modo, Hebrew has no italics, but some attempts at designing ‘italic-like’ letter forms for specific typefaces has been made), so I use AutoFakeSlant in order to obtain slanted version for citing titles of other works (cf. ‘The Hobbit’ in English). It works fine. Notice that for both Arabic and Hebrew one should use negative factor (I find -0.15 a reasonable choice), as they are written RTL, while LTR scripts should use a positive one.

If you need bold version you can use these parallel features:

  • AutoFakeBold=1.5 (you can change the factor, of course), and
  • BoldFont=AnotherArabicFont Bold + BoldItalicFont=AnotherArabicFont Bold Italic.
Related Question