diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf | 120 |
1 files changed, 69 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf index 6997b45bf15..7f4f4e35c80 100644 --- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf +++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf @@ -4,53 +4,66 @@ \makeatletter \ifx\l@arabic\@undefined - \xpg@nopatterns{arabic}% - \adddialect\l@arabic0 + %\xpg@nopatterns{arabic}% + \adddialect\l@arabic\l@nohyphenation \fi \def\arabic@RL{\relax} -\newif\if@eastern@numerals +\newif\ifeastern@numerals \def\tmp@mashriq{mashriq} \def\tmp@maghrib{maghrib} \define@key{arabic}{numerals}[mashriq]{% - \def\@tmpa{#1}% - \ifx\@tmpa\tmp@mashriq\@eastern@numeralstrue\else% - \ifx\@tmpa\tmp@maghrib\@eastern@numeralsfalse\fi% - \fi} + \def\@tmpa{#1}% + \ifx\@tmpa\tmp@mashriq% + \eastern@numeralstrue% + \else + \ifx\@tmpa\tmp@maghrib\eastern@numeralsfalse\fi% + \fi} + +\newif\ifabjad@jim@notail +\def\tmp@true{true} +\define@key{arabic}{abjadjimnotail}[true]{% + \def\@tmpa{#1}% + \ifx\@tmpa\tmp@true\abjad@jim@notailtrue% + \else + \abjad@jim@notailfalse + \fi} \def\tmp@morocco{morocco} \def\tmp@algeria{algeria} \define@key{arabic}{locale}[default]{% - \def\@tmpa{#1}% - \ifx\@tmpa\tmp@morocco% - \@eastern@numeralsfalse% - \else\ifx\@tmpa\tmp@algeria% - \@eastern@numeralsfalse% - \fi% - \fi% - \gdef\@@arabic@month{\@arabic@month{#1}}} + \def\@tmpa{#1}% + \ifx\@tmpa\tmp@morocco% + \eastern@numeralsfalse% + \else + \ifx\@tmpa\tmp@algeria% + \eastern@numeralsfalse% + \fi% + \fi% + \gdef\@@arabic@month{\@arabic@month{#1}}} \newif\if@hijrical \def\tmp@hijri{hijri} \def\tmp@islamic{islamic} -\define@key{arabic}{calendar}[islamic]{% - \def\@tmpa{#1}% - \ifx\@tmpa\tmp@hijri\@hijricaltrue% - \else% - \ifx\@tmpa\tmp@islamic\@hijricaltrue% - \else\@hijricalfalse% - \fi\fi} +\define@key{arabic}{calendar}[gregorian]{% + \def\@tmpa{#1}% + \ifx\@tmpa\tmp@hijri\@hijricaltrue% + \else + \ifx\@tmpa\tmp@islamic\@hijricaltrue% + \else\@hijricalfalse% + \fi + \fi} \define@key{arabic}{hijricorrection}[0]{% - \gdef\@hijri@correction{#1}}% + \gdef\@hijri@correction{#1}}% % This should set the defaults -\setkeys{arabic}{locale,calendar,numerals,hijricorrection} +\setkeys{arabic}{locale,calendar,numerals,hijricorrection,abjadjimnotail=false} \def\arabicgregmonth@default#1{\ifcase#1% % Egypt, Sudan, Yemen and Golf states - \or يناير\or فبراير\or مارس\or ابريل\or مايو\or يونيو\or يوليو\or اغستس\or سبتمبر\or أكتوبر\or نوفمبر\or ديسمبر\fi} + \or يناير\or فبراير\or مارس\or أبريل\or مايو\or يونيو\or يوليو\or أغسطس\or سبتمبر\or أكتوبر\or نوفمبر\or ديسمبر\fi} \def\arabicgregmonth@mashriq#1{\ifcase#1% % Iraq Syria Jordan Lebanon Palestine \or كانون الثاني\or شباط\or آذار\or نيسان\or أيار\or حزيران\or تموز\or آب\or أيلول\or تشرين الأول\or تشرين الثاني\or كانون الأول\fi} @@ -71,35 +84,35 @@ \arabicgregmonth@default}} \def\captionsarabic{% -\def\prefacename{\@ensure@RL{مدخل}}% -\def\refname{\@ensure@RL{المراجع}} -\def\abstractname{\@ensure@RL{ملخص}}% -\def\bibname{\@ensure@RL{المصادر}}% -\def\chaptername{\@ensure@RL{الباب}}% -\def\appendixname{\@ensure@RL{الملاحق}}% -\def\contentsname{\@ensure@RL{المحتويات}} -%\def\contentsname{\@ensure@RL{الفهرس}}% -\def\listfigurename{\@ensure@RL{قائمة الأشكال}}% -\def\listtablename{\@ensure@RL{قائمة الجداول}}% -\def\indexname{\@ensure@RL{الفهرس}}% -\def\figurename{\@ensure@RL{شكل}}% -\def\tablename{\@ensure@RL{جدول}}% -\def\partname{\@ensure@RL{القسم}}% -\def\enclname{\@ensure@RL{المرفقات}}%<-- Needs translation -\def\ccname{\@ensure@RL{نسخة ل}}% << -\def\headtoname{\@ensure@RL{إلى}}%<-- Needs translation -\def\pagename{\@ensure@RL{صفحة}}% -\def\seename{\@ensure@RL{راجع}}%\alefhamza\nun\za\ra -\def\alsoname{\@ensure@RL{راجع أيضاً}}%<<\alefhamza\nun\za\ra -\def\proofname{\@ensure@RL{برهان}}% -\def\glossaryname{\@ensure@RL{قاموس}}%<< +\def\prefacename{\@ensure@RTL{مدخل}}% +\def\refname{\@ensure@RTL{المراجع}} +\def\abstractname{\@ensure@RTL{ملخص}}% +\def\bibname{\@ensure@RTL{المصادر}}% +\def\chaptername{\@ensure@RTL{باب}}% +\def\appendixname{\@ensure@RTL{الملاحق}}% +\def\contentsname{\@ensure@RTL{المحتويات}} +%\def\contentsname{\@ensure@RTL{الفهرس}}% +\def\listfigurename{\@ensure@RTL{قائمة الأشكال}}% +\def\listtablename{\@ensure@RTL{قائمة الجداول}}% +\def\indexname{\@ensure@RTL{الفهرس}}% +\def\figurename{\@ensure@RTL{شكل}}% +\def\tablename{\@ensure@RTL{جدول}}% +\def\partname{\@ensure@RTL{القسم}}% +\def\enclname{\@ensure@RTL{المرفقات}}%<-- Needs translation +\def\ccname{\@ensure@RTL{نسخة ل}}% << +\def\headtoname{\@ensure@RTL{إلى}}%<-- Needs translation +\def\pagename{\@ensure@RTL{صفحة}}% +\def\seename{\@ensure@RTL{راجع}}%\alefhamza\nun\za\ra +\def\alsoname{\@ensure@RTL{راجع أيضًا}}%<<\alefhamza\nun\za\ra +\def\proofname{\@ensure@RTL{برهان}}% +\def\glossaryname{\@ensure@RTL{قاموس}}%<< } \def\datearabic{% \def\today{% \if@hijrical% \Hijritoday[\@hijri@correction]% \else% - \if@rl% + \if@RTL% \arabicnumber\day\space\@@arabic@month{\month}% \space\arabicnumber\year% \else% in LR environment we format the gregorian date within \textenglish @@ -111,7 +124,7 @@ \fi}} -\def\arabicnumber#1{\if@eastern@numerals{\protect\addfontfeature{Mapping=arabicdigits}\number#1}\else\RL{\reset@font\number#1}\fi} +\def\arabicnumber#1{\ifeastern@numerals{\addfontfeature{Mapping=arabicdigits}\number#1}\else\RL{\reset@font\number#1}\fi} \def\@ornatebracearabic#1{\RL{\char"FD3F\@arabic#1\char"FD3E}} \def\@ornatebracealph#1{\RL{\char"FD3F\@alph#1\char"FD3E}} @@ -122,7 +135,7 @@ \else% \ifnum#1<\z@\space\xpg@ill@value{#1}{abjad numeral}% \else% - \ifnum#1<10\expandafter\abj@num@i\number#1% + \ifnum#1<10\expandafter\abj@num@i@iso\number#1% \else% \ifnum#1<100\expandafter\abj@num@ii\number#1% \else% @@ -137,8 +150,13 @@ \fi } \def\abjad@zero{} +\def\abjad@three{ج\ifabjad@jim@notail\char"200D\fi} +\def\abj@num@i@iso#1{% + \ifcase#1\or ا\or ب\or\abjad@three\or د% + \or ه\char"200D\or و\or ز\or ح\or ط\fi% + \ifnum#1=\z@\abjad@zero\fi} \def\abj@num@i#1{% - \ifcase#1\or ا\or ب\or ج\char"200D\or د% + \ifcase#1\or ا\or ب\or\abjad@three\or د% \or ه\or و\or ز\or ح\or ط\fi% \ifnum#1=\z@\abjad@zero\fi} \def\abj@num@ii#1{% |