2

I re-ask the same question, more precisely...

I'm using Polyglossia to write a book of probability in arabic, and I've recently formatted my machine so I lost the last installation of fonts etc.. but not the files fortunately, saved periodically... So I have some problems for typesetting my old files, that I absolutely not understand... one problem what I never see it is that, after compilation, the parenthesis are behind the characters inside... and is really inacceptable when the main font is "Traditional Arabic", which is the font of the book (and still remains for another font... see example below)... This is the case for referred equation and for it's reference with different behaviour for two different fonts, and the same (bad) behaviour for text... See the words "(of null intersection)" This is also the case even if the characters used are Latin !!

My question is then: where do come from this problem?
how can I obtain centered parenthesis around the characters inside, for every font ?

Here is the basic tex file, of the same simple text, written with main font "Traditional arabic" first, and in the font Amiri, for watching the difference..

\documentclass[14pt,a4paper]{extbook}

\usepackage{amsmath,amssymb}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Traditional Arabic}
\setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}

\begin{document}
\LR{
Let  $E_{1}, E_{2},\ldots, E_{n}$, some disjoint events (of null intersection), then
\begin{equation} %eqn3.1
\label{eqn3.1}
P \left(\bigcup_{1}^{n} E_{i}\right) = \sum_{i = 1}^{n} P (E_{i})
\end{equation}
The equation
  \eqref{eqn3.1} generalizes to...
  }

\vspace*{70pt}    
    \newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Amiri}
\LR{
Let  $E_{1}, E_{2},\ldots, E_{n}$, some disjoint events (of null intersection), then
\begin{equation} %eqn3.1
\label{eqn3.2}
P \left(\bigcup_{1}^{n} E_{i}\right) = \sum_{i = 1}^{n} P (E_{i})
\end{equation}
The equation
  \eqref{eqn3.2} generalizes to...
  }

\end{document}

And the result of my compilation (Using texmaker, and Windows 8).. enter image description here

1

This font (arabtype.ttf) works fine: http://fonts.cooltext.com/Downloader.aspx?ID=11183

\LR{%
Let  $E_{1}, E_{2},\ldots, E_{n}$, some disjoint events (of null intersection), then

\begin{equation} %eqn3.1
\label{eqn3.1}
P \left(\bigcup_{1}^{n} E_{i}\right) = \sum_{i = 1}^{n} P (E_{i})
\end{equation}

\noindent The equation
  \eqref{eqn3.1} generalizes to... \par
  }

enter image description here

  • Hello I just saw your answer but the main font of the book must be the font "Traditional Arabic". I put the example of the other font to watch the difference... By the way I've just installed windows 8.1 and the result is better, with the same file, but is still not very good... not like your font which is exactly centered around the number 1... That's what I want for my font ! – Faouzi Bellalouna Aug 19 '14 at 15:23

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.