Closed ghost closed 1 year ago
Alas I can't read Arabic script, so I might be talking nonsense, but if I'm inputting literal dots I get the very same glyph. Are you sure this isn't a font issue? In polyglossia,
we do not modify the decimal separator, so this is basically what XeTeX
(bidi
?) outputs.
Also consider this:
% !TeX TS-program = xelatex
\documentclass[a4paper]{report}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{arabic}
\setotherlanguage{english}
\setmainfont{Amiri}
\begin{document}
\tableofcontents
\setcounter{chapter}{9}
\chapter{العنوان}
العنوان الأول
\section{العنوان الثاني}
\subsection{الثالث}
\end{document}
I'd say the zero is positioned higher:
@khaledhosny could you please have a look whether there is something wrong here, and if so, instruct us which glyph would be expected as section separator with Arabic digits?
This issue happens on ubuntu. On archlinux it renders fine:
This is how it should look like.
The diamond in arabic is a zero ( ٠ ) The round dot is a decimal place indicator ( . )
It is rendered incorrectly in your sample arabic example here: https://github.com/reutenauer/polyglossia/blob/master/generated/example-arabic.pdf
In Amiri Arabic-Indic zero and peroid look close (but have different baselines). Period is not a good number seperator in Arabic since it is too close in shape to zero (and some fonts have both rounded, too).
I suggest using a dash-like character for Arabic, may be en-dash or hyphen-minus.
Thanks @khaledhosny. Is one among these reasonably common or would you propose to add an option to select among the period and en-dash?
hyphen-minus should be available on most fonts, en-dash is probably rarer in Arabic fonts. An option is probably desirable since people might prefer another separator entirely (I have not surveyed Arabic publications, but this way of numbering is rather unfamiliar to me).
For xetex
(bidi
) we can simply re-use \SepMark{-}
. Alas, luabidi
doesn't know this, so we need to redefine all section commands.
I've implemented an option sectionsep
(e.g., [sectionsep=-]
) to arabic which works both with xe and lua. Testing welcome.
I've implemented the same option to Kurdish, Persian, Syriac, and Urdu, which also use Eastern Arabic numerals
I have this simple code:
In the sections and subsections, the resulting numbers are 101 and 10101 Instead of 1.1 and 1.1.1
So instead of '.' it is putting a '0' (that is in Arabic numbers).![Screenshot from 2023-05-02 13:46:51](https://user-images.githubusercontent.com/64473898/235671015-fd1c5d8f-1c5a-4371-ac2e-4e1a599b6084.png)