Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
1  
Welcome to TeX.SX! Could you add an example of text that shows the problem? –  egreg Feb 9 at 20:54
1  
I think that the font has only regular and bold weights, no italic or slanted shape. Try amiri instead. –  Thérèse Feb 10 at 1:31
    
Thank you for your answers. I'll post an example.. I tried replacing Traditional arabic by amiri, and have an error message..couldn't find the font amiri.. How can I install it ?.. But after.. the editor wants this font (Traditional arabic)...bon... Thank you –  Faouzi Bellalouna Feb 10 at 8:24
    
\documentclass[a4paper]{book} \usepackage[dvips]{graphicx} \usepackage{amssymb} \usepackage{amsmath}\usepackage{polyglossia} \setmainlanguage[numerals=maghrib]{arabic} \setotherlanguage{english} \newfontfamily\arabicfont[Script=Arabic]{Traditional Arabic}\usepackage{xeindex}%\usepackage{makeidx} \makeindex \begin{document} \hfill\LR{A sample of probabilistic arabic text} نهتم، في كثير من الأحيان، بتحديد عدد \emph{المجموعات المختلفة} المتكونة من $r$ عنصر، التي يمكن تشكيلها من مجموعة فيها $n$ عنصر. \end{document} –  Faouzi Bellalouna Feb 10 at 8:33
1  
\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} –  Faouzi Bellalouna Feb 10 at 8:42

2 Answers 2

In general, I advise against using bold and slanted in Arabic for emphasis: they work poorly in Arabic, especially the slant which is not always as visible and is quite alien to Arabic typesetting traditions. (Even though my own Amiri font has them, they are there to avoid the fake bold and slanted synthesized by GUI applications which are very very poor and outright break the font in many cases.) Traditionally, emphasis was done using a different calligraphic style, for example using an Nastaliq for emphasis with Naskh for the main text, or using a different font that has a bolder look, or using overlines, or different colors etc. So I suggest you employ one of those techniques based on the nature of the text your are setting.

share|improve this 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.
share|improve this answer
    
Thank you for your remarks, which are of great interest for me. I'll try the two options... –  Faouzi Bellalouna Feb 11 at 13:12
1  
☺, but maybe you'd like to consider Khaled Hosny's advice, to follow the Arabic typesetting traditions? –  Júda Ronén Feb 11 at 14:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.