summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf97
1 files changed, 50 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
index 7bd32c3ddcd..6ad71c2ad06 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
@@ -1,4 +1,4 @@
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.3 -- 2024/09/23)
%
\ProvidesFile{gloss-syriac.ldf}[polyglossia: module for Syriac]
@@ -22,34 +22,37 @@
% BCP-47 compliant aliases
\setlanguagealias*{syriac}{syr}
-\def\syriacnumber#1{\@syriacnumber{#1}}%
+\def\syriacnumber#1{\@syriacnumber{#1}}
\newif\if@eastern@numerals
-\define@choicekey*+{syriac}{numerals}[\xpg@val\xpg@nr]{eastern,western,abjad}[eastern]{%
- \ifcase\xpg@nr\relax
- % eastern:
- \@eastern@numeralstrue
- \SetLanguageKeys{syriac}{bcp47-extension-u=nu-syrc}%
- \or
- % western:
- \@eastern@numeralsfalse
- \SetLanguageKeys{syriac}{bcp47-extension-u=nu-latn}%
- \or
- % abjad:
- \let\syriacnumber\abjadsyriac%
- \fi
- \xpg@info{Option: Syriac, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Syriac numerals option `#1'}}
-
\newif\ifsyriac@customsep\syriac@customsepfalse
\def\xpg@sepmark{}
-\define@key{syriac}{sectionsep}[.]{%
- \syriac@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
+
+\DeclareKeys[polyglossia/gloss/syriac]
+ {
+ sectionsep.code = \gdef\xpg@sepmark{#1}\syriac@customseptrue,
+ sectionsep.default:n = .,
+ numerals.choice:,
+ numerals / eastern.code =
+ {%
+ \@eastern@numeralstrue
+ \SetLanguageKeys{syriac}{bcp47-extension-u=nu-syrc}%
+ },
+ numerals / western.code =
+ {%
+ \@eastern@numeralsfalse
+ \SetLanguageKeys{syriac}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / abjad.code =
+ {%
+ \let\syriacnumber\abjadsyriac
+ },
+ numerals.default:n = eastern,
+ numerals/unknown.code = \xpg@warning{Unknown Syriac numerals option `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{syriac}{numerals=western}
+\InitializeGlossOptions{syriac}{numerals=western}
%\define@key{polyglossia}{syriaclocale}[default]{%
% \def\@syriac@locale{#1}}
@@ -136,13 +139,13 @@
\IfCharIsAvailableTF{0661}%
{\@ensure@LTR{\protect\arabicdigits{\number#1}}}%
{\@ensure@LTR{\arabicdigits{\number#1}}
- \ifcsdef{arabicfont}%
- {\@ensure@LTR{\protect\arabicdigits{\number#1}}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs:
- I am using \string\arabicfont instead}}%
+ \@ifundefined{arabicfont}%
{\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}%
\xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs:
since \string\arabicfont is not defined, we'll use Western numerals instead}}%
+ {\@ensure@LTR{\protect\arabicdigits{\number#1}}%
+ \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs:
+ I am using \string\arabicfont instead}}%
}%
\else
%%\RL{\protect\reset@font\number#1}%
@@ -180,16 +183,16 @@
}
\def\nosyriac@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname%
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi%
}
\def\syriac@luatex@capsformat{%
%
% change chapter and part headings
\ifsyriac@customsep
- \ifcsdef{chapter}{%
+ \ifcsname chapter\endcsname%
\let\xpg@save@thesection\thesection%
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
\let\xpg@save@theequation\theequation%
@@ -201,7 +204,7 @@
\let\xpg@save@thetable\thetable%
\renewcommand*\thetable{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@table}
- }{}
+ \fi%
\let\xpg@save@thesubsection\thesubsection%
\renewcommand\thesubsection
{\thesection\xpg@sepmark\@arabic\c@subsection}
@@ -216,30 +219,30 @@
}
\def\nosyriac@luatex@capsformat{%
- \ifcsdef{xpg@save@thesection}{%
+ \ifcsname xpg@save@thesection\endcsname%
\let\thesection\xpg@save@thesection%
- }{}%
- \ifcsdef{xpg@save@theequation}{%
+ \fi%
+ \ifcsname xpg@save@theequation\endcsname%
\let\theequation\xpg@save@theequation%
- }{}%
- \ifcsdef{xpg@save@thefigure}{%
+ \fi%
+ \ifcsname xpg@save@thefigure\endcsname%
\let\thefigure\xpg@save@thefigure%
- }{}%
- \ifcsdef{xpg@save@thetable}{%
+ \fi%
+ \ifcsname xpg@save@thetable\endcsname%
\let\thetable\xpg@save@thetable%
- }{}%
- \ifcsdef{xpg@save@thesubsection}{%
+ \fi%
+ \ifcsname xpg@save@thesubsection\endcsname%
\let\thesubsection\xpg@save@thesubsection%
- \ifcsdef{xpg@save@thesubsubsection}{%
+ \ifcsname xpg@save@thesubsubsection\endcsname%
\let\thesubsubsection\xpg@save@thesubsubsection%
- }{}%
- }{}%
- \ifcsdef{xpg@save@theparagraph}{%
+ \fi%
+ \fi%
+ \ifcsname xpg@save@theparagraph\endcsname%
\let\theparagraph\xpg@save@theparagraph%
- }{}%
- \ifcsdef{xpg@save@thesubparagraph}{%
+ \fi%
+ \ifcsname xpg@save@thesubparagraph\endcsname%
\let\thesubparagraph\xpg@save@thesubparagraph%
- }{}%
+ \fi%
}
\def\blockextras@syriac{%