Please consider the MWE below:
MWE - scenario 1
\documentclass[demo]{scrartcl}
\usepackage{polyglossia}
\setmainlanguage[locale=mashriq,numerals=mashriq,abjadjimnotail=true]{arabic}
% \newfontfamily\arabicfont[Script=Arabic,Ligatures=TeX,Mapping=arabicdigits]{Simplified Arabic}
% \setsansfont[Script=Arabic,Ligatures=TeX,Mapping=arabicdigits]{Simplified Arabic}
\newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Simplified Arabic}
\setsansfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Simplified Arabic}
\usepackage[style=numeric,sorting=none,backend=biber]{biblatex}
\DefineBibliographyStrings{english}{%
references = {المراجع}}
\makeatletter
\def\abx@comma{\ifdim\lastkern>\z@\unkern\fi\abx@puncthook{،}}
\makeatother
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{ibnsina,
author = {{ابن سينا}},
year = {{١٤١٧}},
title = {السماع الطبيعى من كتاب الشفاء},
publisher = {دار المناهل},
location = {لبنان، بيروت}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
هنا نص بالعربية مع ارقام هندي ١، ٢، ٣، الخ ومع الواصلة، واحدة - واثنتان -- وثلاثة ---.
احد المراجع\parencite{ibnsina}.
\printbibliography
\end{document}
Output -- scenario1

MWE -- scenario2
\newfontfamily\arabicfont[Script=Arabic,Ligatures=TeX,Mapping=arabicdigits]{Simplified Arabic}
\setsansfont[Script=Arabic,Ligatures=TeX,Mapping=arabicdigits]{Simplified Arabic}
% \newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Simplified Arabic}
% \setsansfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Simplified Arabic}
Output -- scenario2
I get either of these two effects depending on which argument is passed at the end of the Arabic font definitions. In scenario 1 last argument is Ligatures=TeX, whereas in scenario 2 the last argument is Mapping=arabicdigits.
Question
Is there any way to keep both Hindi numbers and the TeX ligatures of en dash and em dash effects at the same time?
Notes
- compiled by xetex
\textemdash,\textendashare obvious answers but I don't want to resort to them in Rt-to-Lt document as it will produce messy text script- undesired output is marked with yellow in the screenshots
