summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf116
1 files changed, 55 insertions, 61 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
index f95459e7d5b..47af125a2b7 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
@@ -1,4 +1,4 @@
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
%%% Adapted from a file contributed by Kamal Abdali
\ProvidesFile{gloss-urdu.ldf}[polyglossia: module for Urdu]
@@ -25,52 +25,46 @@
\setlanguagealias*{urdu}{ur}
\newif\if@western@numerals
-\define@choicekey*+{urdu}{numerals}[\xpg@val\xpg@nr]{eastern,western}[eastern]{%
- \ifcase\xpg@nr\relax
- % eastern:
- \@western@numeralsfalse%
- \SetLanguageKeys{urdu}{bcp47-extension-u=nu-arab}%
- \or
- % western:
- \@western@numeralstrue%
- \SetLanguageKeys{urdu}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Urdu, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Urdu numerals option `#1'}}
-
\newif\ifurdu@customsep\urdu@customsepfalse
\def\xpg@sepmark{}
-\define@key{urdu}{sectionsep}[.]{%
- \urdu@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
-
-%this is needed for \abjad in arabicnumbers.sty
-\define@boolkey{urdu}[urdu@]{abjadjimnotail}[true]{%
- \ifurdu@abjadjimnotail
- \abjad@jim@notailtrue%
- \else
- \abjad@jim@notailfalse
- \fi%
-}
-
\newif\if@hijrical
-\define@choicekey*+{urdu}{calendar}[\xpg@val\xpg@nr]{gregorian,hijri}[gregorian]{%
- \ifcase\xpg@nr\relax
- % gregorian:
- \@hijricalfalse
- \or
- % hijri:
- \@hijricaltrue
- \fi
- \xpg@info{Option: Urdu, calendar=\xpg@val}%
-}{\xpg@warning{Unknown Urdu calendar option `#1'}}
-\define@key{urdu}{hijricorrection}[0]{%
- \gdef\urdu@hijri@correction{#1}}%
+\DeclareKeys[polyglossia/gloss/urdu]
+ {
+ abjadjimnotail.if = abjad@jim@notail,
+ abjadjimnotail.default:n = true,
+ sectionsep.code = \gdef\xpg@sepmark{#1}\urdu@customseptrue,
+ sectionsep.default:n = .,
+ hijricorrection.code = \gdef\urdu@hijri@correction{#1},
+ hijricorrection.default:n = 0,
+ calendar.choice:,
+ calendar / gregorian.code =
+ {%
+ \@hijricalfalse
+ },
+ calendar / hijri.code =
+ {%
+ \@hijricaltrue
+ },
+ calendar.default:n = gregorian,
+ calendar/unknown.code = \xpg@warning{Unknown Urdu calendar option `#1'},
+ numerals.choice:,
+ numerals / eastern.code =
+ {%
+ \@western@numeralsfalse
+ \SetLanguageKeys{urdu}{bcp47-extension-u=nu-arab}%
+ },
+ numerals / western.code =
+ {%
+ \@western@numeralstrue
+ \SetLanguageKeys{urdu}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = eastern,
+ numerals/unknown.code = \xpg@warning{Unknown Urdu numerals option `#1'}
+ }
% This should set the defaults
-\setkeys{urdu}{calendar,numerals,hijricorrection}
+\SetGlossOptions{urdu}{calendar,numerals,hijricorrection}
\def\urdugregmonth#1{\ifcase#1%
\or جنوری\or فروری\or مارچ\or اپریل\or مئی\or جون\or جولائی\or اگست\or ستمبر\or اکتوبر\or نومبر\or دسمبر\fi}
@@ -157,16 +151,16 @@
}
\def\nourdu@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname%
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi%
}
\def\urdu@luatex@capsformat{%
%
% change chapter and part headings
\ifurdu@customsep
- \ifcsdef{chapter}{%
+ \ifcsname chapter\endcsname%
\let\xpg@save@thesection\thesection%
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
\let\xpg@save@theequation\theequation%
@@ -178,7 +172,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}
@@ -193,30 +187,30 @@
}
\def\nourdu@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@urdu{%