summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-12 18:23:29 +0000
committerKarl Berry <karl@freefriends.org>2008-07-12 18:23:29 +0000
commit9bca6550cfe2de5380ebe394480ccb24126f2863 (patch)
tree2abb49bb229bed346f86399bc005c1ed7038d867 /Master/texmf-dist/tex/xelatex/polyglossia
parent037cf3d536e0f1fa1cccb00e1f26e8279abceb40 (diff)
new xetex package polyglossia (11jul08)
git-svn-id: svn://tug.org/texlive/trunk@9485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/polyglossia')
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def69
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty203
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf67
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf278
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf68
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf68
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf45
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf50
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf85
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf132
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf45
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf62
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf43
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf57
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf54
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf73
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf62
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf111
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf70
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf56
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf200
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf65
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf125
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf44
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf72
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf688
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf209
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf99
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf89
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf44
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf48
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf48
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf57
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf46
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf58
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf517
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf58
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf58
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf56
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf49
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf46
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf205
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf71
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf103
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf48
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf155
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf46
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf46
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf58
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf63
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf162
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf173
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf80
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf136
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf59
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf47
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty331
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty84
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty360
59 files changed, 6601 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def b/Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def
new file mode 100644
index 00000000000..85576f39f71
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def
@@ -0,0 +1,69 @@
+%%%%%%%%%%%%% cal-util.def %%%%%%%%%%%%%%%%
+% Macros shared by hijrical and hebrewcal %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% the following is adapted from hebcal.sty in babel
+\def\@Remainder#1#2#3{%
+ #3 = #1% % c = a
+ \divide #3 by #2% % c = a/b
+ \multiply #3 by -#2% % c = -b(a/b)
+ \advance #3 by #1}% % c = a - b(a/b)
+\newif\if@Divisible
+\def\@CheckIfDivisible#1#2{%
+ {%
+ \countdef\tmpx=0% % temporary variable
+ \@Remainder{#1}{#2}{\tmpx}%
+ \ifnum\tmpx=0%
+ \global\@Divisibletrue%
+ \else%
+ \global\@Divisiblefalse%
+ \fi}}
+\newif\if@GregorianLeap
+\def\@CheckIfGregorianLeap#1{%
+ {%
+ \@CheckIfDivisible{#1}{4}%
+ \if@Divisible%
+ \@CheckIfDivisible{#1}{100}%
+ \if@Divisible%
+ \@CheckIfDivisible{#1}{400}%
+ \if@Divisible%
+ \global\@GregorianLeaptrue%
+ \else%
+ \global\@GregorianLeapfalse%
+ \fi%
+ \else%
+ \global\@GregorianLeaptrue%
+ \fi%
+ \else%
+ \global\@GregorianLeapfalse%
+ \fi%
+ }}
+%%
+
+\newcounter{tmpA}\newcounter{tmpB}
+\newcounter{tmpC}\newcounter{tmpD}
+\newcounter{tmpE}\newcounter{tmpF}
+
+
+%% This is an algorithm from Reingold & Dershowitz,
+%% Calendrical Calculations, The Millenium Edition
+%%
+\def\@FixedFromGregorian#1#2#3#4{%
+ \setcounter{tmpA}{(#1-1)*365}%
+ \setcounter{tmpB}{(#1-1)/4}%
+ \setcounter{tmpC}{(#1-1)/100}%
+ \setcounter{tmpD}{(#1-1)/400}%
+ \setcounter{tmpE}{(367*#2-362)/12}%
+ \ifnum#2<3%
+ \setcounter{tmpF}{0}%
+ \else%
+ \@CheckIfGregorianLeap{#1}%
+ \if@GregorianLeap%
+ \setcounter{tmpF}{-1}%
+ \else%
+ \setcounter{tmpF}{-2}%
+ \fi%
+ \fi%
+ \@ifundefined{c@#4}{\global\newcounter{#4}}{}%
+ \setcounter{#4}{\value{tmpA}+\value{tmpB}-\value{tmpC}+\value{tmpD}+\value{tmpE}+\value{tmpF}+#3}%
+}
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty b/Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty
new file mode 100644
index 00000000000..8768825308f
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty
@@ -0,0 +1,203 @@
+\ProvidesPackage{farsical}
+ [2008/07/02 v0.1 %
+ Farsi (jalali) calendar]
+\RequirePackage{bidi,calc}
+
+%TODO - rewrite completely using use calc
+%% - use Reingold & Dershowitz ME
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Modified from Arabiftoday.sty which is part of the Arabi package:
+%%% Copyright (C) 2006 Youssef Jabri
+%%% itself a modification of the code in the FarsiTeX system:
+%%% Copyright (C) 1996 Hassan Abolhassani
+%%% Copyright (C) 1996-2001 Roozbeh Pournader <roozbeh@sharif.edu>
+%%% Copyright (C) 2000-2001 Behdad Esfahbod <behdad@bamdad.org>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifJALALI@leap \newif\ifJALALI@kabiseh
+\newcount\JALALI@i \newcount\JALALI@y \newcount\JALALI@m \newcount\JALALI@d
+\newcount\JALALI@latini \newcount\JALALI@farsii
+\newcount\JALALI@latinii \newcount\JALALI@farsiii
+\newcount\JALALI@latiniii \newcount\JALALI@farsiiii
+\newcount\JALALI@latiniv \newcount\JALALI@farsiiv
+\newcount\JALALI@latinv \newcount\JALALI@farsiv
+\newcount\JALALI@latinvi \newcount\JALALI@farsivi
+\newcount\JALALI@latinvii \newcount\JALALI@farsivii
+\newcount\JALALI@latinviii \newcount\JALALI@farsiviii
+\newcount\JALALI@latinix \newcount\JALALI@farsiix
+\newcount\JALALI@latinx \newcount\JALALI@farsix
+\newcount\JALALI@latinxi \newcount\JALALI@farsixi
+\newcount\JALALI@latinxii \newcount\JALALI@farsixii
+ \newcount\JALALI@farsixiii
+
+\newcount\JALALI@temp
+\newcount\JALALI@temptwo
+\newcount\JALALI@tempthree
+\newcount\JALALI@yModHundred
+\newcount\JALALI@thirtytwo
+\newcount\JALALI@dn
+\newcount\JALALI@sn
+\newcount\JALALI@mminusone
+
+% \ftoday renamed to \Jalalitoday - FC
+\def\Jalalitoday{%
+\JALALI@y=\year \JALALI@m=\month \JALALI@d=\day
+%
+\JALALI@temp=\JALALI@y
+\divide\JALALI@temp by 100\relax
+\multiply\JALALI@temp by 100\relax
+\JALALI@yModHundred=\JALALI@y
+\advance\JALALI@yModHundred by -\JALALI@temp\relax
+%
+\ifodd\JALALI@yModHundred
+ \JALALI@leapfalse
+\else
+ \JALALI@temp=\JALALI@yModHundred
+ \divide\JALALI@temp by 2\relax
+ \ifodd\JALALI@temp\JALALI@leapfalse
+ \else
+ \ifnum\JALALI@yModHundred=0%
+ \JALALI@temp=\JALALI@y
+ \divide\JALALI@temp by 400\relax
+ \multiply\JALALI@temp by 400\relax
+ \ifnum\JALALI@y=\JALALI@temp\JALALI@leaptrue\else\JALALI@leapfalse\fi
+ \else\JALALI@leaptrue
+ \fi
+ \fi
+\fi
+%
+\JALALI@latini=31\relax
+\ifJALALI@leap
+ \JALALI@latinii = 29\relax
+\else
+ \JALALI@latinii = 28\relax
+\fi
+\JALALI@latiniii = 31\relax
+\JALALI@latiniv = 30\relax
+\JALALI@latinv = 31\relax
+\JALALI@latinvi = 30\relax
+\JALALI@latinvii = 31\relax
+\JALALI@latinviii = 31\relax
+\JALALI@latinix = 30\relax
+\JALALI@latinx = 31\relax
+\JALALI@latinxi = 30\relax
+\JALALI@latinxii = 31\relax
+%
+\JALALI@thirtytwo=32\relax
+%
+\JALALI@temp=\JALALI@y
+\advance\JALALI@temp by -17\relax
+\JALALI@temptwo=\JALALI@temp
+\divide\JALALI@temptwo by 33\relax
+\multiply\JALALI@temptwo by 33\relax
+\advance\JALALI@temp by -\JALALI@temptwo
+\ifnum\JALALI@temp=\JALALI@thirtytwo\JALALI@kabisehfalse
+\else
+ \JALALI@temptwo=\JALALI@temp
+ \divide\JALALI@temptwo by 4\relax
+ \multiply\JALALI@temptwo by 4\relax
+ \advance\JALALI@temp by -\JALALI@temptwo
+ \ifnum\JALALI@temp=\z@\JALALI@kabisehtrue\else\JALALI@kabisehfalse\fi
+\fi
+%
+% --BE
+% In fact farsii is equal to the Leap years from a fixed year to the last
+% year minus the Kabise years from a fixed year to the last year plus a const.
+%
+\JALALI@tempthree=\JALALI@y % Number of Leap years
+\advance\JALALI@tempthree by -1
+\JALALI@temp=\JALALI@tempthree % T := (MY-1) div 4
+\divide\JALALI@temp by 4\relax
+\JALALI@temptwo=\JALALI@tempthree % T := T - ((MY-1) div 100)
+\divide\JALALI@temptwo by 100\relax
+\advance\JALALI@temp by -\JALALI@temptwo
+\JALALI@temptwo=\JALALI@tempthree % T := T + ((MY-1) div 400)
+\divide\JALALI@temptwo by 400\relax
+\advance\JALALI@temp by \JALALI@temptwo
+\advance\JALALI@tempthree by -611 % Number of Kabise years
+\JALALI@temptwo=\JALALI@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\JALALI@temptwo by 33\relax
+\multiply\JALALI@temptwo by 8\relax
+\advance\JALALI@temp by -\JALALI@temptwo
+\JALALI@temptwo=\JALALI@tempthree %
+\divide\JALALI@temptwo by 33\relax
+\multiply\JALALI@temptwo by 33\relax
+\advance\JALALI@tempthree by -\JALALI@temptwo
+\ifnum\JALALI@tempthree=32\advance\JALALI@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\JALALI@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\JALALI@temp by -\JALALI@tempthree
+\advance\JALALI@temp by -137 % T := T - 137 Adjust the value
+\JALALI@farsii=31
+\advance\JALALI@farsii by -\JALALI@temp % now 31 - T is the farsii
+%
+\JALALI@farsiii = 30\relax
+\ifJALALI@kabiseh
+ \JALALI@farsiiii = 30\relax
+\else
+ \JALALI@farsiiii = 29\relax
+\fi
+\JALALI@farsiiv = 31\relax
+\JALALI@farsiv = 31\relax
+\JALALI@farsivi = 31\relax
+\JALALI@farsivii = 31\relax
+\JALALI@farsiviii= 31\relax
+\JALALI@farsiix = 31\relax
+\JALALI@farsix = 30\relax
+\JALALI@farsixi = 30\relax
+\JALALI@farsixii = 30\relax
+\JALALI@farsixiii= 30\relax
+%
+\JALALI@dn= 0\relax
+\JALALI@sn= 0\relax
+\JALALI@mminusone=\JALALI@m
+\advance\JALALI@mminusone by -1\relax
+%
+\JALALI@i=0\relax
+\ifnum\JALALI@i < \JALALI@mminusone
+\loop
+\advance \JALALI@i by 1\relax
+\advance\JALALI@dn by \csname JALALI@latin\romannumeral\the\JALALI@i\endcsname
+\ifnum\JALALI@i<\JALALI@mminusone \repeat
+\fi
+\advance \JALALI@dn by \JALALI@d
+%
+\JALALI@i=1\relax
+\JALALI@sn = \JALALI@farsii
+\ifnum \JALALI@sn<\JALALI@dn
+\loop
+\advance \JALALI@i by 1\relax
+\advance\JALALI@sn by \csname JALALI@farsi\romannumeral\the\JALALI@i\endcsname
+\ifnum \JALALI@sn<\JALALI@dn \repeat
+\fi
+\ifnum \JALALI@i < 4
+ \JALALI@m = 9 \advance\JALALI@m by \JALALI@i
+ \advance \JALALI@y by -622\relax
+\else
+ \JALALI@m = \JALALI@i \advance \JALALI@m by -3\relax
+ \advance \JALALI@y by -621\relax
+\fi
+\advance\JALALI@sn by -\csname JALALI@farsi\romannumeral\the\JALALI@i%
+\endcsname
+\ifnum\JALALI@i = 1
+ \JALALI@d = \JALALI@dn \advance \JALALI@d by 30 \advance\JALALI@d by -\JALALI@farsii
+\else
+ \JALALI@d = \JALALI@dn \advance \JALALI@d by -\JALALI@sn
+\fi
+%% DATE FORMATTING
+\if@rl{\farsinumber\JALALI@d\space%
+\Jalalimonth{\JALALI@m}\space\farsinumber\JALALI@y}%
+\else%
+\number\JALALI@d\space\JalalimonthEnglish{\JALALI@m}%
+\space\number\JALALI@y%
+\fi
+}
+%%%
+\def\Jalalimonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or خرداد\or تیر\or مرداد\or شهریور
+\or مهر\or آبان\or آذر\or دی\or بهمن\or اسفند
+\fi}
+\def\JalalimonthEnglish#1{\ifcase#1%
+\or Farvardīn\or Ordībehesht\or Khordād\or Tīr
+\or Mordād\or Shahrīvar\or Mihr\or Ābān\or Āzar
+\or Dai\or Bahman\or Esfand\fi}
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf
new file mode 100644
index 00000000000..5eaf127b509
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf
@@ -0,0 +1,67 @@
+\ProvidesFile{gloss-albanian.ldf}[polyglossia: module for albanian]
+\makeatletter
+\def\albanian@font{\normalfontlatin}
+
+\ifx\l@albanian\@undefined
+ \xpg@nopatterns{Albanian}
+ \adddialect\l@albanian0\fi
+
+\def\captionsalbanian{%
+ \def\refname{\textalbanian{Referencat}}%
+ \def\abstractname{\textalbanian{Përmbledhja}}%
+ \def\bibname{\textalbanian{Bibliografia}}%
+ \def\prefacename{\textalbanian{Parathenia}}%
+ \def\chaptername{\textalbanian{Kapitulli}}%
+ \def\appendixname{\textalbanian{Shtesa}}%
+ \def\contentsname{\textalbanian{Përmbajta}}%
+ \def\listfigurename{\textalbanian{Figurat}}%
+ \def\listtablename{\textalbanian{Tabelat}}%
+ \def\indexname{\textalbanian{Indeksi}}%
+ \def\figurename{\textalbanian{Figura}}%
+ \def\tablename{\textalbanian{Tabela}}%
+ %\def\thepart{\textalbanian{}}%
+ \def\partname{\textalbanian{Pjesa}}%
+ \def\pagename{\textalbanian{Faqe}}%
+ \def\seename{\textalbanian{shiko}}%
+ \def\alsoname{\textalbanian{shiko dhe}}%
+ %\def\enclname{\textalbanian{}}%
+ %\def\ccname{\textalbanian{}}%
+ %\def\headtoname{\textalbanian{}}%
+ \def\proofname{\textalbanian{Vërtetim}}%
+ \def\glossaryname{\textalbanian{Përhasja e Fjalëve}}%
+ }
+\def\datealbanian{%
+ \def\today{\textalbanian{{\number\day~\ifcase\month\or
+ Janar\or Shkurt\or Mars\or Prill\or Maj\or
+ Qershor\or Korrik\or Gusht\or Shtator\or Tetor\or Nëntor\or
+ Dhjetor\fi \space \number\year}}}}
+
+\def\albanian@language{\protect\language=\l@albanian}
+
+\setlocalhyphenmins{albanian}{2}{2}
+
+\def\noextras@albanian{%
+ \nofrench@indent%
+ }
+
+\def\blockextras@albanian{%
+ \french@indent%
+ }
+
+\endinput
+
+%\def\sh{\mathop{\operator@font sh}\nolimits} % same as \sinh
+%\def\ch{\mathop{\operator@font ch}\nolimits} % same as \cosh
+%\def\th{\mathop{\operator@font th}\nolimits} % same as \tanh
+%\def\cth{\mathop{\operator@font cth}\nolimits} % same as \coth
+%\def\arsh{\mathop{\operator@font arsh}\nolimits}
+%\def\arch{\mathop{\operator@font arch}\nolimits}
+%\def\arth{\mathop{\operator@font arth}\nolimits}
+%\def\arcth{\mathop{\operator@font arcth}\nolimits}
+%\def\tg{\mathop{\operator@font tg}\nolimits} % same as \tan
+%\def\ctg{\mathop{\operator@font ctg}\nolimits} % same as \cot
+%\def\arctg{\mathop{\operator@font arctg}\nolimits} % same as \arctan
+%\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
+%\def\Prob{\mathop{\mathsf P\hskip0pt}\nolimits}
+%\def\Expect{\mathop{\mathsf E\hskip0pt}\nolimits}
+%\def\Variance{\mathop{\mathsf D\hskip0pt}\nolimits}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf
new file mode 100644
index 00000000000..6b9c82e0e44
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf
@@ -0,0 +1,278 @@
+\ProvidesFile{gloss-arabic.ldf}[polyglossia: module for arabic]
+\RequirePackage{bidi}[0.3]
+\RequirePackage{hijrical}
+\makeatletter
+
+\ifx\l@arabic\@undefined
+ \xpg@nopatterns{arabic}%
+ \adddialect\l@arabic0
+\fi
+
+\def\arabic@RL{\relax}
+
+\newif\if@eastern@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\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}}}
+
+\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}{hijricorrection}[0]{%
+ \gdef\@hijri@correction{#1}}%
+
+% This should set the defaults
+\setkeys{arabic}{locale,calendar,numerals,hijricorrection}
+
+\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}
+\def\arabicgregmonth@mashriq#1{\ifcase#1%
+ % Iraq Syria Jordan Lebanon Palestine
+ \or كانون الثاني\or شباط\or آذار\or نيسان\or أيار\or حزيران\or تموز\or آب\or أيلول\or تشرين الأول\or تشرين الثاني\or كانون الأول\fi}
+\def\arabicgregmonth@libya#1{\ifcase#1%
+ %Lybia «تعرف في ليبيا بأسماء عربية وضعها معمر القذافي ترمز إلى فصول السنة وبعض الشخصيات التاريخية» (ar.wikipedia.org)
+ \or أي النار\or النوار\or الربيع\or الطير\or الماء\or الصيف\or ناصر\or هانيبال\or الفاتح\or التمور\or الحرث\or الكانون\fi}
+\def\arabicgregmonth@morocco#1{\ifcase#1%
+ \or يناير\or فبراير\or مارس\or أبريل\or ماي\or يونيو\or يوليوز\or غشت\or شتنبر\or أكتوبر\or نونبر\or دجنبر\fi}
+\def\arabicgregmonth@algeria#1{\ifcase#1%
+ % Tunisia and Algeria
+ \or جانفي\or فيفري\or مارس\or أفريل\or ماي\or جوان\or جويلية\or أوت\or سبتمبر\or أكتوبر\or نوفمبر\or ديسمبر\fi}
+\let\arabicgregmonth@tunisia\arabicgregmonth@algeria
+\def\arabicgregmonth@mauritania#1{\ifcase#1%
+ \or يناير\or فبراير\or مارس\or إبريل\or مايو\or يونيو\or يوليو\or أغشت\or شتمبر\or أكتوبر\or نوفمبر\or دجمبر\fi}
+
+\def\@arabic@month#1{\ifcsdef{arabicgregmonth@#1}{\expandafter\csname arabicgregmonth@#1\endcsname}%
+{\xpg@warning{Option `locale=#1' is not defined for Arabic: using `default' instead}%
+\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\datearabic{%
+ \def\today{%
+ \if@hijrical%
+ \Hijritoday[\@hijri@correction]%
+ \else%
+ \if@rl%
+ \arabicnumber\day\space\@@arabic@month{\month}%
+ \space\arabicnumber\year%
+ \else% in LR environment we format the gregorian date within \textenglish
+ \ifcsdef{english@loaded}{\textenglish{\today}}%else US format
+ {\normalfontlatin\ifcase\month\or January\or February\or March\or April\or May\or June\or%
+ July\or August\or September\or October\or November\or December\fi%
+ \space\number\day,\space\number\year}%
+ \fi%
+ \fi}}
+
+
+\def\arabicnumber#1{\if@eastern@numerals{\protect\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}}
+
+\ifcsdef{abjad}{}{%
+\def\abjad#1{%
+\ifnum#1>1999\xpg@ill@value{#1}{abjad numeral}%
+\else%
+\ifnum#1<\z@\space\xpg@ill@value{#1}{abjad numeral}%
+ \else%
+ \ifnum#1<10\expandafter\abj@num@i\number#1%
+ \else%
+ \ifnum#1<100\expandafter\abj@num@ii\number#1%
+ \else%
+ \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
+ \else%
+ \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+\def\abjad@zero{}
+\def\abj@num@i#1{%
+ \ifcase#1\or ا\or ب\or ج\char"200D\or د%
+ \or ه\or و\or ز\or ح\or ط\fi%
+ \ifnum#1=\z@\abjad@zero\fi}
+\def\abj@num@ii#1{%
+ \ifcase#1\or ي\or ك\or ل\or م\or ن%
+ \or س\or ع\or ف\or ص\fi%
+ \ifnum#1=\z@\fi\abj@num@i}
+\def\abj@num@iii#1{%
+ \ifcase#1\or ق\or ر\or ش\or ت\or ث%
+ \or خ\or ذ\or ض\or ظ\fi%
+ \ifnum#1=\z@\fi\abj@num@ii}
+\def\abj@num@iv#1{%
+ \ifcase#1\or غ\fi
+ \ifnum#1=\z@\fi\abj@num@iii}
+}
+
+\def\abjadmaghribi#1{%
+\ifnum#1>1999 \xpg@ill@value{#1}{abjad}%
+\else
+ \ifnum#1<\z@\space\xpg@ill@value{#1}{abjad}%
+ \else
+ \ifnum#1<10\expandafter\abj@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\abj@maghribi@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\abj@maghribi@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\abj@maghribi@num@iv\number#1%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+
+
+%maghribi س -> ص ص -> ض ش -> س ض -> ظ ظ -> غ غ -> ش
+\def\abj@maghribi@num@ii#1{%
+ \ifcase#1\or ي\or ك\or ل\or م\or ن%
+ \or ص\or ع\or ف\or ض\fi
+ \ifnum#1=\z@\abjad@zero\fi\abj@num@i}
+\def\abj@maghribi@num@iii#1{%
+ \ifcase#1\or ق\or ر\or س\or ت\or ث%
+ \or خ\or ذ\or ظ\or غ\fi
+ \ifnum#1=\z@\fi\abj@maghribi@num@ii}
+\def\abj@maghribi@num@iv#1{%
+ \ifcase#1\or ش\fi
+ \ifnum#1=\z@\fi\abj@maghribi@num@iii}
+
+\def\arabic@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \let\@alph\abjad%
+ \let\@Alph\abjad%
+}
+\def\noarabic@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+ }
+
+\def\arabic@globalnumbers{%
+ \let\default@arabic\@arabic%
+ \let\@arabic\arabicnumber%
+ % For some reason these need to be set separately:
+ \renewcommand\thefootnote{\protect\arabicnumber{\c@footnote}}%
+ %%\ifcsundef{thechapter}{}{\renewcommand\thechapter{\protect\arabicnumber{\c@chapter}}}% <<<<<<<<<<
+ %%\ifcsundef{thesection}{}{\renewcommand\thesection{\protect\arabicnumber{\c@section}}}% <<<<<<<<<<
+ }
+
+\def\noarabic@globalnumbers{
+ \let\@arabic\default@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+ %%\ifcsundef{thechapter}{}{\renewcommand\thechapter{\protect\number{\c@chapter}}}% <<<<<<<<<<
+ %%\ifcsundef{thesection}{}{\renewcommand\thesection{\protect\number{\c@section}}}% <<<<<<<<<<
+ }
+
+\def\arabic@language{\language=\l@arabic}
+
+\def\arabic@font{%
+ \@ifundefined{arabicfont}{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@check@ot@script{arab}%
+ \if@tempswa%
+ \addfontfeature{Script=Arabic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Arabic script!^^J
+ Please define \string\arabicfont\space with \string\newfontfamily}%
+ \fi%
+ }%
+ {\arabicfont}%
+}
+% TODO add setup to define Sans and Mono Arabic fonts if desired
+\def\arabic@font@sf{%
+ \@ifundefined{arabicfontsf}{%
+% \sffamily% FIXME
+% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Arabic}%
+% \else%
+ \arabic@font%
+% \fi%
+ }%
+ {\arabicfontsf}%
+}
+\def\arabic@font@tt{%
+ \@ifundefined{arabicfonttt}{%
+% \ttfamily% FIXME
+% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Arabic}%
+% \else%
+ \arabic@font%
+% \fi%
+ }%
+ {\arabicfonttt}%
+}
+
+\def\selectnormalfontarabic{%
+ \let\normalfont=\arabic@font%
+ \let\rmfamily=\arabic@font%
+ \let\sffamily=\arabic@font@sf%
+ \let\ttfamily=\arabic@font@tt%
+ \def\reset@font{\normalfont}}
+
+\def\blockextras@arabic{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ % TODO disable \@Roman and \@roman ?
+ }
+\def\noextras@arabic{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf
new file mode 100644
index 00000000000..74965331124
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf
@@ -0,0 +1,68 @@
+\ProvidesFile{gloss-bahasai.ldf}[polyglossia: module for bahasa indonesia]
+\makeatletter
+\def\bahasai@font{\normalfontlatin}
+
+\ifx\l@bahasa\@undefined
+ \ifx\l@bahasai\@undefined
+ \ifx\l@indon\@undefined
+ \ifx\l@indonesian\@undefined
+ \ifx\l@bahasam\@undefined
+ \ifx\l@malay\@undefined
+ \ifx\l@meyalu\@undefined
+ \xpg@nopatterns{Bahasa Indonesia}
+ \adddialect\l@bahasa0\relax
+ \else
+ \let\l@bahasa\l@meyalu
+ \fi
+ \else
+ \let\l@bahasa\l@malay
+ \fi
+ \else
+ \let\l@bahasa\l@bahasam
+ \fi
+ \else
+ \let\l@bahasa\l@indonesian
+ \fi
+ \else
+ \let\l@bahasa\l@indon
+ \fi
+ \else
+ \let\l@bahasa\l@bahasai
+ \fi
+\fi
+
+\def\captionsbahasai{%
+ \def\refname{\textbahasai{Pustaka}}%
+ \def\abstractname{\textbahasai{Ringkasan}}%
+ \def\bibname{\textbahasai{Bibliografi}}%
+ \def\prefacename{\textbahasai{Pendahuluan}}%
+ \def\chaptername{\textbahasai{Bab}}%
+ \def\appendixname{\textbahasai{Lampiran}}%
+ \def\contentsname{\textbahasai{Daftar Isi}}%
+ \def\listfigurename{\textbahasai{Daftar Gambar}}%
+ \def\listtablename{\textbahasai{Daftar Tabel}}%
+ \def\indexname{\textbahasai{Indeks}}%
+ \def\figurename{\textbahasai{Gambar}}%
+ \def\tablename{\textbahasai{Tabel}}%
+ %\def\thepart{}%
+ \def\partname{\textbahasai{Bagian}}%
+ \def\pagename{\textbahasai{Halaman}}%
+ \def\seename{\textbahasai{lihat}}%
+ \def\alsoname{\textbahasai{lihat juga}}%
+ \def\enclname{\textbahasai{Lampiran}}%
+ \def\ccname{cc}%
+ \def\headtoname{Kepada}%
+ \def\proofname{\textbahasai{Bukti}}%
+ \def\glossaryname{\textbahasai{Daftar Istilah}}%
+ }
+\def\datebahasai{%
+ \def\today{\textbahasai{\number\day~\ifcase\month\or
+ Januari\or Pebruari\or Maret\or April\or Mei\or Juni\or
+ Juli\or Agustus\or September\or Oktober\or Nopember\or Desember\fi
+ \space \number\year}}}
+
+\def\bahasai@language{\protect\language=\l@bahasai}
+
+\setlocalhyphenmins{bahasai}{2}{2}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf
new file mode 100644
index 00000000000..fa5b3da805d
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf
@@ -0,0 +1,68 @@
+\ProvidesFile{gloss-bahasam.ldf}[polyglossia: module for bahasa malaysia]
+\makeatletter
+\def\bahasam@font{\normalfontlatin}
+
+\ifx\l@malay\@undefined
+ \ifx\l@meyalu\@undefined
+ \ifx\l@bahasam\@undefined
+ \ifx\l@bahasa\@undefined
+ \ifx\l@bahasai\@undefined
+ \ifx\l@indon\@undefined
+ \ifx\l@indonesian\@undefined
+ \xpg@nopatterns{Bahasa Malaysia}
+ \adddialect\l@malay0\relax
+ \else
+ \let\l@malay\l@indonesian
+ \fi
+ \else
+ \let\l@malay\l@indon
+ \fi
+ \else
+ \let\l@malay\l@bahasai
+ \fi
+ \else
+ \let\l@malay\l@bahasa
+ \fi
+ \else
+ \let\l@malay\l@bahasam
+ \fi
+ \else
+ \let\l@malay\l@meyalu
+ \fi
+\fi
+
+\def\captionsbahasam{%
+ \def\refname{\textbahasam{Pustaka}}%
+ \def\abstractname{\textbahasam{Ringkasan}}%
+ \def\bibname{\textbahasam{Bibliografi}}%
+ \def\prefacename{\textbahasam{Pendahuluan}}%
+ \def\chaptername{\textbahasam{Bab}}%
+ \def\appendixname{\textbahasam{Lampiran}}%
+ \def\contentsname{\textbahasam{Kandungan}}%
+ \def\listfigurename{\textbahasam{Senarai Gambar}}%
+ \def\listtablename{\textbahasam{Senarai Jadual}}%
+ \def\indexname{\textbahasam{Indeks}}%
+ \def\figurename{\textbahasam{Gambar}}%
+ \def\tablename{\textbahasam{Jadual}}%
+ \def\thepart{}\textbahasam{}%
+ \def\partname{\textbahasam{Bahagian}}%
+ \def\pagename{\textbahasam{Halaman}}%
+ \def\seename{\textbahasam{lihat}}%
+ \def\alsoname{\textbahasam{lihat juga}}%
+ \def\enclname{\textbahasam{Lampiran}}%
+ \def\ccname{\textbahasam{cc}}%
+ \def\headtoname{\textbahasam{Kepada}}%
+ \def\proofname{\textbahasam{Bukti}}%
+ \def\glossaryname{\textbahasam{Istilah}}%
+ }
+\def\datebahasam{%
+ \def\today{\textbahasam{\number\day~\ifcase\month\or
+ Januari\or Pebruari\or Mac\or April\or Mei\or Jun\or
+ Julai\or Ogos\or September\or Oktober\or November\or Disember\fi
+ \space \number\year}}}
+
+\def\bahasam@language{\protect\language=\l@bahasam}
+
+\setlocalhyphenmins{bahasam}{2}{2}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf
new file mode 100644
index 00000000000..1aace86bd9f
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf
@@ -0,0 +1,45 @@
+\ProvidesFile{gloss-basque.ldf}[polyglossia: module for basque]
+\makeatletter
+\def\basque@font{\normalfontlatin}
+
+\ifx\l@basque\@undefined%
+ \xpg@nopatterns{Basque}%
+ \adddialect\l@basque0%
+\fi
+
+\def\captionsbasque{%
+ \def\refname{\textbasque{Erreferentziak}}%
+ \def\abstractname{\textbasque{Laburpena}}%
+ \def\bibname{\textbasque{Bibliografia}}%
+ \def\prefacename{\textbasque{Hitzaurrea}}%
+ \def\chaptername{\textbasque{Kapitulua}}%
+ \def\appendixname{\textbasque{Eranskina}}%
+ \def\contentsname{\textbasque{Gaien Aurkibidea}}%
+ \def\listfigurename{\textbasque{Irudien Zerrenda}}%
+ \def\listtablename{\textbasque{Taulen Zerrenda}}%
+ \def\indexname{\textbasque{Kontzeptuen Aurkibidea}}%
+ \def\figurename{\textbasque{Irudia}}%
+ \def\tablename{\textbasque{Taula}}%
+ \def\thepart{\textbasque{}}%
+ \def\partname{\textbasque{Atala}}%
+ \def\pagename{\textbasque{Orria}}%
+ \def\seename{\textbasque{Ikusi}}%
+ \def\alsoname{\textbasque{Ikusi, halaber}}%
+ \def\enclname{\textbasque{Erantsia}}%
+ \def\ccname{\textbasque{Kopia}}%
+ \def\headtoname{\textbasque{Nori}}%
+ \def\proofname{\textbasque{Frogapena}}%
+ \def\glossaryname{\textbasque{Glosarioa}}%
+ }
+\def\datebasque{%
+ \def\today{\textbasque{\number\year.eko\space\ifcase\month\or
+ urtarrilaren\or otsailaren\or martxoaren\or apirilaren\or
+ maiatzaren\or ekainaren\or uztailaren\or abuztuaren\or
+ irailaren\or urriaren\or azaroaren\or
+ abenduaren\fi~\number\day}}}
+
+\def\basque@language{\protect\language=\l@basque}
+
+\setlocalhyphenmins{basque}{2}{2}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf
new file mode 100644
index 00000000000..46b5122efd5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf
@@ -0,0 +1,50 @@
+\ProvidesFile{gloss-portuges.ldf}[polyglossia: module for portuguese]
+\makeatletter
+\def\portuges@font{\normalfontlatin}
+
+%FIXME check this:
+\ifx\l@portuges\@undefined
+ \ifx\l@portuguese\@undefined
+ \xpg@nopatterns{Portuguese}
+ \adddialect\l@portuges0
+ \else
+ \let\l@portuges\l@portuguese
+ \fi
+\fi
+
+\def\captionsbrazil{%
+ \def\refname{\textbrazil{Referências}}%
+ \def\abstractname{\textbrazil{Resumo}}%
+ \def\bibname{\textbrazil{Referências Bibliográficas}}%
+ \def\prefacename{\textbrazil{Prefácio}}%
+ \def\chaptername{\textbrazil{Capítulo}}%
+ \def\appendixname{\textbrazil{Apêndice}}%
+ \def\contentsname{\textbrazil{Sumário}}%
+ \def\listfigurename{\textbrazil{Lista de Figuras}}%
+ \def\listtablename{\textbrazil{Lista de Tabelas}}%
+ \def\indexname{\textbrazil{Índice Remissivo}}%
+ \def\figurename{\textbrazil{Figura}}%
+ \def\tablename{\textbrazil{Tabela}}%
+ %\def\thepart{\textbrazil{}}%
+ \def\partname{\textbrazil{Parte}}%
+ \def\pagename{\textbrazil{Página}}%
+ \def\seename{\textbrazil{veja}}%
+ \def\alsoname{\textbrazil{veja também}}%
+ \def\enclname{\textbrazil{Anexo}}%
+ \def\ccname{\textbrazil{Cópia para}}%
+ \def\headtoname{\textbrazil{Para}}%
+ \def\proofname{\textbrazil{Demonstração}}%
+ \def\glossaryname{\textbrazil{Glossary}}%
+ }
+\def\datebrazil{%
+ \def\today{\textbrazil{\number\day\space de\space\ifcase\month\or
+ janeiro\or fevereiro\or março\or abril\or maio\or junho\or
+ julho\or agosto\or setembro\or outubro\or novembro\or dezembro%
+ \fi\space de\space\number\year}}%
+ }
+
+\def\brazil@language{\protect\language=\l@portuges}
+
+\setlocalhyphenmins{brazil}{2}{3}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf
new file mode 100644
index 00000000000..a21e9669fed
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf
@@ -0,0 +1,85 @@
+\ProvidesFile{gloss-breton.ldf}[polyglossia: module for breton]
+\makeatletter
+\def\breton@font{\normalfontlatin}
+
+\ifx\l@breton\@undefined%
+ \xpg@nopatterns{Breton}%
+ \adddialect\l@breton0%
+\fi
+
+\def\breton@punctuation{%
+ \frenchspacing%
+ \XeTeXinterchartokenstate=1%
+ \XeTeXcharclass `\! 7%
+ \XeTeXcharclass `\; 7%
+ \XeTeXcharclass `\: 7%
+ \XeTeXcharclass `\? 8%
+ \XeTeXinterchartoks 0 7 = {\unskip\kern.1667em}%
+ \XeTeXinterchartoks 0 8 = {\unskip\kern\fontdimen2\font\kern-1.4\fontdimen3\font}%
+ }
+
+\def\nobreton@punctuation{%
+ \nonfrenchspacing%
+ \XeTeXinterchartokenstate=0%
+}
+
+
+\def\captionsbreton{%
+ \def\refname{\textbreton{Daveennoù}}%
+ \def\abstractname{\textbreton{Dvierrañ}}%
+ \def\bibname{\textbreton{Lennadurezh}}%
+ \def\prefacename{\textbreton{Rakskrid}}%
+ \def\chaptername{\textbreton{Pennad}}%
+ \def\appendixname{\textbreton{Stagadenn}}%
+ \def\contentsname{\textbreton{Taolenn}}%
+ \def\listfigurename{\textbreton{Listenn ar Figurennoù}}%
+ \def\listtablename{\textbreton{Listenn an taolennoù}}%
+ \def\indexname{\textbreton{Meneger}}%
+ \def\figurename{\textbreton{Figurenn}}%
+ \def\tablename{\textbreton{Taolenn}}%
+ \def\thepart{\textbreton{}}%
+ \def\partname{\textbreton{Lodenn}}%
+ \def\pagename{\textbreton{Pajenn}}%
+ \def\seename{\textbreton{Gwelout}}%
+ \def\alsoname{\textbreton{Gwelout ivez}}%
+ \def\enclname{\textbreton{Dielloù kevret}}%
+ \def\ccname{\textbreton{Eilskrid da}}%
+ \def\headtoname{\textbreton{evit}}%
+ \def\proofname{\textbreton{Proof}}%
+ \def\glossaryname{\textbreton{Glossary}}%
+ }
+\def\datebreton{%
+ \def\today{\textbreton{\ifnum\day=1\relax 1\/\textsuperscript{añ}\else
+ \number\day\fi \space a\space viz\space\ifcase\month\or
+ Genver\or C'hwevrer\or Meurzh\or Ebrel\or Mae\or Mezheven\or
+ Gouere\or Eost\or Gwengolo\or Here\or Du\or Kerzu\fi
+ \space\number\year}}}
+
+\def\breton@language{\protect\language=\l@breton}
+
+\setlocalhyphenmins{breton}{2}{2}
+
+\def\noextras@breton{%
+ \nobreton@punctuation%
+ }
+
+\def\blockextras@breton{%
+ \breton@punctuation%
+ }
+
+\def\inlineextras@breton{%
+ \breton@punctuation%
+ }
+
+\endinput
+
+% These are defined in Babel
+% perhaps we should activate them only if option
+% "ordinalmacros" is given
+\def\kentan{1\/\textsuperscript{añ}} %${}^{\rm a\tilde{n}}$}
+\def\eil{2\/\textsuperscript{l}} %${}^{\rm l}$}
+\def\re{\/\textsuperscript{re}} %${}^{\rm re}$}
+\def\trede{3\re}
+\def\pevare{4\re}
+\def\vet{\/\textsuperscript{vet}} %${}^{\rm vet}$}
+\def\pempvet{5\vet}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf
new file mode 100644
index 00000000000..a89f5f84262
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf
@@ -0,0 +1,132 @@
+\ProvidesFile{gloss-bulgarian.ldf}[polyglossia: module for bulgarian]
+\makeatletter
+
+\ifx\l@bulgarian\@undefined%
+ \xpg@nopatterns{Bulgarian}%
+ \adddialect\l@bulgarian0%
+\fi
+
+\def\bulgarian@Alph#1{%
+ \ifcase#1\or
+ А\or Б\or В\or Г\or Д\or Е\or Ж\or
+ З\or И\or К\or Л\or М\or Н\or О\or
+ П\or Р\or С\or Т\or У\or Ф\or Х\or
+ Ц\or Ч\or Ш\or Ш\or Ю\or Я\else
+ \xpg@ill@value{#1}{bulgarian@Alph}\fi}%
+
+\def\bulgarian@alph#1{%
+ \ifcase#1\or
+ а\or б\or в\or г\or д\or е\or ж\or
+ з\or и\or к\or л\or м\or н\or о\or
+ п\or р\or с\or т\or у\or ф\or х\or
+ ц\or ч\or ш\or щ\or ю\or я\else
+ \xpg@ill@value{#1}{bulgarian@alph}\fi}%
+
+\def\bulgarian@numbers{%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
+ \let\@Alph\bulgarian@Alph%
+ \let\@alph\bulgarian@alph%
+ }
+
+\def\nobulgarian@numbers{%
+ \let\@Alph\latin@Alph%
+ \let\@alph\latin@alph%
+}
+
+\def\captionsbulgarian{%
+ \def\refname{\textbulgarian{Литература}}%
+ \def\abstractname{\textbulgarian{Абстракт}}%
+ \def\bibname{\textbulgarian{Библиография}}%
+ \def\prefacename{\textbulgarian{Предговор}}%
+ \def\chaptername{\textbulgarian{Глава}}%
+ \def\appendixname{\textbulgarian{Приложение}}%
+ \def\contentsname{\textbulgarian{Съдържание}}%
+ \def\listfigurename{\textbulgarian{Списхrdsnк на фигурите}}%
+ \def\listtablename{\textbulgarian{Списхrdsnк на таблиците}}%
+ \def\indexname{\textbulgarian{Азбуцhен указател}}%
+ \def\figurename{\textbulgarian{Фигура}}%
+ \def\tablename{\textbulgarian{Таблица}}%
+ %\def\thepart{\textbulgarian{}}%
+ %\def\partname{\textbulgarian{}}%
+ \def\pagename{\textbulgarian{Стр.}}%
+ \def\seename{\textbulgarian{вж.}}%
+ \def\alsoname{\textbulgarian{вж.\ също и}}%
+ \def\enclname{\textbulgarian{Приложения}}%
+ \def\ccname{\textbulgarian{копия}}%
+ %\def\headtoname{\textbulgarian{}}%
+ \def\proofname{\textbulgarian{Proof}}%
+ \def\glossaryname{\textbulgarian{Glossary}}%
+ }
+\def\datebulgarian{%
+ \def\today{\textbulgarian{\number\day~\ifcase\month\or
+ януари\or
+ февруари\or
+ март\or
+ април\or
+ май\or
+ юни\or
+ юли\or
+ август\or
+ септември\or
+ октомври\or
+ ноември\or
+ декември\fi%
+ \number\year~г.}}%
+ \def\month@Roman{\expandafter\@Roman\month}%
+ \def\todayRoman{\number\day.\,\month@Roman.\,\number\year~г.}%
+ }
+
+\def\bulgarian@language{\protect\language=\l@bulgarian}
+
+\def\bulgarian@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{bulgarianfont}{%
+ \@ifundefined{cyrillicfont}{%
+ \zf@check@ot@script{cyrl}%
+ \if@tempswa%
+ \addfontfeature{Script=Cyrillic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Cyrillic script!^^J
+ Please define \string\cyrillicfont\space or \string\bulgarianfont\space with \string\newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{BGR}%
+ \if@tempswa\addfontfeature{Language=Bulgarian}\fi
+ }%
+ {\cyrillicfont%
+ \zf@check@ot@lang{BGR}%
+ \if@tempswa\addfontfeature{Language=Bulgarian}\fi%
+ }}%
+{\bulgarianfont}}
+
+\setlocalhyphenmins{bulgarian}{2}{2}%
+
+\def\noextras@bulgarian{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@bulgarian{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@bulgarian{%
+ \frenchspacing%
+ }
+
+\endinput
+
+%% TODO?
+%% this is from Babel:
+\def\Romannumeral#1{\uppercase\expandafter{\romannumeral #1}}
+\def\todayRoman{\number\day.\Romannumeral{\month}.\number\year~г.}
+\def\sh{\mathop{\operator@font sh}\nolimits}
+\def\ch{\mathop{\operator@font ch}\nolimits}
+\def\tg{\mathop{\operator@font tg}\nolimits}
+\def\arctg{\mathop{\operator@font arctg}\nolimits}
+\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
+\def\ctg{\mathop{\operator@font ctg}\nolimits}
+\def\cth{\mathop{\operator@font cth}\nolimits}
+\def\cosec{\mathop{\operator@font cosec}\nolimits}
+\DeclareRobustCommand{\No}{%
+ \ifmmode{\nfss@text{\textnumero}}\else\textnumero\fi}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf
new file mode 100644
index 00000000000..6373592cb77
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf
@@ -0,0 +1,45 @@
+\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan]
+\makeatletter
+\def\catalan@font{\normalfontlatin}
+
+\ifx\l@catalan\@undefined%
+ \xpg@nopatterns{Catalan}%
+ \adddialect\l@catalan0%
+\fi
+
+\def\captionscatalan{%
+ \def\refname{\textcatalan{Referències}}%
+ \def\abstractname{\textcatalan{Resum}}%
+ \def\bibname{\textcatalan{Bibliografia}}%
+ \def\prefacename{\textcatalan{Pròleg}}%
+ \def\chaptername{\textcatalan{Capítol}}%
+ \def\appendixname{\textcatalan{Apèndix}}%
+ \def\contentsname{\textcatalan{Índex}}%
+ \def\listfigurename{\textcatalan{Índex de figures}}%
+ \def\listtablename{\textcatalan{Índex de taules}}%
+ \def\indexname{\textcatalan{Índex alfabètic}}%
+ \def\figurename{\textcatalan{Figura}}%
+ \def\tablename{\textcatalan{Taula}}%
+ %\def\thepart{\textcatalan{}}%
+ \def\partname{\textcatalan{Part}}%
+ \def\pagename{\textcatalan{Pàgina}}%
+ \def\seename{\textcatalan{Vegeu}}%
+ \def\alsoname{\textcatalan{Vegeu també}}%
+ \def\enclname{\textcatalan{Adjunt}}%
+ \def\ccname{\textcatalan{Còpies a}}%
+ \def\headtoname{\textcatalan{A}}%
+ \def\proofname{\textcatalan{Demostració}}%
+ \def\glossaryname{\textcatalan{Glossari}}%
+ }
+\datecatalan{%
+ \def\today{\textcatalan{\number\day~\ifcase\month\or
+ de gener\or de febrer\or de març\or d'abril\or de maig\or
+ de juny\or de juliol\or d'agost\or de setembre\or d'octubre\or
+ de novembre\or de desembre\fi
+ \space de~\number\year}}}
+
+\def\catalan@language{\protect\language=\l@catalan}
+
+\setlocalhyphenmins{catalan}{2}{2}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf
new file mode 100644
index 00000000000..8c4d9322fe8
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf
@@ -0,0 +1,62 @@
+\ProvidesFile{gloss-coptic.ldf}[polyglossia: module for coptic]
+\makeatletter
+
+\ifx\l@coptic\@undefined%
+ \xpg@nopatterns{Coptic}%
+ \adddialect\l@coptic0%
+\fi
+
+%\def\captionscoptic{%
+% \def\refname{\textcoptic{<++>}}%
+% \def\abstractname{\textcoptic{<++>}}%
+% \def\bibname{\textcoptic{<++>}}%
+% \def\prefacename{\textcoptic{<++>}}%
+% \def\chaptername{\textcoptic{<++>}}%
+% \def\appendixname{\textcoptic{<++>}}%
+% \def\contentsname{\textcoptic{<++>}}%
+% \def\listfigurename{\textcoptic{<++>}}%
+% \def\listtablename{\textcoptic{<++>}}%
+% \def\indexname{\textcoptic{<++>}}%
+% \def\figurename{\textcoptic{<++>}}%
+% \def\tablename{\textcoptic{<++>}}%
+% \def\thepart{\textcoptic{}}%
+% \def\partname{\textcoptic{<++>}}%
+% \def\pagename{\textcoptic{<++>}}%
+% \def\seename{\textcoptic{<++>}}%
+% \def\alsoname{\textcoptic{<++>}}%
+% \def\enclname{\textcoptic{<++>}}%
+% \def\ccname{\textcoptic{<++>}}%
+% \def\headtoname{\textcoptic{<++>}}%
+% \def\proofname{\textcoptic{<++>}}%
+% \def\glossaryname{\textcoptic{<++>}}%
+% }
+%\def\datecoptic{%
+% \def\today{\textcoptic{<++>}}%
+% }
+
+\def\coptic@language{\protect\language=\l@coptic}
+
+\def\coptic@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{copticfont}{%
+ \zf@check@ot@script{copt}%
+ \if@tempswa%
+ \addfontfeature{Script=Coptic}%
+ \zf@check@ot@lang{COP}%
+ \if@tempswa\addfontfeature{Language=Coptic}\fi%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Coptic script!^^J
+ Please define \string\copticfont\space with \string\newfontfamily}%
+ \fi%
+ }%
+ {\copticfont}%
+}
+
+\def\selectnormalfontcoptic{%
+ \let\normalfont=\coptic@font%
+ \def\reset@font{\normalfont}}
+
+\setlocalhyphenmins{coptic}{2}{2}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf
new file mode 100644
index 00000000000..a8ece82d800
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf
@@ -0,0 +1,43 @@
+\ProvidesFile{gloss-croatian.ldf}[polyglossia: module for croatian]
+\makeatletter
+\def\croatian@font{\normalfontlatin}
+
+\ifx\l@croatian\@undefined%
+ \xpg@nopatterns{Croatian}%
+ \adddialect\l@croatian0%
+\fi
+
+\def\captionscroatian{%
+ \def\refname{\textcroatian{Literatura}}%
+ \def\abstractname{\textcroatian{Sažetak}}%
+ \def\bibname{\textcroatian{Bibliografija}}%
+ \def\prefacename{\textcroatian{Predgovor}}%
+ \def\chaptername{\textcroatian{Poglavlje}}%
+ \def\appendixname{\textcroatian{Dodatak}}%
+ \def\contentsname{\textcroatian{Sadržaj}}%
+ \def\listfigurename{\textcroatian{Popis slika}}%
+ \def\listtablename{\textcroatian{Popis tablica}}%
+ \def\indexname{\textcroatian{Indeks}}%
+ \def\figurename{\textcroatian{Slika}}%
+ \def\tablename{\textcroatian{Tablica}}%
+ \def\partname{\textcroatian{Deo}}% <<< CHECK (taken from Serbian)
+ \def\pagename{\textcroatian{Stranica}}%
+ \def\seename{\textcroatian{Vidjeti}}%
+ \def\alsoname{\textcroatian{Vidjeti i}}%
+ \def\enclname{\textcroatian{Prilozi}}%
+ \def\ccname{\textcroatian{Kopije}}%
+ \def\headtoname{\textcroatian{Prima}}%
+ \def\proofname{\textcroatian{Dokaz}}%
+ \def\glossaryname{\textcroatian{Kazalo}}%
+ }
+\def\datecroatian{%
+ \def\today{\textcroatian{\number\day.~\ifcase\month\or
+ siječnja\or veljače\or ožujka\or travnja\or svibnja\or
+ lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenog\or
+ prosinca\fi \space \number\year.}}}
+
+\def\croatian@language{\protect\language=\l@croatian}
+
+\setlocalhyphenmins{croatian}{2}{2}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf
new file mode 100644
index 00000000000..d785f3cd9b2
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf
@@ -0,0 +1,57 @@
+\ProvidesFile{gloss-czech.ldf}[polyglossia: module for czech]
+\makeatletter
+\def\czech@font{\normalfontlatin}
+
+\ifx\l@czech\@undefined%
+ \xpg@nopatterns{Czech}%
+ \adddialect\l@czech0%
+\fi
+
+\def\captionsczech{%
+ \def\refname{\textczech{Reference}}%
+ \def\abstractname{\textczech{Abstrakt}}%
+ \def\bibname{\textczech{Literatura}}%
+ \def\prefacename{\textczech{Předmluva}}%
+ \def\chaptername{\textczech{Kapitola}}%
+ \def\appendixname{\textczech{Dodatek}}%
+ \def\contentsname{\textczech{Obsah}}%
+ \def\listfigurename{\textczech{Seznam obrázků}}%
+ \def\listtablename{\textczech{Seznam tabulek}}%
+ \def\indexname{\textczech{Index}}%
+ \def\figurename{\textczech{Obrázek}}%
+ \def\tablename{\textczech{Tabulka}}%
+ %\def\thepart{\textczech{}}%
+ \def\partname{\textczech{Část}}%
+ \def\pagename{\textczech{Strana}}%
+ \def\seename{\textczech{viz}}%
+ \def\alsoname{\textczech{viz}}%
+ \def\enclname{\textczech{Příloha}}%
+ \def\ccname{\textczech{Na vědomí:}}%
+ \def\headtoname{\textczech{Komu}}%
+ \def\proofname{\textczech{Důkaz}}%
+ \def\glossaryname{\textczech{Slovník}}%was Glosář
+ }
+\def\dateczech{%
+ \def\today{\textczech{\number\day.~\ifcase\month\or
+ ledna\or února\or března\or dubna\or května\or
+ června\or července\or srpna\or září\or
+ října\or listopadu\or prosince\fi
+ \space \number\year}}}
+
+\def\czech@language{\protect\language=\l@czech}
+
+\setlocalhyphenmins{czech}{2}{2}%
+
+\def\noextras@czech{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@czech{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@czech{%
+ \frenchspacing%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf
new file mode 100644
index 00000000000..669e43496b3
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf
@@ -0,0 +1,54 @@
+\ProvidesFile{gloss-danish.ldf}[polyglossia: module for danish]
+\makeatletter
+\def\danish@font{\normalfontlatin}
+
+\ifx\l@danish\@undefined
+ \xpg@nopatterns{Danish}
+ \adddialect\l@danish0
+\fi
+
+\def\captionsdanish{%
+ \def\prefacename{Forord}%
+ \def\refname{Litteratur}%
+ \def\abstractname{Resumé}%
+ \def\bibname{Litteratur}%
+ \def\chaptername{Kapitel}%
+ \def\appendixname{Bilag}%
+ \def\contentsname{Indhold}%
+ \def\listfigurename{Figurer}%
+ \def\listtablename{Tabeller}%
+ \def\indexname{Indeks}%
+ \def\figurename{Figur}%
+ \def\tablename{Tabel}%
+ \def\partname{Del}%
+ \def\enclname{Vedlagt}%
+ \def\ccname{Kopi til}% or Kopi sendt til
+ \def\headtoname{Til}% in letter
+ \def\pagename{Side}%
+ \def\seename{Se}%
+ \def\alsoname{Se også}}%
+ \def\proofname{Bevis}%
+ \def\glossaryname{Gloseliste}%
+ \def\today{\textdanish{\number\day.~\ifcase\month\or
+ januar\or februar\or marts\or april\or maj\or juni\or
+ juli\or august\or september\or oktober\or november\or december\fi
+ \space\number\year}}
+
+\def\danish@language{%
+ \protect\language=\l@danish}
+
+\setlocalhyphenmins{danish}{2}{3}%
+
+\def\noextras@danish{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@danish{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@danish{%
+ \frenchspacing%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf
new file mode 100644
index 00000000000..7dccadabab0
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf
@@ -0,0 +1,73 @@
+\ProvidesFile{gloss-divehi.ldf}[polyglossia: module for divehi]
+\RequirePackage{bidi}
+\makeatletter
+
+\ifx\l@divehi\@undefined%
+ \xpg@nopatterns{Divehi}%
+ \adddialect\l@divehi0%
+\fi
+
+\def\divehi@RL{\relax}
+
+%\def\captionsdivehi{%
+% \def\refname{\textdivehi{<++>}}%
+% \def\abstractname{\textdivehi{<++>}}%
+% \def\bibname{\textdivehi{<++>}}%
+% \def\prefacename{\textdivehi{<++>}}%
+% \def\chaptername{\textdivehi{<++>}}%
+% \def\appendixname{\textdivehi{<++>}}%
+% \def\contentsname{\textdivehi{<++>}}%
+% \def\listfigurename{\textdivehi{<++>}}%
+% \def\listtablename{\textdivehi{<++>}}%
+% \def\indexname{\textdivehi{<++>}}%
+% \def\figurename{\textdivehi{<++>}}%
+% \def\tablename{\textdivehi{<++>}}%
+% \def\thepart{\textdivehi{}}%
+% \def\partname{\textdivehi{<++>}}%
+% \def\pagename{\textdivehi{<++>}}%
+% \def\seename{\textdivehi{<++>}}%
+% \def\alsoname{\textdivehi{<++>}}%
+% \def\enclname{\textdivehi{<++>}}%
+% \def\ccname{\textdivehi{<++>}}%
+% \def\headtoname{\textdivehi{<++>}}%
+% \def\proofname{\textdivehi{<++>}}%
+% \def\glossaryname{\textdivehi{<++>}}%
+% }
+%\def\datedivehi{\def\today{\textdivehi{<++>}}}
+
+\def\divehi@language{\protect\language=\l@divehi}
+
+\def\divehi@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{divehifont}{%
+ \@ifundefined{thaanafont}{%
+ \zf@check@ot@script{thaa}%
+ \if@tempswa%
+ \addfontfeature{Script=Thaana}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Thaana script!^^J
+ Please define \string\thaanafont\space or \string\divehifont\space with \string\newfontfamily}%
+ \fi%
+ }%
+ {\thaanafont}}%
+{\divehifont}%
+}
+
+\def\selectnormalfontdivehi{%
+ \let\normalfont=\divehi@font%
+ \let\rmfamily=\divehi@font%
+ % TODO add setup to define Sans and Mono fonts if desired
+ \let\sffamily=\divehi@font%
+ \let\ttfamily=\divehi@font%
+ \def\reset@font{\normalfont}}
+
+\def\blockextras@divehi{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+\def\noextras@divehi{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf
new file mode 100644
index 00000000000..f17f85a1307
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf
@@ -0,0 +1,62 @@
+\ProvidesFile{gloss-dutch.ldf}[polyglossia: module for dutch]
+\makeatletter
+\def\dutch@font{\normalfontlatin}
+
+\ifx\l@dutch\@undefined
+ \xpg@nopatterns{Dutch}
+ \adddialect\l@dutch0
+\fi
+
+\def\dutch@punctuation{%
+ \frenchspacing%
+}
+
+\def\nodutch@punctuation{%
+ \nonfrenchspacing%
+}
+
+\def\captionsdutch{%
+ \def\prefacename{Voorwoord}%
+ \def\refname{Referenties}%
+ \def\abstractname{Samenvatting}%
+ \def\bibname{Bibliografie}%
+ \def\chaptername{Hoofdstuk}%
+ \def\appendixname{Bijlage}%
+ \def\contentsname{Inhoudsopgave}%
+ \def\listfigurename{Lijst van figuren}%
+ \def\listtablename{Lijst van tabellen}%
+ \def\indexname{Index}%
+ \def\figurename{Figuur}%
+ \def\tablename{Tabel}%
+ \def\partname{Deel}%
+ \def\enclname{Bijlage(n)}%
+ \def\ccname{cc}%
+ \def\headtoname{Aan}%
+ \def\pagename{Pagina}%
+ \def\seename{zie}%
+ \def\alsoname{zie ook}%
+ \def\proofname{Bewijs}%
+ \def\glossaryname{Verklarende Woordenlijst}%
+ \def\today{\textdutch{\number\day~\ifcase\month%
+ Januarie\or Februarie\or Maart\or April\or Mei\or Junie\or
+ Julie\or Augustus\or September\or Oktober\or November\or
+ Desember\fi
+ \space \number\year}}}
+
+\def\dutch@language{\protect\language=\l@dutch}
+
+\setlocalhyphenmins{dutch}{2}{2}%
+
+\def\noextras@dutch{%
+ \nodutch@punctuation%
+}
+
+\def\blockextras@dutch{%
+ \dutch@punctuation%
+}
+
+\def\inlineextras@dutch{%
+ \dutch@punctuation%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
new file mode 100644
index 00000000000..74b572a09f3
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
@@ -0,0 +1,111 @@
+\ProvidesFile{gloss-english.ldf}[polyglossia: module for english]
+\makeatletter
+\def\english@font{\normalfontlatin}
+
+\ifx\l@english\@undefined
+ \ifx\l@USenglish\@undefined
+ \ifx\l@american\@undefined
+ \xpg@nopatterns{English}
+ \adddialect\l@english0
+ \else
+ \let\l@english\l@american
+ \fi
+ \else
+ \let\l@english\l@USenglish
+ \fi
+\fi
+\ifx\l@american\@undefined
+ \let\l@american\l@english
+\fi
+\ifx\l@british\@undefined
+ \ifx\l@UKenglish\@undefined
+ \adddialect\l@british\l@english
+ \else
+ \let\l@british\l@UKenglish
+ \fi
+\fi
+
+\def\tmp@us{us}
+\def\tmp@uk{uk}
+\def\tmp@british{british}
+\def\tmp@american{american}
+\def\tmp@australian{australian}
+\def\tmp@newzealand{newzealand}
+\def\en@variant{english}
+\def\english@language{\expandafter\protect\expandafter\language=\csname l@\en@variant\endcsname}
+
+\newif\if@ordinalmonthday
+
+\define@key{english}{variant}[american]{%
+ \def\@tmpa{#1}
+ \ifx\@tmpa\tmp@uk\def\en@variant{british}\@ordinalmonthdaytrue
+ \xpg@info{Option: english variant=british}
+ \else\ifx\@tmpa\tmp@british\def\en@variant{british}\@ordinalmonthdaytrue
+ \xpg@info{Option: english variant=british}
+ \else\ifx\@tmpa\tmp@us\def\en@variant{american}\@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=american}
+ \else\ifx\@tmpa\tmp@australian\def\en@variant{british}\@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=australian}
+ \else\ifx\@tmpa\tmp@newzealand\def\en@variant{british}\@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=newzealand}
+ \fi\fi\fi\fi\fi}
+
+\def\tmp@true{true}
+\define@key{english}{ordinalmonthday}[false]{%
+ \def\@tmpa{#1}
+ \ifx\@tmpa\tmp@true\@ordinalmonthdaytrue
+ \else\@ordinalmonthdayfalse
+ \fi}
+
+\def\captionsenglish{%
+ \def\prefacename{\textenglish{Preface}}%
+ \def\refname{\textenglish{References}}%
+ \def\abstractname{\textenglish{Abstract}}%
+ \def\bibname{\textenglish{Bibliography}}%
+ \def\chaptername{\textenglish{Chapter}}%
+ \def\appendixname{\textenglish{Appendix}}%
+ \def\contentsname{\textenglish{Contents}}%
+ \def\listfigurename{\textenglish{List of Figures}}%
+ \def\listtablename{\textenglish{List of Tables}}%
+ \def\indexname{\textenglish{Index}}%
+ \def\figurename{\textenglish{Figure}}%
+ \def\tablename{\textenglish{Table}}%
+ \def\partname{\textenglish{Part}}%
+ \def\enclname{\textenglish{encl}}%
+ \def\ccname{\textenglish{cc}}%
+ \def\headtoname{\textenglish{To}}%
+ \def\pagename{\textenglish{Page}}%
+ \def\seename{\textenglish{see}}%
+ \def\alsoname{\textenglish{see also}}%
+ \def\proofname{\textenglish{Proof}}%
+ }
+\def\dateenglish{%
+ \def\english@day{%
+ \if@ordinalmonthday%
+ \ifcase\day\or
+ 1st\or 2nd\or 3rd\or 4th\or 5th\or
+ 6th\or 7th\or 8th\or 9th\or 10th\or
+ 11th\or 12th\or 13th\or 14th\or 15th\or
+ 16th\or 17th\or 18th\or 19th\or 20th\or
+ 21st\or 22nd\or 23rd\or 24th\or 25th\or
+ 26th\or 27th\or 28th\or 29th\or 30th\or
+ 31st\fi
+ \else\number\day\fi}%
+ \def\today{%
+ \ifx\en@variant\tmp@british%
+ \english@day\space%
+ \ifcase\month\or%
+ January\or February\or March\or April\or May\or June\or%
+ July\or August\or September\or October\or November\or December\fi%
+ \space\number\year%
+ \else%
+ \ifcase\month\or%
+ January\or February\or March\or April\or May\or June\or%
+ July\or August\or September\or October\or November\or December\fi%
+ \space\english@day, \number\year%
+ \fi}
+ }
+
+%\setlocalhyphenmins{english}{2}{3}% this is the default in babel
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf
new file mode 100644
index 00000000000..fb49e222a1e
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf
@@ -0,0 +1,70 @@
+\ProvidesFile{gloss-esperanto.ldf}[polyglossia: module for esperanto]
+\makeatletter
+\def\esperanto@font{\normalfontlatin}
+
+\ifx\l@esperanto\@undefined%
+ \xpg@nopatterns{Esperanto}%
+ \adddialect\l@esperanto0%
+\fi
+
+\def\captionsesperanto{%
+ \def\refname{\textesperanto{Citaĵoj}}%
+ \def\abstractname{\textesperanto{Resumo}}%
+ \def\bibname{\textesperanto{Bibliografio}}%
+ \def\prefacename{\textesperanto{Antaŭparolo}}%
+ \def\chaptername{\textesperanto{Ĉapitro}}%
+ \def\appendixname{\textesperanto{Apendico}}%
+ \def\contentsname{\textesperanto{Enhavo}}%
+ \def\listfigurename{\textesperanto{Listo de figuroj}}%
+ \def\listtablename{\textesperanto{Listo de tabeloj}}%
+ \def\indexname{\textesperanto{Indekso}}%
+ \def\figurename{\textesperanto{Figuro}}%
+ \def\tablename{\textesperanto{Tabelo}}%
+ %\def\thepart{\textesperanto{}}%
+ %\def\partname{\textesperanto{}}%
+ \def\pagename{\textesperanto{Paĝo}}%
+ \def\seename{\textesperanto{vidu}}%
+ \def\alsoname{\textesperanto{Parto}}%
+ \def\enclname{\textesperanto{Aldono(j)}}%
+ \def\ccname{\textesperanto{Kopie al}}%
+ \def\headtoname{\textesperanto{Al}}%
+ \def\proofname{\textesperanto{Pruvo}}%
+ \def\glossaryname{\textesperanto{Glosaro}}%
+ }
+\def\dateesperanto{%
+ \def\today{\textesperanto{\number\day{–a}~de~\ifcase\month\or
+ januaro\or februaro\or marto\or aprilo\or majo\or junio\or
+ julio\or aŭgusto\or septembro\or oktobro\or novembro\or
+ decembro\fi,\space \number\year}}%
+ \def\hodiau{la \today}%
+ \def\hodiaun{la \number\day{–an}~de~\ifcase\month\or
+ januaro\or februaro\or marto\or aprilo\or majo\or junio\or
+ julio\or aŭgusto\or septembro\or oktobro\or novembro\or
+ decembro\fi, \space \number\year}%
+ }
+\def\esperanto@alph#1{%
+ \ifcase#1\or a\or b\or c\or ĉ\or d\or e\or f\or g\or ĝ\or
+ h\or ĥ\or i\or j\or ĵ\or k\or l\or m\or n\or o\or
+ p\or r\or s\or ŝ\or t\or u\or ŭ\or v\or z\else\xpg@ill@value{#1}{esperanto@alph}\fi}%
+\def\esperanto@Alph#1{%
+ \ifcase#1\or A\or B\or C\or Ĉ\or D\or E\or F\or G\or Ĝ\or
+ H\or Ĥ\or I\or J\or Ĵ\or K\or L\or M\or N\or O\or
+ P\or R\or S\or Ŝ\or T\or U\or Ŭ\or V\or Z\else\xpg@ill@value{#1}{esperanto@Alph}\fi}%
+
+\def\esperanto@numbers{%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
+ \let\@Alph\esperanto@Alph%
+ \let\@alph\esperanto@alph%
+ }
+
+\def\noesperanto@numbers{%
+ \let\@Alph\latin@Alph%
+ \let\@alph\latin@alph%
+}
+
+\def\esperanto@language{\protect\language=\l@esperanto}
+
+\setlocalhyphenmins{esperanto}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf
new file mode 100644
index 00000000000..74c08a58b8b
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf
@@ -0,0 +1,56 @@
+\ProvidesFile{gloss-estonian.ldf}[polyglossia: module for estonian]
+\makeatletter
+\def\estonian@font{\normalfontlatin}
+
+\ifx\l@estonian\@undefined%
+ \xpg@nopatterns{Estonian}%
+ \adddialect\l@estonian0%
+\fi
+
+\def\captionsestonian{%
+ \def\refname{\textestonian{Viited}}%
+ \def\abstractname{\textestonian{Kokkuvõte}}%
+ \def\bibname{\textestonian{Kirjandus}}%
+ \def\prefacename{\textestonian{Sissejuhatus}}%
+ \def\chaptername{\textestonian{Peatükk}}%
+ \def\appendixname{\textestonian{Lisa}}%
+ \def\contentsname{\textestonian{Sisukord}}%
+ \def\listfigurename{\textestonian{Joonised}}%
+ \def\listtablename{\textestonian{Tabelid}}%
+ \def\indexname{\textestonian{Indeks}}%
+ \def\figurename{\textestonian{Joonis}}%
+ \def\tablename{\textestonian{Tabel}}%
+ %\def\thepart{\textestonian{}}%
+ \def\partname{\textestonian{Osa}}%
+ \def\pagename{\textestonian{Lk.}}%
+ \def\seename{\textestonian{vt.}}%
+ \def\alsoname{\textestonian{vt. ka}}%
+ \def\enclname{\textestonian{Lisa(d)}}%
+ \def\ccname{\textestonian{Koopia(d)}}%
+ %\def\headtoname{\textestonian{}}%
+ \def\proofname{\textestonian{Korrektuur}}%
+ \def\glossaryname{\textestonian{Glossary}}% <-- need translation
+ }
+\def\dateestonian{%
+ \def\today{\textestonian{\number\day.\space\ifcase\month\or
+ jaanuar\or veebruar\or märts\or aprill\or mai\or juuni\or
+ juuli\or august\or september\or oktoober\or november\or
+ detsember\fi\space\number\year.\space a.}}}
+
+\def\estonian@language{\protect\language=\l@estonian}
+
+\setlocalhyphenmins{estonian}{2}{2}%
+
+\def\noextras@estonian{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@estonian{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@estonian{%
+ \frenchspacing%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf
new file mode 100644
index 00000000000..7ec10a87230
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf
@@ -0,0 +1,200 @@
+\ProvidesFile{gloss-farsi.ldf}[polyglossia: module for farsi]
+\RequirePackage{bidi}
+\RequirePackage{farsical}
+\makeatletter
+
+\ifx\l@farsi\@undefined
+ \xpg@nopatterns{Farsi}%
+ \adddialect\l@farsi0
+\fi
+
+\def\farsi@RL{\relax}
+
+\newif\if@western@numerals
+\def\tmp@western{western}
+\define@key{farsi}{numerals}[eastern]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@western\@western@numeralstrue\else%
+ \@western@numeralsfalse%
+ \fi}
+
+% NOT YET USED
+\define@key{farsi}{locale}[default]{%
+ \def\@farsi@locale{#1}}
+
+%TODO add option for CALENDAR
+
+\setkeys{farsi}{locale,numerals}
+
+\def\farsigregmonth#1{\ifcase#1%
+ \or ژانویه\or فوریه\or مارس\or آوریل\or مه\or ژوئن\or ژوئیه؛\or ژویه\or اوت\or سپتامبر\or اکتبر\or نوامبر\or دسامبر\fi}
+\def\farsimonth#1{\ifcase#1%
+ \or کانون ثانی\or شباط\or اذار%؛\or ادار
+ \or نیسان\or ایار\or حزیران\or تموز\or آب\or ایلول\or تشرین اول\or تشرین ثانی\or کانون اول\fi}
+
+\def\captionsfarsi{%
+\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\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{}}%<-- Needs translation
+%\def\headtoname{\@ensure@RL{}}%<-- Needs translation
+\def\pagename{\@ensure@RL{صفحة}}%
+%\def\seename{\@ensure@RL{}}%<-- Needs translation
+%\def\alsoname{\@ensure@RL{}}%<-- Needs translation
+\def\proofname{\@ensure@RL{برهان}}%
+\def\glossaryname{\@ensure@RL{لغت‌نامه}}%<-- Needs to be checked
+}
+\def\datefarsi{%
+ \def\today{\@ensure@RL{\farsinumber\day\space\farsigregmonth{\month}\space\farsinumber\year}}%
+}
+
+\def\farsinumber#1{\if@western@numerals\RL{\number#1}\else%
+\ifnum\XeTeXcharglyph"06F0 > 0%
+{\protect\addfontfeature{Mapping=farsidigits}\number#1}%
+\else%
+{\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
+\fi\fi}
+
+%\def\farsinum#1{\expandafter\farsinumber\csname c@#1\endcsname}
+%\def\farsibracenum#1{(\expandafter\farsinumber\csname c@#1\endcsname)}
+%\def\farsiornatebracenum#1{\char"FD3E\expandafter\farsinumber\csname c@#1\endcsname\char"FD3F}
+%\def\farsialph#1{\expandafter\@farsialph\csname c@#1\endcsname}
+
+\ifcsdef{abjad}{}{%
+\def\abjad#1{%
+\ifnum#1>1999 \xpg@warning{Illegal value (#1) for abjad numeral} {#1}
+\else
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for abjad numeral}%
+ \else
+ \ifnum#1<10\expandafter\abj@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\abj@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+\def\abjad@zero{}
+\def\abj@num@i#1{%
+ \ifcase#1\or ا\or ب\or ج\char"200D\or د%
+ \or ه\or و\or ز\or ح\or ط\fi
+ \ifnum#1=\z@\abjad@zero\fi}
+\def\abj@num@ii#1{%
+ \ifcase#1\or ي\or ك\or ل\or م\or ن%
+ \or س\or ع\or ف\or ص\fi
+ \ifnum#1=\z@\fi\abj@num@i}
+\def\abj@num@iii#1{%
+ \ifcase#1\or ق\or ر\or ش\or ت\or ث%
+ \or خ\or ذ\or ض\or ظ\fi
+ \ifnum#1=\z@\fi\abj@num@ii}
+\def\abj@num@iv#1{%
+ \ifcase#1\or غ\fi
+ \ifnum#1=\z@\fi\abj@num@iii}
+}
+
+\def\farsi@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \let\@alph\abjad%
+ \let\@Alph\abjad%
+}
+\def\nofarsi@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+ }
+
+\def\farsi@globalnumbers{%
+ \let\@latinarabic\@arabic%
+ \let\@arabic\farsinumber%
+ % For some reason \thefootnote needs to be set separately:
+ \renewcommand\thefootnote{\protect\farsinumber{\c@footnote}}%
+ }
+
+\def\nofarsi@globalnumbers{
+ \let\@arabic\@latinarabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+ }
+
+\def\farsi@language{\language=\l@farsi}
+
+\def\farsi@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{farsifont}{%
+ \@ifundefined{arabicfont}{%
+ \zf@check@ot@script{arab}%
+ \if@tempswa%
+ \addfontfeature{Script=Arabic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Arabic script!^^J
+ Please define \string\arabicfont\space or \string\farsifont\space with \newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{FAR}%
+ \if@tempswa\addfontfeature{Language=Farsi}\fi
+ }%
+ {\arabicfont%
+ \zf@check@ot@lang{FAR}%
+ \if@tempswa\addfontfeature{Language=Farsi}\fi}
+ }%
+{\farsifont}}
+% TODO add setup to define Sans and Mono Arabic fonts if desired
+\def\farsi@font@sf{%
+ \@ifundefined{farsifontsf}{%
+% \sffamily% FIXME
+% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Arabic}%
+% \else%
+ \farsi@font%
+% \fi%
+ }%
+ {\farsifontsf}%
+}
+\def\farsi@font@tt{%
+ \@ifundefined{farsifonttt}{%
+% \ttfamily% FIXME
+% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Arabic}%
+% \else%
+ \farsi@font%
+% \fi%
+ }%
+ {\farsifonttt}%
+}
+
+\def\selectnormalfontfarsi{%
+ \let\normalfont=\farsi@font%
+ \let\rmfamily=\farsi@font%
+ \let\sffamily=\farsi@font@sf%
+ \let\ttfamily=\farsi@font@tt%
+ \def\reset@font{\normalfont}}
+
+\def\blockextras@farsi{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+\def\noextras@farsi{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+\endinput
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf
new file mode 100644
index 00000000000..b58398867c5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf
@@ -0,0 +1,65 @@
+\ProvidesFile{gloss-finnish.ldf}[polyglossia: module for finnish]
+\makeatletter
+\def\finnish@font{\normalfontlatin}
+
+\ifx\l@finnish\@undefined%
+ \xpg@nopatterns{Finnish}%
+ \adddialect\l@finnish0%
+\fi
+
+\def\captionsfinnish{%
+ \def\refname{\textfinnish{Viitteet}}%
+ \def\abstractname{\textfinnish{Tiivistelmä}}%
+ \def\bibname{\textfinnish{Kirjallisuutta}}%
+ \def\prefacename{\textfinnish{Esipuhe}}%
+ \def\chaptername{\textfinnish{Luku}}%
+ \def\appendixname{\textfinnish{Liite}}%
+ \def\contentsname{\textfinnish{Sisältö}}%
+ \def\listfigurename{\textfinnish{Kuvat}}%
+ \def\listtablename{\textfinnish{Taulukot}}%
+ \def\indexname{\textfinnish{Hakemisto}}%
+ \def\figurename{\textfinnish{Kuva}}%
+ \def\tablename{\textfinnish{Taulukko}}%
+ %\def\thepart{\textfinnish{}}%
+ \def\partname{\textfinnish{Osa}}%
+ \def\pagename{\textfinnish{Sivu}}%
+ \def\seename{\textfinnish{katso}}%
+ \def\alsoname{\textfinnish{katso myös}}%
+ \def\enclname{\textfinnish{Liitteet}}%
+ \def\ccname{\textfinnish{Jakelu}}%
+ \def\headtoname{\textfinnish{Vastaanottaja}}%
+ \def\proofname{\textfinnish{Todistus}}%
+ \def\glossaryname{\textfinnish{Sanasto}}%
+ }
+\def\datefinnish{%
+ \def\today{\textfinnish{\number\day.~\ifcase\month\or
+ tammikuuta\or helmikuuta\or maaliskuuta\or huhtikuuta\or
+ toukokuuta\or kesäkuuta\or heinäkuuta\or elokuuta\or
+ syyskuuta\or lokakuuta\or marraskuuta\or joulukuuta\fi
+ \space\number\year}}}
+
+\def\finnish@language{\protect\language=\l@finnish}
+
+\setlocalhyphenmins{finnish}{2}{2}%
+
+\def\noextras@finnish{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@finnish{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@finnish{%
+ \frenchspacing%
+ }
+
+\endinput
+
+% TODO ?
+\addto\extrasfinnish{%
+ \babel@savevariable\hyphenpenalty\hyphenpenalty=30%
+ \babel@savevariable\exhyphenpenalty\exhyphenpenalty=30%
+ \babel@savevariable\doublehyphendemerits\doublehyphendemerits=5000%
+ \babel@savevariable\finalhyphendemerits\finalhyphendemerits=5000%
+ }
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf
new file mode 100644
index 00000000000..584e224d6d2
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf
@@ -0,0 +1,125 @@
+\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]
+\makeatletter
+\def\french@font{\normalfontlatin}
+
+\ifx\l@french\@undefined%
+ \xpg@nopatterns{French}%
+ \adddialect\l@french0%
+\fi
+
+\def\french@punctuation{%
+ \frenchspacing%
+ \XeTeXinterchartokenstate=1%
+ \XeTeXcharclass `\! 7%
+ \XeTeXcharclass `\? 7%
+ \XeTeXcharclass `\; 7%
+ \XeTeXcharclass `\: 7%
+ \XeTeXinterchartoks 0 7 = {\unskip\kern.1667em}%
+ }
+
+\def\nofrench@punctuation{%
+ \nonfrenchspacing%
+ \XeTeXinterchartokenstate=0%
+}
+
+\def\french@guillemets{%
+ \XeTeXinterchartokenstate=1%
+ \XeTeXcharclass `\« 8%
+ \XeTeXcharclass `\» 8%
+ \XeTeXinterchartoks 8 0 = {\kern.1667em}%
+ \XeTeXinterchartoks 0 8 = {\unskip\kern.1667em}%
+ \XeTeXinterchartoks 8 7 = {\unskip\kern.1667em}% "»;" -> "» ;"
+ \XeTeXinterchartoks 7 8 = {\unskip\kern.1667em}% "?»" -> "? »"
+}
+
+%\newcounter{niveauguillemets}[paragraph]
+%
+%\def\tmp@normal{normal}
+%\def\tmp@paragraphe{paragraphe}
+%\def\tmp@ligne{ligne}
+
+%TODO
+%\define@key{french}{guillemets}[normal]{
+% \def\@tmpa{#1}
+% \ifx\@tmpa\tmp@ligne%
+% \def\french@guill@mets{% FIXME
+% \def\LeftPointingDoubleAngleQuotationMark{«\kern.1667em\setcounter{niveauguillemets}{1}%
+% \ifthenelse{\value{niveauguillemets} = 1}{\localleftbox{«\kern.1667em}}%
+% {\everypar={{«}\kern.1667em}\setcounter{niveauguillemets}{1}}}%
+% \def\RightPointingDoubleAngleQuotationMark{\unskip\kern.1667em»%
+% \everypar={}\localleftbox{}}}%
+% \else\ifx\@tmpa\tmp@paragraphe%
+% \def\french@guill@mets{\def\LeftPointingDoubleAngleQuotationMark{«\kern.1667em%
+% \everypar={«\kern.1667em}}\def\RightPointingDoubleAngleQuotationMark%
+% {\unskip\kern.1667em»\everypar={}}}%
+% \else\ifx\@tmpa\tmp@normal%
+% \def\french@guill@mets{\def\LeftPointingDoubleAngleQuotationMark{«\kern.1667em}%
+% \def\RightPointingDoubleAngleQuotationMark{\unskip\kern.1667em»}}%
+%\fi\fi\fi}
+%
+%\def\tmp@sans{sansaccents}
+%\define@key{french}{majuscules}{%
+% \def\@tmpa{#1}%
+% \ifx\@tmpa\tmp@sans%
+% \addfontfeature{Mapping=sansaccents}% <<< TODO!
+% \fi}
+
+\def\captionsfrench{%
+ \def\refname{\textfrench{Références}}%
+ \def\abstractname{\textfrench{Résumé}}%
+ \def\bibname{\textfrench{Bibliographie}}%
+ \def\prefacename{\textfrench{Préface}}%
+ \def\chaptername{\textfrench{Chapitre}}%
+ \def\appendixname{\textfrench{Annexe}}%
+ \def\contentsname{\textfrench{Table des matières}}%
+ \def\listfigurename{\textfrench{Table des figures}}%
+ \def\listtablename{\textfrench{Liste des tableaux}}%
+ \def\indexname{\textfrench{Index}}%
+ \def\figurename{\textfrench{\scshape Fig.}}%
+ \def\tablename{\textfrench{\scshape Tab.}}%
+ \def\@Fpt{\ifcase\value{part}\or Première\or Deuxième\or%
+ Troisième\or Quatrième\or Cinquième\or Sixième\or%
+ Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or%
+ Douzième\or Treizième\or Quatorzième\or Quinzième\or%
+ Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or%
+ Vingtième\fi\space}%
+ \def\thepart{}%
+ \def\partname{\textfrench{\protect\@Fpt partie}}%
+ \def\pagename{\textfrench{page}}%
+ \def\seename{\textfrench{\emph{voir}}}%
+ \def\alsoname{\textfrench{\emph{voir aussi}}}%
+ \def\enclname{\textfrench{P.~J. }}%
+ \def\ccname{\textfrench{Copie à }}%
+ \def\headtoname{}%
+ \def\proofname{\textfrench{Démonstration}}%
+ }
+\def\datefrench{%
+ \def\today{\textfrench{\ifx\ier\undefined\def\ier{er}\fi%
+ \ifnum\day=1\relax 1\ier%
+ \else \number\day\fi%
+ \space \ifcase\month%
+ \or janvier\or février\or mars\or avril\or mai\or juin\or%
+ juillet\or août\or septembre\or octobre\or novembre\or%
+ décembre\fi%
+ \space \number\year}}}
+
+\def\french@language{\protect\language=\l@french}
+
+\setlocalhyphenmins{french}{2}{2}%
+
+\def\noextras@french{%
+ \nofrench@punctuation%
+ \nofrench@indent}
+
+\def\blockextras@french{%
+ \french@punctuation%
+ \french@indent%
+ \french@guillemets%
+ }
+
+\def\inlineextras@french{%
+ \french@punctuation%
+ \french@guillemets%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf
new file mode 100644
index 00000000000..56f74b4e8bb
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf
@@ -0,0 +1,44 @@
+\ProvidesFile{gloss-galician.ldf}[polyglossia: module for galician]
+\makeatletter
+\def\galician@font{\normalfontlatin}
+
+\ifx\l@galician\@undefined%
+ \xpg@nopatterns{Galician}%
+ \adddialect\l@galician0%
+\fi
+
+\def\captionsgalician{%
+ \def\refname{\textgalician{Referencias}}%
+ \def\abstractname{\textgalician{Resumo}}%
+ \def\bibname{\textgalician{Bibliografía}}%
+ \def\prefacename{\textgalician{Prefacio}}%
+ \def\chaptername{\textgalician{Capítulo}}%
+ \def\appendixname{\textgalician{Apéndice}}%
+ \def\contentsname{\textgalician{Índice Xeral}}%
+ \def\listfigurename{\textgalician{Índice de Figuras}}%
+ \def\listtablename{\textgalician{Índice de Táboas}}%
+ \def\indexname{\textgalician{Índice de Materias}}%
+ \def\figurename{\textgalician{Figura}}%
+ \def\tablename{\textgalician{Táboa}}%
+ %\def\thepart{\textgalician{}}%
+ \def\partname{\textgalician{Parte}}%
+ \def\pagename{\textgalician{Páxina}}%
+ \def\seename{\textgalician{véxase}}%
+ \def\alsoname{\textgalician{véxase tamén}}%
+ \def\enclname{\textgalician{Adxunto}}%
+ \def\ccname{\textgalician{Copia a}}%
+ \def\headtoname{\textgalician{A}}%
+ \def\proofname{\textgalician{Demostración}}%
+ \def\glossaryname{\textgalician{Glosario}}%
+ }
+\def\dategalician{%
+ \def\today{\textgalician{\number\day~de\space\ifcase\month\or
+ xaneiro\or febreiro\or marzo\or abril\or maio\or xuño\or
+ xullo\or agosto\or setembro\or outubro\or novembro\or decembro\fi
+ \space de~\number\year}}}
+
+\def\galician@language{\protect\language=\l@galician}
+
+\setlocalhyphenmins{galician}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf
new file mode 100644
index 00000000000..ebe1c170140
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf
@@ -0,0 +1,72 @@
+\ProvidesFile{gloss-german.ldf}[polyglossia: module for german]
+\makeatletter
+\def\german@font{\normalfontlatin}
+
+\ifx\l@german\@undefined
+ \xpg@nopatterns{german}
+ \adddialect\l@german0
+\fi
+
+
+\def\tmp@new{new}
+\def\tmp@old{old}
+\define@key{german}{spelling}[new]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@old%
+ \def\german@hyph{\l@german}%
+ \else%
+ \def\german@hyph{\l@ngerman}%
+ \fi%
+}
+
+\setkeys{german}{spelling}
+
+\def\captionsgerman{%
+ \def\prefacename{\textgerman{Vorwort}}%
+ \def\refname{\textgerman{Literatur}}%
+ \def\abstractname{\textgerman{Zusammenfassung}}%
+ \def\bibname{\textgerman{Literaturverzeichnis}}%
+ \def\chaptername{\textgerman{Kapitel}}%
+ \def\appendixname{\textgerman{Anhang}}%
+ \def\contentsname{\textgerman{Inhaltsverzeichnis}}%
+ \def\listfigurename{\textgerman{Abbildungsverzeichnis}}%
+ \def\listtablename{\textgerman{Tabellenverzeichnis}}%
+ \def\indexname{\textgerman{Index}}%
+ \def\figurename{\textgerman{Abbildung}}%
+ \def\tablename{\textgerman{Tabelle}}%
+ \def\partname{\textgerman{Teil}}%
+ \def\enclname{\textgerman{Anlage(n)}}%
+ \def\ccname{\textgerman{Verteiler}}%
+ \def\headtoname{An}%
+ \def\pagename{\textgerman{Seite}}%
+ \def\seename{\textgerman{siehe}}%
+ \def\alsoname{\textgerman{siehe auch}}%
+ \def\proofname{\textgerman{Beweis}}%
+ \def\glossaryname{\textgerman{Glossar}}%
+}
+\def\dategerman{%
+ \def\today{\textgerman{\number\day.%
+ \space \ifcase\month%
+ \or Januar\or Februar\or März\or April\or Mai\or Juni\or%
+ Juli\or August\or September\or Oktober\or November\or%
+ Dezember\fi%
+ \space \number\year}}%
+}
+
+\def\german@language{\protect\language=\german@hyph}
+
+\setlocalhyphenmins{german}{2}{2}%
+
+\def\noextras@german{%
+ \nonfrenchspacing%
+}
+
+\def\blockextras@german{%
+ \frenchspacing%
+}
+
+\def\inlineextras@german{%
+ \frenchspacing%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf
new file mode 100644
index 00000000000..bd1f840095f
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf
@@ -0,0 +1,688 @@
+\ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek]
+\makeatletter
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The code in this file was initially adapted from the antomega
+%% module for greek. Currently large parts of it derive from the
+%% package xgreek.sty (c) Apostolos Syropoulos
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% these fixes are taken verbatim from xgreek.sty:
+\global\lccode"0386="03AC \global\uccode"0386="0391
+\global\lccode"0388="03AD \global\uccode"0388="0395
+\global\lccode"0389="03AC \global\uccode"0389="0397
+\global\lccode"038A="03AF \global\uccode"038A="0399
+\global\lccode"038C="03CC \global\uccode"038C="039F
+\global\lccode"038E="03CD \global\uccode"038E="03A5
+\global\lccode"038F="03CE \global\uccode"038F="03A9
+\global\lccode"0390="0390 \global\uccode"0390="03AA
+\global\lccode"0391="03B1 \global\uccode"0391="0391
+\global\lccode"0392="03B2 \global\uccode"0392="0392
+\global\lccode"0393="03B3 \global\uccode"0393="0393
+\global\lccode"0394="03B4 \global\uccode"0394="0394
+\global\lccode"0395="03B5 \global\uccode"0395="0395
+\global\lccode"0396="03B6 \global\uccode"0396="0396
+\global\lccode"0397="03B7 \global\uccode"0397="0397
+\global\lccode"0398="03B8 \global\uccode"0398="0398
+\global\lccode"0399="03B9 \global\uccode"0399="0399
+\global\lccode"039A="03BA \global\uccode"039A="039A
+\global\lccode"039B="03BB \global\uccode"039B="039B
+\global\lccode"039C="03BC \global\uccode"039C="039C
+\global\lccode"039D="03BD \global\uccode"039D="039D
+\global\lccode"039E="03BE \global\uccode"039E="039E
+\global\lccode"039F="03BF \global\uccode"039F="039F
+\global\lccode"03A0="03C0 \global\uccode"03A0="03A0
+\global\lccode"03A1="03C1 \global\uccode"03A1="03A1
+\global\lccode"03A3="03C3 \global\uccode"03A3="03A3
+\global\lccode"03A4="03C4 \global\uccode"03A4="03A4
+\global\lccode"03A5="03C5 \global\uccode"03A5="03A5
+\global\lccode"03A6="03C6 \global\uccode"03A6="03A6
+\global\lccode"03A7="03C7 \global\uccode"03A7="03A7
+\global\lccode"03A8="03C8 \global\uccode"03A8="03A8
+\global\lccode"03A9="03C9 \global\uccode"03A9="03A9
+\global\lccode"03AA="03CA \global\uccode"03AA="03AA
+\global\lccode"03AB="03CB \global\uccode"03AB="03AB
+\global\lccode"03AC="03AC \global\uccode"03AC="0391
+\global\lccode"03AD="03AD \global\uccode"03AD="0395
+\global\lccode"03AE="03AE \global\uccode"03AE="0397
+\global\lccode"03AF="03AF \global\uccode"03AF="0399
+\global\lccode"03B0="03B0 \global\uccode"03B0="03AB
+\global\lccode"03B1="03B1 \global\uccode"03B1="0391
+\global\lccode"03B2="03B2 \global\uccode"03B2="0392
+\global\lccode"03B3="03B3 \global\uccode"03B3="0393
+\global\lccode"03B4="03B4 \global\uccode"03B4="0394
+\global\lccode"03B5="03B5 \global\uccode"03B5="0395
+\global\lccode"03B6="03B6 \global\uccode"03B6="0396
+\global\lccode"03B7="03B7 \global\uccode"03B7="0397
+\global\lccode"03B8="03B8 \global\uccode"03B8="0398
+\global\lccode"03B9="03B9 \global\uccode"03B9="0399
+\global\lccode"03BA="03BA \global\uccode"03BA="039A
+\global\lccode"03BB="03BB \global\uccode"03BB="039B
+\global\lccode"03BC="03BC \global\uccode"03BC="039C
+\global\lccode"03BD="03BD \global\uccode"03BD="039D
+\global\lccode"03BE="03BE \global\uccode"03BE="039E
+\global\lccode"03BF="03BF \global\uccode"03BF="039F
+\global\lccode"03C0="03C0 \global\uccode"03C0="03A0
+\global\lccode"03C1="03C1 \global\uccode"03C1="03A1
+\global\lccode"03C2="03C2 \global\uccode"03C2="03A3
+\global\lccode"03C3="03C3 \global\uccode"03C3="03A3
+\global\lccode"03C4="03C4 \global\uccode"03C4="03A4
+\global\lccode"03C5="03C5 \global\uccode"03C5="03A5
+\global\lccode"03C6="03C6 \global\uccode"03C6="03A6
+\global\lccode"03C7="03C7 \global\uccode"03C7="03A7
+\global\lccode"03C8="03C8 \global\uccode"03C8="03A8
+\global\lccode"03C9="03C9 \global\uccode"03C9="03A9
+\global\lccode"03CA="03CA \global\uccode"03CA="03AA
+\global\lccode"03CB="03CB \global\uccode"03CB="03AB
+\global\lccode"03CC="03CC \global\uccode"03CC="039F
+\global\lccode"03CD="03CD \global\uccode"03CD="03A5
+\global\lccode"03CE="03CE \global\uccode"03CE="03A9
+\global\lccode"03D0="03D0 \global\uccode"03D0="0392
+\global\lccode"03D1="03D1 \global\uccode"03D1="0398
+\global\lccode"03D2="03C5 \global\uccode"03D2="03A5
+\global\lccode"03D3="03CD \global\uccode"03D3="03A5
+\global\lccode"03D4="03CB \global\uccode"03D4="03AB
+\global\lccode"03D5="03C6 \global\uccode"03D5="03A6
+\global\lccode"03D6="03C0 \global\uccode"03D6="03A0
+\global\lccode"03DA="03DB \global\uccode"03DA="03DA
+\global\lccode"03DB="03DB \global\uccode"03DB="03DA
+\global\lccode"03DC="03DD \global\uccode"03DC="03DC
+\global\lccode"03DD="03DD \global\uccode"03DD="03DC
+\global\lccode"03DE="03DF \global\uccode"03DE="03DE
+\global\lccode"03DF="03DF \global\uccode"03DF="03DE
+\global\lccode"03E0="03E1 \global\uccode"03E0="039A
+\global\lccode"03E0="03E1 \global\uccode"03E1="03A1
+\global\lccode"03F0="03BA \global\uccode"03F0="039A
+\global\lccode"03F1="03C1 \global\uccode"03F1="03A1
+\global\lccode"03F2="03F2 \global\uccode"03F2="03F9
+\global\lccode"03F9="03F2 \global\uccode"03F9="03F9
+\global\lccode"1F00="1F00 \global\uccode"1F00="0391
+\global\lccode"1F01="1F01 \global\uccode"1F01="0391
+\global\lccode"1F02="1F02 \global\uccode"1F02="0391
+\global\lccode"1F03="1F03 \global\uccode"1F03="0391
+\global\lccode"1F04="1F04 \global\uccode"1F04="0391
+\global\lccode"1F05="1F05 \global\uccode"1F05="0391
+\global\lccode"1F06="1F06 \global\uccode"1F06="0391
+\global\lccode"1F07="1F07 \global\uccode"1F07="0391
+\global\lccode"1F08="1F00 \global\uccode"1F08="0391
+\global\lccode"1F09="1F01 \global\uccode"1F09="0391
+\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391
+\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391
+\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391
+\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391
+\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391
+\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391
+\global\lccode"1F10="1F10 \global\uccode"1F10="0395
+\global\lccode"1F11="1F11 \global\uccode"1F11="0395
+\global\lccode"1F12="1F12 \global\uccode"1F12="0395
+\global\lccode"1F13="1F13 \global\uccode"1F13="0395
+\global\lccode"1F14="1F14 \global\uccode"1F14="0395
+\global\lccode"1F15="1F15 \global\uccode"1F15="0395
+\global\lccode"1F18="1F10 \global\uccode"1F18="0395
+\global\lccode"1F19="1F11 \global\uccode"1F19="0395
+\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395
+\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395
+\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395
+\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395
+\global\lccode"1F20="1F20 \global\uccode"1F20="0397
+\global\lccode"1F21="1F21 \global\uccode"1F21="0397
+\global\lccode"1F22="1F22 \global\uccode"1F22="0397
+\global\lccode"1F23="1F23 \global\uccode"1F23="0397
+\global\lccode"1F24="1F24 \global\uccode"1F24="0397
+\global\lccode"1F25="1F25 \global\uccode"1F25="0397
+\global\lccode"1F26="1F26 \global\uccode"1F26="0397
+\global\lccode"1F27="1F27 \global\uccode"1F27="0397
+\global\lccode"1F28="1F20 \global\uccode"1F28="0397
+\global\lccode"1F29="1F21 \global\uccode"1F29="0397
+\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397
+\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397
+\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397
+\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397
+\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397
+\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397
+\global\lccode"1F30="1F30 \global\uccode"1F30="0399
+\global\lccode"1F31="1F31 \global\uccode"1F31="0399
+\global\lccode"1F32="1F32 \global\uccode"1F32="0399
+\global\lccode"1F33="1F33 \global\uccode"1F33="0399
+\global\lccode"1F34="1F34 \global\uccode"1F34="0399
+\global\lccode"1F35="1F35 \global\uccode"1F35="0399
+\global\lccode"1F36="1F36 \global\uccode"1F36="0399
+\global\lccode"1F37="1F37 \global\uccode"1F37="0399
+\global\lccode"1F38="1F30 \global\uccode"1F38="0399
+\global\lccode"1F39="1F31 \global\uccode"1F39="0399
+\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399
+\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399
+\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399
+\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399
+\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399
+\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399
+\global\lccode"1F40="1F40 \global\uccode"1F40="039F
+\global\lccode"1F41="1F41 \global\uccode"1F41="039F
+\global\lccode"1F42="1F42 \global\uccode"1F42="039F
+\global\lccode"1F43="1F43 \global\uccode"1F43="039F
+\global\lccode"1F44="1F44 \global\uccode"1F44="039F
+\global\lccode"1F45="1F45 \global\uccode"1F45="039F
+\global\lccode"1F48="1F40 \global\uccode"1F48="039F
+\global\lccode"1F49="1F41 \global\uccode"1F49="039F
+\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F
+\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F
+\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F
+\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F
+\global\lccode"1F50="1F50 \global\uccode"1F50="03A5
+\global\lccode"1F51="1F51 \global\uccode"1F51="03A5
+\global\lccode"1F52="1F52 \global\uccode"1F52="03A5
+\global\lccode"1F53="1F53 \global\uccode"1F53="03A5
+\global\lccode"1F54="1F54 \global\uccode"1F54="03A5
+\global\lccode"1F55="1F55 \global\uccode"1F55="03A5
+\global\lccode"1F56="1F56 \global\uccode"1F56="03A5
+\global\lccode"1F57="1F57 \global\uccode"1F57="03A5
+\global\lccode"1F59="1F51 \global\uccode"1F59="03A5
+\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5
+\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5
+\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5
+\global\lccode"1F60="1F60 \global\uccode"1F60="03A9
+\global\lccode"1F61="1F61 \global\uccode"1F61="03A9
+\global\lccode"1F62="1F62 \global\uccode"1F62="03A9
+\global\lccode"1F63="1F63 \global\uccode"1F63="03A9
+\global\lccode"1F64="1F64 \global\uccode"1F64="03A9
+\global\lccode"1F65="1F65 \global\uccode"1F65="03A9
+\global\lccode"1F66="1F66 \global\uccode"1F66="03A9
+\global\lccode"1F67="1F67 \global\uccode"1F67="03A9
+\global\lccode"1F68="1F60 \global\uccode"1F68="03A9
+\global\lccode"1F69="1F61 \global\uccode"1F69="03A9
+\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9
+\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9
+\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9
+\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9
+\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9
+\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9
+\global\lccode"1F70="1F70 \global\uccode"1F70="0391
+\global\lccode"1F71="1F71 \global\uccode"1F71="0391
+\global\lccode"1F72="1F72 \global\uccode"1F72="0395
+\global\lccode"1F73="1F73 \global\uccode"1F73="0395
+\global\lccode"1F74="1F74 \global\uccode"1F74="0397
+\global\lccode"1F75="1F75 \global\uccode"1F75="0397
+\global\lccode"1F76="1F76 \global\uccode"1F76="0399
+\global\lccode"1F77="1F77 \global\uccode"1F77="0399
+\global\lccode"1F78="1F78 \global\uccode"1F78="039F
+\global\lccode"1F79="1F79 \global\uccode"1F79="039F
+\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5
+\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5
+\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9
+\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9
+\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC
+\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC
+\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC
+\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC
+\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC
+\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC
+\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC
+\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC
+\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC
+\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC
+\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC
+\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC
+\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC
+\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC
+\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC
+\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC
+\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC
+\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC
+\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC
+\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC
+\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC
+\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC
+\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC
+\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC
+\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC
+\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC
+\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC
+\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC
+\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC
+\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC
+\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC
+\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC
+\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC
+\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC
+\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC
+\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC
+\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC
+\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC
+\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC
+\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC
+\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC
+\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC
+\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC
+\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC
+\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC
+\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC
+\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC
+\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC
+\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8
+\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9
+\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC
+\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC
+\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC
+\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391
+\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC
+\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8
+\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9
+\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391
+\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391
+\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC
+\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD
+\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC
+\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC
+\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC
+\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397
+\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC
+\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395
+\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395
+\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397
+\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397
+\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC
+\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8
+\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9
+\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA
+\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA
+\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399
+\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA
+\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8
+\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9
+\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399
+\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399
+\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8
+\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9
+\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB
+\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB
+\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1
+\global\lccode"1FE5="1FE5 \global\uccode"1FE5="1FEC
+\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5
+\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB
+\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8
+\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9
+\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5
+\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5
+\global\lccode"1FEC="1FE5 \global\uccode"1FEC="1FEC
+\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC
+\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC
+\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC
+\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9
+\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC
+\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F
+\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F
+\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9
+\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9
+\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC
+
+\ifx\l@greek\@undefined
+ \ifx\l@polygreek\@undefined
+ \xpg@nopatterns{Greek}
+ \adddialect\l@greek0
+ \else
+ \let\l@greek\l@polygreek
+ \fi
+\fi
+\ifx\l@monogreek\@undefined
+ \xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
+ I will use the patterns loaded for \string\l@greek instead}
+ \adddialect\l@monogreek\l@greek
+\fi
+\ifx\l@ancientgreek\@undefined
+ \xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
+ I will use the patterns loaded for \string\l@greek instead}
+ \adddialect\l@ancientgreek\l@greek
+\fi
+
+%set monotonic as default
+\def\greek@variant{\l@monogreek}% monotonic
+\def\captionsgreek{\monogreekcaptions}%
+\def\dategreek{\datemonogreek}%
+
+\def\tmp@mono{mono}
+\def\tmp@monotonic{monotonic}
+\def\tmp@poly{poly}
+\def\tmp@polytonic{polytonic}
+\def\tmp@ancient{ancient}
+\def\tmp@ancientgreek{ancientgreek}
+
+\define@key{greek}{variant}[monotonic]{%
+\def\@tmpa{#1}%
+\def\captionsgreek{\polygreekcaptions}%
+\ifx\@tmpa\tmp@polytonic%
+ \def\greek@variant{\l@polygreek}%
+ \def\captionsgreek{\polygreekcaptions}%
+ \def\dategreek{\datepolygreek}%
+ \xpg@info{Option: Polytonic Greek}%
+\else%
+ \ifx\@tmpa\tmp@poly%
+ \def\greek@variant{\l@polygreek}%
+ \def\captionsgreek{\polygreekcaptions}%
+ \def\dategreek{\datepolygreek}%
+ \xpg@info{Option: Polytonic Greek}%
+ \else%
+ \ifx\@tmpa\tmp@ancient%
+ \def\greek@variant{\l@ancientgreek}%
+ \def\captionsgreek{\ancientgreekcaptions}%
+ \def\dategreek{\dateancientgreek}%
+ \xpg@info{Option: Ancient Greek}%
+ \else%
+ \ifx\@tmpa\tmp@ancientgreek%
+ \def\greek@variant{\l@ancientgreek}%
+ \def\captionsgreek{\ancientgreekcaptions}%
+ \def\dategreek{\dateancientgreek}%
+ \xpg@info{Option: Ancient Greek}%
+ \else%
+ \def\greek@variant{\l@monogreek}% monotonic
+ \def\captionsgreek{\monogreekcaptions}%
+ \def\dategreek{\datemonogreek}%
+ \xpg@info{Option: Monotonic Greek}%
+ \fi%
+ \fi%
+ \fi%
+\fi}
+
+\def\tmp@arabic{arabic}
+\newif\if@greek@numerals
+\define@key{greek}{numerals}[greek]{%
+\def\@tmpa{#1}\ifx\@tmpa\tmp@arabic\@greek@numeralsfalse\else\@greek@numeralstrue\fi}
+
+\def\tmp@false{false}
+\newif\if@attic@numerals
+\define@key{greek}{attic}[true]{%
+\def\@tmpa{#1}
+\ifx\@tmpa\tmp@false\@attic@numeralsfalse
+\else\@attic@numeralstrue\fi}
+
+% This sets the defaults
+\setkeys{greek}{numerals,attic=false}
+
+\def\monogreekcaptions{%
+ \def\refname{\textgreek{Αναφορές}}%
+ \def\abstractname{\textgreek{Περίληψη}}%
+ \def\bibname{\textgreek{Βιβλιογραφία}}%
+ \def\prefacename{\textgreek{Πρόλογος}}%
+ \def\chaptername{\textgreek{Κεφάλαιο}}%
+ \def\appendixname{\textgreek{Παράρτημα}}%
+ \def\contentsname{\textgreek{Περιεχόμενα}}%
+ \def\listfigurename{\textgreek{Κατάλογος σχημάτων}}%
+ \def\listtablename{\textgreek{Κατάλογος πινάκων}}%
+ \def\indexname{\textgreek{Ευρετήριο}}%
+ \def\figurename{\textgreek{Σχήμα}}%
+ \def\tablename{\textgreek{Πίνακας}}%
+ \def\partname{\textgreek{Μέρος}}%
+ \def\pagename{\textgreek{Σελίδα}}%
+ \def\seename{\textgreek{βλέπε}}%
+ \def\alsoname{\textgreek{βλέπε επίσης}}%
+ \def\enclname{\textgreek{Συνημμένα}}%
+ \def\ccname{\textgreek{Κοινοποίηση}}%
+ \def\headtoname{\textgreek{Προς}}%
+ \def\proofname{\textgreek{Απόδειξη}}%
+ \def\glossaryname{Γλωσσάρι}}%
+\def\datemonogreek{%
+ \def\today{\textgreek{\number\day\space%
+ \greek@month%
+ \space\number\year}}%
+ \def\greektoday{\textgreek{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}}%
+ \def\Greektoday{\textgreek{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}}%
+ \def\greek@month{\ifcase\month\or%
+ Ιανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Απριλίου\or
+ Μαΐου\or
+ Ιουνίου\or
+ Ιουλίου\or
+ Αυγούστου\or
+ Σεπτεμβρίου\or
+ Οκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}%
+\def\polygreekcaptions{%
+ \def\refname{\textgreek{Ἀναφορές}}%
+ \def\abstractname{\textgreek{Περίληψη}}%
+ \def\bibname{\textgreek{Βιβλιογραφία}}%
+ \def\prefacename{\textgreek{Πρόλογος}}%
+ \def\chaptername{\textgreek{Κεφάλαιο}}%
+ \def\appendixname{\textgreek{Παράρτημα}}%
+ \def\contentsname{\textgreek{Περιεχόμενα}}%
+ \def\listfigurename{\textgreek{Κατάλογος σχημάτων}}%
+ \def\listtablename{\textgreek{Κατάλογος πινάκων}}%
+ \def\indexname{\textgreek{Εὑρετήριο}}%
+ \def\figurename{\textgreek{Σχῆμα}}%
+ \def\tablename{\textgreek{Πίνακας}}%
+ \def\partname{\textgreek{Μέρος}}%
+ \def\pagename{\textgreek{Σελίδα}}%
+ \def\seename{\textgreek{βλέπε}}%
+ \def\alsoname{\textgreek{βλέπε ἐπίσης}}%
+ \def\enclname{\textgreek{Συνημμένα}}%
+ \def\ccname{\textgreek{Κοινοποίηση}}%
+ \def\headtoname{\textgreek{Πρὸς}}%
+ \def\proofname{\textgreek{Ἀπόδειξη}}}%
+\def\datepolygreek{%
+ \def\today{\textgreek{\number\day\space%
+ \greek@month%
+ \space\number\year}}%
+ \def\greektoday{\textgreek{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}}%
+ \def\Greektoday{\textgreek{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}}%
+ \def\greek@month{\ifcase\month\or%
+ Ἰανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Ἀπριλίου\or
+ Μαΐου\or
+ Ἰουνίου\or
+ Ἰουλίου\or
+ Αὐγούστου\or
+ Σεπτεμβρίου\or
+ Ὀκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}%
+% this is copied verbatim from xgreek.sty:
+\def\ancientgreekcaptions{%
+ \def\prefacename{Προοίμιον}%
+ \def\refname{Αναφοραί}%
+ \def\abstractname{Περίληψις}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\chaptername{Κεφάλαιον}%
+ \def\appendixname{Παράρτημα}%
+ \def\contentsname{Περιεχόμενα}%
+ \def\listfigurename{Κατάλογος σχημάτων}%
+ \def\listtablename{Κατάλογος πινάκων}%
+ \def\indexname{Εὑρετήριον}%
+ \def\figurename{Σχήμα}%
+ \def\tablename{Πίναξ}%
+ \def\partname{Μέρος}%
+ \def\enclname{Συνημμένως}%
+ \def\ccname{Κοινοποίησις}%
+ \def\headtoname{Πρὸς}%
+ \def\pagename{Σελὶς}%
+ \def\seename{ὃρα}%
+ \def\alsoname{ὃρα ὡσαύτως}%
+ \def\proofname{Ἀπόδειξις}%
+ \def\glossaryname{Γλωσσάριον}%
+ \def\refname{Ἀναφοραὶ}%
+ \def\indexname{Εὑρετήριο}%
+ \def\figurename{Σχῆμα}%
+ \def\headtoname{Πρὸς}}%
+\def\dateancientgreek{%
+ \def\today{\textgreek{\number\day\space%
+ \greek@month%
+ \space\number\year}}%
+ \def\greektoday{\textgreek{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}}%
+ \def\Greektoday{\textgreek{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}}%
+ \def\greek@month{\ifcase\month\or%
+ Ἰανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Ἀπριλίου\or
+ Μαΐου\or
+ Ἰουνίου\or
+ Ἰουλίου\or
+ Αὐγούστου\or
+ Σεπτεμβρίου\or
+ Ὀκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}
+
+% the code for alphabetic numbers and attic numerals
+% is copied verbatim from xgreek.sty
+\DeclareRobustCommand\anw@false{%
+ \DeclareRobustCommand\anw@print{}}
+\DeclareRobustCommand\anw@true{%
+ \DeclareRobustCommand\anw@print{ʹ}}
+\anw@true
+
+\def\greeknumber#1{%
+ \ifnum#1<\@ne\space\gr@ill@value{#1}%
+ \else
+ \ifnum#1<10\expandafter\gr@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\gr@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\gr@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\gr@num@iv\number#1%
+ \else
+ \ifnum#1<100000\expandafter\gr@num@v\number#1%
+ \else
+ \ifnum#1<1000000\expandafter\gr@num@vi\number#1%
+ \else
+ \space\gr@ill@value{#1}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\def\Greeknumber#1{%
+ \expandafter\MakeUppercase\expandafter{\greeknumber{#1}}}
+\let\greeknumeral=\greeknumber
+\let\Greeknumeral=\Greeknumber
+\def\gr@num@i#1{%
+ \ifcase#1\or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi
+ \ifnum#1=\z@\else\anw@true\fi\anw@print}
+\def\gr@num@ii#1{%
+ \ifcase#1\or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi
+ \ifnum#1=\z@\else\anw@true\fi\gr@num@i}
+\def\gr@num@iii#1{%
+ \ifcase#1\or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi
+ \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii}
+\def\gr@num@iv#1{%
+ \ifnum#1=\z@\else ͵\fi
+ \ifcase#1\or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi
+ \gr@num@iii}
+\def\gr@num@v#1{%
+ \ifnum#1=\z@\else ͵\fi
+ \ifcase#1\or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi
+ \gr@num@iv}
+\def\gr@num@vi#1{%
+ ͵\ifcase#1\or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi
+ \gr@num@v}
+
+%%%% Attic numerals (optional)
+\if@attic@numerals%
+\newcount\@attic@num
+\DeclareRobustCommand*{\@@atticnum}[1]{%
+ \@attic@num#1\relax
+ \ifnum\@attic@num<\@ne%
+ \space%
+ \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
+ \else\ifnum\@attic@num>249999%
+ \space%
+ \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
+ \else
+ \@whilenum\@attic@num>49999\do{%
+ \char"10147\advance\@attic@num-50000}%
+ \@whilenum\@attic@num>9999\do{%
+ M\advance\@attic@num-\@M}%
+ \ifnum\@attic@num>4999%
+ \char"10146\advance\@attic@num-5000%
+ \fi\relax
+ \@whilenum\@attic@num>999\do{%
+ Χ\advance\@attic@num-\@m}%
+ \ifnum\@attic@num>499%
+ \char"10145\advance\@attic@num-500%
+ \fi\relax
+ \@whilenum\@attic@num>99\do{%
+ Η\advance\@attic@num-100}%
+ \ifnum\@attic@num>49%
+ \char"10144\advance\@attic@num-50%
+ \fi\relax
+ \@whilenum\@attic@num>9\do{%
+ Δ\advance\@attic@num by-10}%
+ \@whilenum\@attic@num>4\do{%
+ Π\advance\@attic@num-5}%
+ \ifcase\@attic@num\or Ι\or ΙΙ\or ΙΙΙ\or ΙΙΙΙ\fi%
+ \fi\fi}
+\def\@atticnum#1{%
+ \expandafter\@@atticnum\expandafter{\the#1}}
+\def\atticnumeral#1{%
+ \@attic@num#1\relax
+ \@atticnum{\@attic@num}}
+\let\atticnum=\atticnumeral
+\fi
+%%%%
+
+\def\greek@numbers{%
+ \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \if@greek@numerals
+ \def\greek@alph##1{\protect\greeknumber{##1}}%
+ \def\greek@Alph##1{\protect\Greeknumber{##1}}%
+ \let\@alph\greek@alph%
+ \let\@Alph\greek@Alph%
+ \fi}
+
+\def\nogreek@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+ \let\greek@alph\@undefined%
+ \let\greek@Alph\@undefined%
+ }
+
+\def\greek@language{\protect\language=\greek@variant}
+
+\def\greek@font{%
+ \@ifundefined{greekfont}{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@check@ot@script{grek}%
+ \if@tempswa%
+ \addfontfeature{Script=Greek}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Greek script!^^J
+ Please define \string\greekfont\space with \string\newfontfamily}%
+ \fi%
+ }%
+ {\greekfont}}
+
+\def\selectnormalfontgreek{%
+ \let\normalfont=\greek@font%
+ \def\reset@font{\normalfont}}
+
+\setlocalhyphenmins{greek}{2}{2}%
+
+\def\noextras@greek{%
+ \nofrench@indent%
+ }
+
+\def\blockextras@greek{%
+ \frenchspacing%
+ \french@indent%
+ }
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf
new file mode 100644
index 00000000000..8b8016c7ba5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf
@@ -0,0 +1,209 @@
+\ProvidesFile{gloss-hebrew.ldf}[polyglossia: module for hebrew]
+\RequirePackage{bidi}
+\RequirePackage{hebrewcal}
+\makeatletter
+
+\ifx\l@hebrew\@undefined
+ \xpg@nopatterns{Hebrew}%
+ \adddialect\l@hebrew0
+\fi
+
+\def\hebrew@RL{\relax}
+
+\newif\if@calendar@hebrew
+\def\tmp@hebrew{hebrew}
+\define@key{hebrew}{calendar}[gregorian]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@hebrew%
+ \@calendar@hebrewtrue%
+ \else%
+ \@calendar@hebrewfalse%
+ \fi}
+
+% hebrewcal.sty also defines the boolean key fullyear (default=false)
+
+\newif\if@hebrew@numerals
+\def\tmp@hebrew{hebrew}
+\define@key{hebrew}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@hebrew%
+ \@hebrew@numeralstrue%
+ \else%
+ \@hebrew@numeralsfalse%
+ \fi}
+
+\setkeys{hebrew}{numerals}
+
+\def\captionshebrew{%
+ \def\prefacename{מבוא}%
+ \def\refname{רשימט מקורוט}%
+ \def\abstractname{טקציר}%
+ \def\bibname{ביבליו גרפיח}%
+ \def\chaptername{פרק}%
+ \def\appendixname{נספה}%
+ \def\contentsname{טוכן עניינים}%
+ \def\listfigurename{רשימט איורים}%
+ \def\listtablename{רשימט תבלאוט}%
+ \def\indexname{מפטה}%
+ \def\figurename{איור}%
+ \def\tablename{תבלח}%
+ \def\partname{הלק}%
+ \def\enclname{רצ"ב}%
+ \def\ccname{חעטקי ם}%
+ \def\headtoname{אל}%
+ \def\pagename{עמוד}%
+ \def\psname{נ.ב.}%
+ \def\seename{ראח}%
+ \def\alsoname{ראח ג ם}% check
+ \def\proofname{חוכהח}
+ \def\glossaryname{אגרון מונחים}% check
+}
+\def\datehebrew{%
+ \def\today{%
+ \if@calendar@hebrew%
+ \hebrewtoday%
+ \else%
+ \hebrewnumber\day%
+ \space ב\hebrewgregmonth{\month}\space%
+ \hebrewnumber\year%
+ \fi}%
+}
+
+\def\hebrewgregmonth#1{\ifcase#1%
+ \or ינואר% יאנואר
+ \or פברואר\or מרץ% מרס / מארס
+ \or אפריל\or מי% מאי
+ \or יוני\or יולי\or אבגוסט% אוגוסט
+ \or ספטמבר\or אוקטובר\or נובמבר\or דצמבר\fi}
+
+
+\def\hebrewalph#1{%
+\ifnum#1>9999 \xpg@warning{Illegal value (#1) for Hebrew numeral} {#1}
+\else
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for Hebrew numeral}%
+ \else
+ \ifnum#1<10\expandafter\heb@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\heb@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\heb@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\heb@num@iv\number#1%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+\let\hebrewnumeral\hebrewalph
+
+\def\hebnum@zero{}
+
+%Hebrew alphabetic numerals (primitive implementation -- the code in Babel is more complex):
+\def\heb@num@i#1{%
+ \ifcase#1\or\char"05D0\or\char"05D1\or\char"05D2\or\char"05D3\or\char"05D4%
+ \or\char"05D5\or\char"05D6\or\char"05D7\or\char"05D8\fi
+ \ifnum#1=\z@\hebnum@zero\fi}
+\def\heb@num@ii#1{%
+ \ifcase#1\or\char"05D9\or\char"05DB\or\char"05DC\or\char"05DE\or\char"05E0%
+ \or\char"05E1\or\char"05E2\or\char"05E4\or\char"05E6\fi
+ \ifnum#1=\z@\fi\heb@num@i}
+\def\heb@num@iii#1{%
+ \ifcase#1\or\char"05E7\or\char"05E8\or\char"05E9\or\char"05EA\or\char"05DA%
+ \or\char"05DD\or\char"05DF\or\char"05E3\or\char"05E5\fi
+ \ifnum#1=\z@\fi\heb@num@ii}
+\def\heb@num@iv#1{%
+ \ifcase#1\or\char"05D0\char"05F3\or\char"05D1\char"05F3\or\char"05D2\char"05F3%
+ \or\char"05D3\char"05F3\or\char"05D4\char"05F3\or\char"05D5\char"05F3%
+ \or\char"05D6\char"05F3\or\char"05D7\char"05F3\or\char"05D8\char"05F3\fi
+ \ifnum#1=\z@\fi\heb@num@iii}
+%TODO [optionally]
+% -insert gereshayim (\char"05F4) before last letter of a sequence of two letters or more
+% -insert geresh (\char"05F3) after letter if it is alone
+
+\def\hebrew@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \let\@alph\hebrewalph%
+ \let\@Alph\hebrewalph%
+}
+\def\nohebrew@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+ }
+
+\def\hebrewnumber#1{%
+ \if@hebrew@numerals\hebrewalph{#1}%
+ \else{\reset@font\number#1}%
+ \fi}
+
+\def\hebrew@globalnumbers{%
+ \let\@latinarabic\@arabic%
+ \let\@arabic\hebrewnumber%
+ \renewcommand\thefootnote{\protect\hebrewnumber{\c@footnote}}%
+ }
+
+\def\nohebrew@globalnumbers{
+ \let\@arabic\@latinarabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+ }
+
+\def\hebrew@language{\language=\l@hebrew}
+
+\def\hebrew@font{%
+ \@ifundefined{hebrewfont}{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@check@ot@script{hebr}%
+ \if@tempswa%
+ \addfontfeature{Script=Hebrew}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Hebrew script!^^J
+ Please define \string\hebrewfont\space with \string\newfontfamily}%
+ \fi%
+ }%
+{\hebrewfont}}
+
+% TODO add setup to define Sans and Mono Hebrew fonts if desired
+\def\hebrew@font@sf{%
+ \@ifundefined{hebrewfontsf}{%
+% \sffamily% FIXME
+% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Hebrew}%
+% \else%
+ \hebrew@font%
+% \fi%
+ }%
+ {\hebrewfontsf}%
+}
+\def\hebrew@font@tt{%
+ \@ifundefined{hebrewfonttt}{%
+% \ttfamily% FIXME
+% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Hebrew}%
+% \else%
+ \hebrew@font%
+% \fi%
+ }%
+ {\hebrewfonttt}%
+}
+\def\selectnormalfonthebrew{%
+ \let\normalfont=\hebrew@font%
+ \let\rmfamily=\hebrew@font%
+ \let\sffamily=\hebrew@font@sf%
+ \let\ttfamily=\hebrew@font@tt%
+ \def\reset@font{\normalfont}}
+
+\def\blockextras@hebrew{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+\def\noextras@hebrew{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf
new file mode 100644
index 00000000000..e850974165f
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf
@@ -0,0 +1,99 @@
+\ProvidesFile{gloss-hindi.ldf}[polyglossia: module for hindi]
+% UTF-8 strings kindly provided by Zdenek Wagner, 10-03-2008
+% TODO: add option for velthuis transliteration with link to
+% Velthuis Devanagari project: http://devnag.sarovar.org.
+\makeatletter
+
+\ifx\l@hindi\@undefined%
+ \ifx\l@sanskrit\@undefined%
+ \xpg@nopatterns{Hindi}%
+ \adddialect\l@hindi0%
+ \else
+ \let\l@hindi\l@sanskrit%
+ \fi
+\fi
+
+\def\captionshindi{%
+ \def\abstractname{\texthindi{सारांश}}%
+ \def\appendixname{\texthindi{परिशिष्ट}}%
+ \def\bibname{\texthindi{संदर ग्रन्थ}}% (?)
+ \def\ccname{}%
+ \def\chaptername{\texthindi{अध्याय}}%
+ \def\contentsname{\texthindi{विषय सूची}}%
+ \def\enclname{}%
+ \def\figurename{\texthindi{चित्र}}% रेखाचित्र
+ \def\headpagename{\texthindi{पृषठ}}%
+ \def\headtoname{}%
+ \def\indexname{\texthindi{सूची}}%
+ % सूचक
+ % अनुक्रमणिका
+ % अनुक्रमणि
+ \def\listfigurename{\texthindi{चित्रों की सूची}}%
+ \def\listtablename{\texthindi{तालिकाओं की सूची}}%
+ \def\pagename{\texthindi{पृषठ}}%
+ \def\partname{\texthindi{खणड}}%
+ \def\prefacename{\texthindi{प्रस्तावना}}% प्राक्कथन
+ \def\refname{\texthindi{हवाले}}%
+ \def\tablename{\texthindi{तालिका}}%
+ \def\seename{\texthindi{देखिए}}%
+ \def\alsoname{\texthindi{और देखिए}}%
+ \def\alsoseename{\texthindi{और देखिए}}%
+}
+\def\datehindi{%
+ \def\today{\texthindi{\number\day\space\ifcase\month\or
+ जनवरी\or
+ फ़रवरी\or
+ मार्च\or
+ अपरैल\or
+ मई\or
+ जून\or
+ जलाई\or
+ अगस्त\or
+ सितम्बर\or
+ अक्तूबर\or
+ नवम्बर\or
+ दिसम्बर\fi
+ \space\number\year}}%
+}
+
+\def\hindi@language{\protect\language=\l@hindi}
+
+\def\hindi@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{hindifont}{%
+ \@ifundefined{devanagarifont}{%
+ \zf@check@ot@script{deva}%
+ \if@tempswa%
+ \addfontfeature{Script=Devanagari}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Devanagari script!^^J
+ Please define \string\devanagarifont\space or \string\hindifont\space with \string\newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{HIN}%
+ \if@tempswa\addfontfeature{Language=Hindi}\fi%
+ }%
+ {\devanagarifont%
+ \zf@check@ot@lang{HIN}%
+ \if@tempswa\addfontfeature{Language=Hindi}\fi%
+ }}%
+ {\hindifont}%
+}
+
+\def\selectnormalfonthindi{%
+ \let\normalfont=\hindi@font%
+ \let\rmfamily=\hindi@font%
+ % TODO add setup to define Sans and Mono fonts if desired
+ \let\sffamily=\hindi@font%
+ \let\ttfamily=\hindi@font%
+ \def\reset@font{\normalfont}}
+
+\def\blockextras@hindi{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+\def\noextras@hindi{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf
new file mode 100644
index 00000000000..0d7b39f291b
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf
@@ -0,0 +1,89 @@
+\ProvidesFile{gloss-icelandic.ldf}[polyglossia: module for icelandic]
+\makeatletter
+\def\icelandic@font{\normalfontlatin}
+
+\ifx\l@icelandic\@undefined%
+ \xpg@nopatterns{Icelandic}%
+ \adddialect\l@icelandic0%
+\fi
+
+\def\captionsicelandic{%
+ \def\refname{\texticelandic{Heimildir}}%
+ \def\abstractname{\texticelandic{Útdráttur}}%
+ \def\bibname{\texticelandic{Heimildir}}%
+ \def\prefacename{\texticelandic{Formáli}}%
+ \def\chaptername{\texticelandic{Kafli}}%
+ \def\appendixname{\texticelandic{Viðauki}}%
+ \def\contentsname{\texticelandic{Efnisyfirlit}}%
+ \def\listfigurename{\texticelandic{Myndaskrá}}%
+ \def\listtablename{\texticelandic{Töfluskrá}}%
+ \def\indexname{\texticelandic{Atriðisorðaskrá}}%
+ \def\figurename{\texticelandic{Mynd}}%
+ \def\tablename{\texticelandic{Tafla}}%
+ %\def\thepart{\texticelandic{}}%
+ \def\partname{\texticelandic{Hluti}}%
+ \def\pagename{\texticelandic{Blaðsíða}}%
+ \def\seename{\texticelandic{Sjá}}%
+ \def\alsoname{\texticelandic{Sjá einnig}}%
+ \def\enclname{\texticelandic{Hjálagt}}%
+ \def\ccname{\texticelandic{Samrit}}%
+ \def\headtoname{\texticelandic{Til:}}%
+ \def\proofname{\texticelandic{Sönnun}}%
+ \def\glossaryname{\texticelandic{Orðalisti}}%
+ }
+\def\dateicelandic{%
+ \def\today{\texticelandic{\number\day.~\ifcase\month\or
+ janúar\or febrúar\or mars\or apríl\or maí\or
+ júní\or júlí\or ágúst\or september\or
+ október\or nóvember\or desember\fi
+ \space\number\year}}%
+ }
+
+\def\icelandic@language{\protect\language=\l@icelandic}
+
+\setlocalhyphenmins{icelandic}{2}{2}%
+
+\endinput
+
+
+%% implement this as a separate module ?
+%\mathchardef\m@comma="013B
+%\def\@comma@{\ifmmode\m@comma\else,\fi}
+%\def\f@thousandsep{\ifmmode\mskip5.5mu\else\penalty\@M\kern.3em\fi}
+%\newcommand{\decimalsep}{.} \newcommand{\thousandsep}{\@comma@}
+%
+%\newcommand{\tala}[2][\decimalsep]{%
+% \def\@decimalsep{#1}\@tala#2\@empty,\@empty,\@nil}
+%\def\@tala#1,#2,#3\@nil{%
+% \ifx\@empty#2%
+% \@integerpart{#1}%
+% \else
+% \@integerpart{#1}\@decimalsep\@decimalpart{#2}%
+% \fi}
+%\def\@decimalpart#1{\@@decimalpart#1\@empty\@empty\@empty}
+%\def\@@decimalpart#1#2#3#4{#1#2#3%
+% \ifx\@empty#4%
+% \else
+% \thousandsep\expandafter\@@decimalpart\expandafter#4%
+% \fi}
+%\def\@integerpart#1{\@@integerpart{}#1\@empty\@empty\@empty}
+%\def\@@integerpart#1#2#3#4{%
+% \ifx\@empty#2%
+% \@addthousandsep#1\relax
+% \else
+% \ifx\@empty#3%
+% \@addthousandsep\@empty\@empty#1#2\relax
+% \else
+% \ifx\@empty#4%
+% \@addthousandsep\@empty#1#2#3\relax
+% \else
+% \@@integerpartafterfi{#1#2#3#4}%
+% \fi
+% \fi
+% \fi}
+%\def\@@integerpartafterfi#1\fi\fi\fi{\fi\fi\fi\@@integerpart{#1}}
+%\def\@addthousandsep#1#2#3#4{#1#2#3%
+% \if#4\relax
+% \else
+% \thousandsep\expandafter\@addthousandsep\expandafter#4%
+% \fi}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf
new file mode 100644
index 00000000000..432931a1e27
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf
@@ -0,0 +1,44 @@
+\ProvidesFile{gloss-interlingua.ldf}[polyglossia: module for interlingua]
+\makeatletter
+
+\ifx\l@interlingua\@undefined%
+ \xpg@nopatterns{Interlingua}%
+ \adddialect\l@interlingua0%
+\fi
+
+\def\captionsinterlingua{%
+ \def\refname{\textinterlingua{Referentias}}%
+ \def\abstractname{\textinterlingua{Summario}}%
+ \def\bibname{\textinterlingua{Bibliographia}}%
+ \def\prefacename{\textinterlingua{Prefacio}}%
+ \def\chaptername{\textinterlingua{Capitulo}}%
+ \def\appendixname{\textinterlingua{Appendice}}%
+ \def\contentsname{\textinterlingua{Contento}}%
+ \def\listfigurename{\textinterlingua{Lista de figuras}}%
+ \def\listtablename{\textinterlingua{Lista de tabellas}}%
+ \def\indexname{\textinterlingua{Indice}}%
+ \def\figurename{\textinterlingua{Figura}}%
+ \def\tablename{\textinterlingua{Tabella}}%
+ \def\partname{\textinterlingua{Parte}}%
+ %\def\thepart{\textinterlingua{}}%
+ \def\pagename{\textinterlingua{Pagina}}%
+ \def\seename{\textinterlingua{vide}}%
+ \def\alsoname{\textinterlingua{vide etiam}}%
+ \def\enclname{\textinterlingua{Incluso}}%
+ \def\ccname{\textinterlingua{Copia}}%
+ \def\headtoname{\textinterlingua{A}}%
+ \def\proofname{\textinterlingua{Prova}}%
+ \def\glossaryname{\textinterlingua{Glossario}}%
+ }
+\def\dateinterlingua{%
+ \def\today{\textinterlingua{le~\number\day\space de \ifcase\month\or
+ januario\or februario\or martio\or april\or maio\or junio\or
+ julio\or augusto\or septembre\or octobre\or novembre\or
+ decembre\fi
+ \space \number\year}}}
+
+\def\interlingua@language{\protect\language=\l@interlingua}
+
+\setlocalhyphenmins{interlingua}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf
new file mode 100644
index 00000000000..47af5fbc56d
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf
@@ -0,0 +1,48 @@
+\ProvidesFile{gloss-irish.ldf}[polyglossia: module for irish]
+\makeatletter
+\def\irish@font{\normalfontlatin}
+
+\ifx\l@irish\@undefined%
+ \xpg@nopatterns{Irish}%
+ \adddialect\l@irish0%
+\fi
+
+\def\captionsirish{%
+ \def\refname{\textirish{Tagairtí}}%
+ \def\abstractname{\textirish{Achoimre}}%
+ \def\bibname{\textirish{Leabharliosta}}%
+ \def\prefacename{\textirish{Réamhrá}}% <-- also "Brollach"
+ \def\refname{\textirish{Tagairtí}}%
+ \def\chaptername{\textirish{Tagairtí}}%
+ \def\appendixname{\textirish{Aguisín}}%
+ \def\contentsname{\textirish{Clár Ábhair}}%
+ \def\listfigurename{\textirish{Léaráidí}}%
+ \def\listtablename{\textirish{Táblaí}}%
+ \def\indexname{\textirish{Innéacs}}%
+ \def\figurename{\textirish{Léaráid}}%
+ \def\tablename{\textirish{Tábla}}%
+ %\def\thepart{\textirish{}}%
+ \def\partname{\textirish{Cuid}}%
+ \def\pagename{\textirish{Leathanach}}%
+ \def\seename{\textirish{féach}}%
+ \def\alsoname{\textirish{féach freisin}}%
+ \def\enclname{\textirish{faoi iamh}}%
+ \def\ccname{\textirish{cc}}%
+ \def\headtoname{\textirish{Go}}%
+ \def\proofname{\textirish{Cruthúnas}}%
+ \def\glossaryname{\textirish{Glossary}}%
+ }
+\def\dateirish{%
+ \def\today{\textirish{%
+ \number\day\space \ifcase\month\or
+ Eanáir\or Feabhra\or Márta\or Aibreán\or
+ Bealtaine\or Meitheamh\or Iúil\or Lúnasa\or
+ Meán Fómhair\or Deireadh Fómhair\or
+ Mí na Samhna\or Mí na Nollag\fi
+ \space \number\year}}}
+
+\def\irish@language{\protect\language=\l@irish}
+
+\setlocalhyphenmins{irish}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf
new file mode 100644
index 00000000000..4f89bc1d90e
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf
@@ -0,0 +1,48 @@
+\ProvidesFile{gloss-italian.ldf}[polyglossia: module for italian]
+\makeatletter
+\def\italian@font{\normalfontlatin}
+
+\ifx\l@italian\@undefined
+ \xpg@nopatterns{Italian}
+ \adddialect\l@italian0
+\fi
+
+\def\captionsitalian{%
+ \def\prefacename{Prefazione}%
+ \def\refname{Riferimenti bibliografici}%
+ \def\abstractname{Sommario}%
+ \def\bibname{Bibliografia}%
+ \def\chaptername{Capitolo}%
+ \def\appendixname{Appendice}%
+ \def\contentsname{Indice}%
+ \def\listfigurename{Elenco delle figure}%
+ \def\listtablename{Elenco delle tabelle}%
+ \def\indexname{Indice analitico}%
+ \def\figurename{Figura}%
+ \def\tablename{Tabella}%
+ \def\partname{Parte}%
+ \def\enclname{Allegati}%
+ \def\ccname{e~p.~c.}%
+ \def\headtoname{Per}%
+ \def\pagename{Pag.}% % in Italian the abbreviation is preferred
+ \def\seename{vedi}%
+ \def\alsoname{vedi anche}%
+ \def\proofname{Dimostrazione}%
+ \def\glossaryname{Glossario}%
+ }
+\def\dateitalian{%
+ \def\today{\textitalian{\number\day~\ifcase\month\or
+ gennaio\or febbraio\or marzo\or aprile\or maggio\or giugno\or
+ luglio\or agosto\or settembre\or ottobre\or novembre\or
+ dicembre\fi\space \number\year}}
+}
+
+\def\italian@language{\protect\language=\l@italian}
+
+\setlocalhyphenmins{italian}{2}{2}%
+
+%\def\blockextras@italian{%
+% %TODO ? \clubpenalty3000\widowpenalty3000\finalhyphendemerits50000000
+% }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf
new file mode 100644
index 00000000000..e8c51737c57
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf
@@ -0,0 +1,57 @@
+\ProvidesFile{gloss-latin.ldf}[polyglossia: module for latin]
+\makeatletter
+\def\latin@font{\normalfontlatin}
+
+\ifx\l@latin\@undefined
+ \xpg@nopatterns{latin}
+ \adddialect\l@latin0
+\fi
+
+\def\captionslatin{%
+ \def\prefacename{\textlatin{Praefatio}}%
+ \def\refname{\textlatin{Conspectus librorum}}%
+ \def\abstractname{\textlatin{Summarium}}%
+ \def\bibname{\textlatin{Conspectus librorum}}%
+ \def\chaptername{\textlatin{Caput}}%
+ \def\appendixname{\textlatin{Additamentum}}%
+ \def\contentsname{\textlatin{Index}}%
+ \def\listfigurename{\textlatin{Conspectus descriptionum}}%
+ \def\listtablename{\textlatin{Conspectus tabularum}}%
+ \def\indexname{\textlatin{Index rerum notabilium}}%
+ \def\figurename{\textlatin{Descriptio}}%
+ \def\tablename{\textlatin{Tabula}}%
+ \def\partname{\textlatin{Pars}}%
+ \def\enclname{\textlatin{Additur}}%
+ \def\ccname{\textlatin{Exemplar}}%
+ \def\headtoname{\ignorespaces}%
+ \def\pagename{\textlatin{pagina}}%
+ \def\seename{\textlatin{cfr.}}%
+ \def\alsoname{\textlatin{cfr.}}%
+ \def\proofname{\textlatin{Demonstratio}}%
+ \def\glossaryname{\textlatin{Glossarium}}%
+ }
+\def\datelatin{%
+ \def\today{\textlatin{\uppercase\expandafter{\romannumeral\day}%
+ \space \ifcase\month%
+ \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or Junii\or%
+ Julii\or Augusti\or Septembris\or Octobris\or Novembris\or%
+ Decembris\fi%
+ \space \uppercase\expandafter{\romannumeral\year}}}}
+
+\def\latin@language{\protect\language=\l@latin}
+
+\setlocalhyphenmins{latin}{2}{2}%
+
+\def\noextras@latin{%
+ \nonfrenchspacing%
+}
+
+\def\blockextras@latin{%
+ \frenchspacing%
+}
+
+\def\inlineextras@latin{%
+ \frenchspacing%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf
new file mode 100644
index 00000000000..19b4d438873
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf
@@ -0,0 +1,46 @@
+\ProvidesFile{gloss-latvian.ldf}[polyglossia: module for latvian]
+\makeatletter
+\def\latvian@font{\normalfontlatin}
+
+\ifx\l@latvian\@undefined
+ \xpg@nopatterns{Latvian}
+ \adddialect\l@latvian0
+\fi
+
+\def\captionslatvian{%
+ \def\prefacename{\textlatvian{Priekšvārds}}%
+ \def\refname{\textlatvian{Literatūras saraksts}}%
+ \def\abstractname{\textlatvian{Anotācija}}%
+ \def\bibname{\textlatvian{Literatūra}}%
+ \def\chaptername{\textlatvian{Nodaļa}}%
+ \def\appendixname{\textlatvian{Pielikums}}%
+ \def\contentsname{\textlatvian{Saturs}}%
+ \def\listfigurename{\textlatvian{Attēlu saraksts}}%
+ \def\listtablename{\textlatvian{Tabulu saraksts}}%
+ \def\indexname{\textlatvian{Index}}%
+ \def\figurename{\textlatvian{Att.}}%
+ \def\tablename{\textlatvian{Tabula}}%
+ \def\partname{\textlatvian{Daļa}}%
+ \def\enclname{\textlatvian{encl}}%
+ \def\ccname{\textlatvian{cc}}%
+ \def\headtoname{\textlatvian{To}}%
+ \def\pagename{\textlatvian{lpp.}}%
+ \def\seename{\textlatvian{sk.}}%
+ \def\alsoname{\textlatvian{sk. arī}}%
+ \def\proofname{\textlatvian{Pierādījums}}%
+ }
+\def\datelatvian{%
+ \def\today{\textlatvian{%
+ \number\year.\thinspace gada%
+ \space\number\day.\thinspace%
+ \ifcase\month\or%
+ janvārī\or februārī\or martā\or%
+ aprīlī\or maijā\or jūnijā\or%
+ jūlijā\or augustā\or septembrī\or%
+ oktobrī\or novembrī\or decembrī\fi}}}
+
+\def\latvian@language{\protect\language=\l@latvian}
+
+\setlocalhyphenmins{latvian}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf
new file mode 100644
index 00000000000..6d974b93fe8
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf
@@ -0,0 +1,58 @@
+\ProvidesFile{gloss-lsorbian.ldf}[polyglossia: module for lower sorbian]
+\makeatletter
+\def\lsorbian@font{\normalfontlatin}
+
+\ifx\l@lowersorbian\@undefined
+ \ifx\l@lsorbian\@undefined
+ \xpg@nopatterns{Lsorbian}
+ \adddialect\l@lsorbian\z@
+ \let\l@lowersorbian\l@lsorbian
+ \else
+ \let\l@lowersorbian\l@lsorbian
+ \fi
+\else
+ \let\l@lsorbian\l@lowersorbian
+\fi
+
+\def\captionslsorbian{%
+ \def\refname{\textlsorbian{Referency}}%
+ \def\abstractname{\textlsorbian{Abstrakt}}%
+ \def\bibname{\textlsorbian{Literatura}}%
+ \def\prefacename{\textlsorbian{Zawod}}%
+ \def\chaptername{\textlsorbian{Kapitl}}%
+ \def\appendixname{\textlsorbian{Dodawki}}%
+ \def\contentsname{\textlsorbian{Wopśimjeśe}}%
+ \def\listfigurename{\textlsorbian{Zapis wobrazow}}%
+ \def\listtablename{\textlsorbian{Zapis tabulkow}}%
+ \def\indexname{\textlsorbian{Indeks}}%
+ \def\figurename{\textlsorbian{Wobraz}}%
+ \def\tablename{\textlsorbian{Tabulka}}%
+ %\def\thepart{\textlsorbian{}}%
+ \def\partname{\textlsorbian{Źěl}}%
+ \def\pagename{\textlsorbian{Strona}}%
+ \def\seename{\textlsorbian{gl.}}%
+ \def\alsoname{\textlsorbian{gl.~teke}}%
+ \def\enclname{\textlsorbian{Pśiłoga}}%
+ \def\ccname{\textlsorbian{CC}}%
+ \def\headtoname{\textlsorbian{Komu}}%
+ \def\proofname{\textlsorbian{Proof}}%
+ \def\glossaryname{\textlsorbian{Glossary}}%
+ }
+\def\datelsorbian{%
+ \def\today{\textlsorbian{\number\day.~\ifcase\month\or
+ januara\or februara\or měrca\or apryla\or maja\or
+ junija\or julija\or awgusta\or septembra\or oktobra\or
+ nowembra\or decembra\fi
+ \space \number\year}}%
+ \def\oldtoday{\textlsorbian{\number\day.~\ifcase\month\or
+ wjelikego rožka\or małego rožka\or nalětnika\or
+ jatšownika\or rožownika\or smažnika\or pražnika\or
+ žnjeńca\or požnjeńca\or winowca\or nazymnika\or
+ godownika\fi\space \number\year}}%
+ }
+
+\def\lsorbian@language{\protect\language=\l@lsorbian}
+
+\setlocalhyphenmins{lsorbian}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf
new file mode 100644
index 00000000000..dc50648372c
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf
@@ -0,0 +1,517 @@
+\ProvidesFile{gloss-magyar.ldf}[polyglossia: module for magyar]
+\makeatletter
+\def\magyar@font{\normalfontlatin}
+
+\ifx\l@magyar\@undefined
+ \ifx\l@hungarian\@undefined
+ \xpg@nopatterns{Magyar}
+ \adddialect\l@magyar0
+ \else
+ \let\l@magyar\l@hungarian
+ \fi
+\fi
+\ifx\l@hungarian\@undefined
+ \let\l@hungarian\l@magyar
+\fi
+
+\def\captionsmagyar{%
+ \def\refname{\textmagyar{Hivatkozások}}%
+ \def\abstractname{\textmagyar{Kivonat}}%
+ \def\bibname{\textmagyar{Irodalomjegyzék}}%
+ \def\prefacename{\textmagyar{Előszó}}%
+ \def\chaptername{\textmagyar{fejezet}}%
+ \def\appendixname{\textmagyar{Függelék}}%
+ \def\contentsname{\textmagyar{Tartalomjegyzék}}%
+ \def\listfigurename{\textmagyar{Ábrák jegyzéke}}%
+ \def\listtablename{\textmagyar{Táblázatok jegyzéke}}%
+ \def\indexname{\textmagyar{Tárgymutató}}%
+ \def\figurename{\textmagyar{ábra}}%
+ \def\tablename{\textmagyar{táblázat}}%
+ %\def\thepart{\textmagyar{}}%
+ \def\partname{\textmagyar{rész}}%
+ \def\pagename{\textmagyar{oldal}}%
+ \def\seename{\textmagyar{lásd}}%
+ \def\alsoname{\textmagyar{lásd még}}%
+ \def\enclname{\textmagyar{Melléklet}}%
+ \def\ccname{\textmagyar{Körlevél–címzettek}}%
+ \def\headtoname{\textmagyar{Címzett}}%
+ \def\proofname{\textmagyar{Bizonyítás}}%
+ \def\glossaryname{\textmagyar{Szójegyzék}}%
+ }
+\def\datemagyar{%
+ \def\today{\textmagyar{%
+ \number\year.\nobreakspace\ifcase\month\or
+ január\or február\or március\or
+ április\or május\or június\or
+ július\or augusztus\or szeptember\or
+ október\or november\or december\fi
+ \space\number\day.}}%
+ \def\ondatemagyar{\textmagyar{%
+ \number\year.\nobreakspace\ifcase\month\or
+ január\or február\or március\or
+ április\or május\or június\or
+ július\or augusztus\or szeptember\or
+ október\or november\or december\fi
+ \space\ifcase\day\or
+ 1-jén\or 2-án\or 3-án\or 4-én\or 5-én\or
+ 6-án\or 7-én\or 8-án\or 9-én\or 10-én\or
+ 11-én\or 12-én\or 13-án\or 14-én\or 15-én\or
+ 16-án\or 17-én\or 18-án\or 19-én\or 20-án\or
+ 21-én\or 22-én\or 23-án\or 24-én\or 25-én\or
+ 26-án\or 27-én\or 28-án\or 29-én\or 30-án\or
+ 31-én\fi}}%
+ \let\ontoday\ondatemagyar}
+
+\def\magyar@language{\protect\language=\l@magyar}
+
+\def\noextras@magyar{%
+ \let\ontoday\@undefined
+ }
+
+\setlocalhyphenmins{magyar}{2}{2}%
+
+\endinput
+
+%IN BABEL these are also redefined
+%
+%\def\fnum@figure{\thefigure.\nobreakspace\figurename}
+%\def\fnum@table{\thetable.\nobreakspace\tablename}
+%\def\@makecaption#1#2{%
+% \vskip\abovecaptionskip
+% \sbox\@tempboxa{#1. #2}%
+% \ifdim \wd\@tempboxa >\hsize
+% {#1. #2\csname par\endcsname}
+% \else
+% \global \@minipagefalse
+% \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+% \fi
+% \vskip\belowcaptionskip}
+%\long\def\@caption#1[#2]#3{%
+% \csname par\endcsname
+% \addcontentsline{\csname ext@#1\endcsname}{#1}%
+% {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}%
+% \begingroup
+% \@parboxrestore
+% \if@minipage
+% \@setminipage
+% \fi
+% \normalsize
+% \@makecaption{\csname fnum@#1\endcsname}%
+% {\ignorespaces #3}\csname par\endcsname
+% \endgroup}
+%\def\@seccntformat#1{\csname the#1\endcsname.\quad}
+%\def\@sect#1#2#3#4#5#6[#7]#8{%
+% \ifnum #2>\c@secnumdepth
+% \let\@svsec\@empty
+% \else
+% \refstepcounter{#1}%
+% \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+% \fi
+% \@tempskipa #5\relax
+% \ifdim \@tempskipa>\z@
+% \begingroup
+% #6{%
+% \@hangfrom{\hskip #3\relax\@svsec}%
+% \interlinepenalty \@M #8\@@par}%
+% \endgroup
+% \csname #1mark\endcsname{#7}%
+% \addcontentsline{toc}{#1}{%
+% \ifnum #2>\c@secnumdepth \else
+% \protect\numberline{\csname the#1\endcsname.}%
+% \fi
+% #7}%
+% \else
+% \def\@svsechd{%
+% #6{\hskip #3\relax
+% \@svsec #8.}%
+% \csname #1mark\endcsname{#7}%
+% \addcontentsline{toc}{#1}{%
+% \ifnum #2>\c@secnumdepth \else
+% \protect\numberline{\csname the#1\endcsname.}%
+% \fi
+% #7}}%
+% \fi
+% \@xsect{#5}}
+%\def\@ssect#1#2#3#4#5{%
+% \@tempskipa #3\relax
+% \ifdim \@tempskipa>\z@
+% \begingroup
+% #4{%
+% \@hangfrom{\hskip #1}%
+% \interlinepenalty \@M #5\@@par}%
+% \endgroup
+% \else
+% \def\@svsechd{#4{\hskip #1\relax #5.}}%
+% \fi
+% \@xsect{#3}}
+%\def\@begintheorem#1#2{\trivlist
+% \item[\hskip \labelsep{\bfseries #2.\ #1.}]\itshape}%
+%\def\@opargbegintheorem#1#2#3{\trivlist
+% \item[\hskip \labelsep{\bfseries #2.\ #1\ (#3).}]\itshape}
+%\@ifclassloaded{book}{%
+% \if@twoside
+% \def\ps@headings{%
+% \let\@oddfoot\@empty\let\@evenfoot\@empty
+% \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@mkboth\markboth
+% \def\chaptermark##1{%
+% \markboth {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\m@ne
+% \if@mainmatter
+% \thechapter. \@chapapp. \ %
+% \fi
+% \fi
+% ##1}}{}}%
+% \def\sectionmark##1{%
+% \markright {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\z@
+% \thesection. \ %
+% \fi
+% ##1}}}}%
+% \else
+% \def\ps@headings{%
+% \let\@oddfoot\@empty
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@mkboth\markboth
+% \def\chaptermark##1{%
+% \markright {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\m@ne
+% \if@mainmatter
+% \thechapter. \@chapapp. \ %
+% \fi
+% \fi
+% ##1}}}}%
+% \fi
+% \def\@part[#1]#2{%
+% \ifnum \c@secnumdepth >-2\relax
+% \refstepcounter{part}%
+% \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}%
+% \else
+% \addcontentsline{toc}{part}{#1}%
+% \fi
+% \markboth{}{}%
+% {\centering
+% \interlinepenalty \@M
+% \normalfont
+% \ifnum \c@secnumdepth >-2\relax
+% \huge\bfseries \thepart.\nobreakspace\partname
+% \csname par\endcsname
+% \vskip 20\p@
+% \fi
+% \Huge \bfseries #2\csname par\endcsname}%
+% \@endpart}
+% \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
+% \if@mainmatter
+% \refstepcounter{chapter}%
+% \typeout{\thechapter.\space\@chapapp.}%
+% \addcontentsline{toc}{chapter}%
+% {\protect\numberline{\thechapter.}#1}%
+% \else
+% \addcontentsline{toc}{chapter}{#1}%
+% \fi
+% \else
+% \addcontentsline{toc}{chapter}{#1}%
+% \fi
+% \chaptermark{#1}%
+% \addtocontents{lof}{\protect\addvspace{10\p@}}%
+% \addtocontents{lot}{\protect\addvspace{10\p@}}%
+% \if@twocolumn
+% \@topnewpage[\@makechapterhead{#2}]%
+% \else
+% \@makechapterhead{#2}%
+% \@afterheading
+% \fi}
+% \def\@makechapterhead#1{%
+% \vspace*{50\p@}%
+% {\parindent \z@ \raggedright \normalfont
+% \ifnum \c@secnumdepth >\m@ne
+% \if@mainmatter
+% \huge\bfseries \thechapter.\nobreakspace\@chapapp{}
+% \csname par\endcsname\nobreak
+% \vskip 20\p@
+% \fi
+% \fi
+% \interlinepenalty\@M
+% \Huge \bfseries #1\csname par\endcsname\nobreak
+% \vskip 40\p@
+% }}%
+%}{}
+%\@ifclassloaded{report}{%
+% \if@twoside
+% \def\ps@headings{%
+% \let\@oddfoot\@empty\let\@evenfoot\@empty
+% \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@mkboth\markboth
+% \def\chaptermark##1{%
+% \markboth {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\m@ne
+% \thechapter. \@chapapp. \ %
+% \fi
+% ##1}}{}}%
+% \def\sectionmark##1{%
+% \markright {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\z@
+% \thesection. \ %
+% \fi
+% ##1}}}}%
+% \else
+% \def\ps@headings{%
+% \let\@oddfoot\@empty
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@mkboth\markboth
+% \def\chaptermark##1{%
+% \markright {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\m@ne
+% \thechapter. \@chapapp. \ %
+% \fi
+% ##1}}}}%
+% \fi
+% \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
+% \refstepcounter{chapter}%
+% \typeout{\thechapter.\space\@chapapp.}%
+% \addcontentsline{toc}{chapter}%
+% {\protect\numberline{\thechapter.}#1}%
+% \else
+% \addcontentsline{toc}{chapter}{#1}%
+% \fi
+% \chaptermark{#1}%
+% \addtocontents{lof}{\protect\addvspace{10\p@}}%
+% \addtocontents{lot}{\protect\addvspace{10\p@}}%
+% \if@twocolumn
+% \@topnewpage[\@makechapterhead{#2}]%
+% \else
+% \@makechapterhead{#2}%
+% \@afterheading
+% \fi}
+% \def\@makechapterhead#1{%
+% \vspace*{50\p@}%
+% {\parindent \z@ \raggedright \normalfont
+% \ifnum \c@secnumdepth >\m@ne
+% \huge\bfseries \thechapter.\nobreakspace\@chapapp{}
+% \csname par\endcsname\nobreak
+% \vskip 20\p@
+% \fi
+% \interlinepenalty\@M
+% \Huge \bfseries #1\csname par\endcsname\nobreak
+% \vskip 40\p@
+% }}%
+%}{}
+%\@ifclassloaded{article}{%
+% \if@twoside
+% \def\ps@headings{%
+% \let\@oddfoot\@empty\let\@evenfoot\@empty
+% \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@mkboth\markboth
+% \def\sectionmark##1{%
+% \markboth {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\z@
+% \thesection.\quad
+% \fi
+% ##1}}{}}%
+% \def\subsectionmark##1{%
+% \markright {%
+% \ifnum \c@secnumdepth >\@ne
+% \thesubsection.\quad
+% \fi
+% ##1}}}%
+% \else
+% \def\ps@headings{%
+% \let\@oddfoot\@empty
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@mkboth\markboth
+% \def\sectionmark##1{%
+% \markright {\MakeUppercase{%
+% \ifnum \c@secnumdepth >\m@ne
+% \thesection.\quad
+% \fi
+% ##1}}}}%
+% \fi%
+%}{}
+%\@ifclassloaded{letter}{%
+% \if@twoside
+% \def\ps@headings{%
+% \let\@oddfoot\@empty\let\@evenfoot\@empty
+% \def\@oddhead{\slshape\headtoname{:} \ignorespaces\toname
+% \hfil \@date
+% \hfil \thepage.\nobreakspace\pagename}%
+% \let\@evenhead\@oddhead}
+% \else
+% \def\ps@headings{%
+% \let\@oddfoot\@empty
+% \def\@oddhead{\slshape\headtoname{:} \ignorespaces\toname
+% \hfil \@date
+% \hfil \thepage.\nobreakspace\pagename}}
+% \fi%
+%}{}
+%\def\az{a\@ifstar{\@az}{\az@}}
+%\def\Az{A\@ifstar{\@az}{\az@}}
+%\def\az@#1{\@az{#1}\nobreakspace#1}
+%\def\@az#1{%
+% \hun@tempadef{relax}{relax}{#1}%
+% \edef\@tempb{\noexpand\@@az\@tempa\hbox!}%
+% \@tempb}
+%\def\hun@tempadef#1#2#3{%
+% \begingroup
+%% \def\@safe@activesfalse{}%
+%% \def\setbox ##1{}% to get rid of accents and special letters
+%% \def\hbox ##1{}%
+%% \def\accent ##1 ##2{##2}%
+%% \def\add@accent ##1##2{##2}%
+%% \def\@text@composite@x ##1##2{##2}%
+%% \def\i{i}\def\j{j}%
+%% \def\ae{a}\def\AE{A}\def\oe{o}\def\OE{O}%
+%% \def\ss{s}\def\L{L}%
+%% \def\d{}\def\b{}\def¸\def\t{}%
+% \expandafter\ifx\csname #1\endcsname\relax
+% \expandafter\ifx\csname #2\endcsname\relax
+% \xdef\@tempa{#3}%
+% \else
+% \xdef\@tempa{\csname #2\endcsname}%
+% \fi
+% \else
+% \xdef\@tempa{\csname #1\endcsname}%
+% \fi
+% \endgroup}
+%\def\aref{\azr}
+%\def\Aref{\Azr}
+%\def\azr{a\@ifstar{\@azr}{\azr@}}
+%\def\Azr{A\@ifstar{\@azr}{\azr@}}
+%\def\azr@{\@ifnextchar ({\azr@@@}{\azr@@}}
+%\def\azr@@#1{\@azr{#1}\nobreakspace\ref{#1}}
+%\def\azr@@@(#1{\@azr{#1}\nobreakspace(\ref{#1}}
+%\def\@azr#1{%
+% \hun@tempadef{hun@r@#1}{r@#1}{}%
+% \ifx\@tempa\empty
+% \else
+% \edef\@tempb{\noexpand\@@az\expandafter\@firstoftwo\@tempa\hbox!}%
+% \@tempb
+% \fi
+%}
+%\def\apageref{\azp}
+%\def\Apageref{\Azp}
+%\def\azp{a\@ifstar{\@azp}{\azp@}}
+%\def\Azp{A\@ifstar{\@azp}{\azp@}}
+%\def\azp@#1{\@azp{#1}\nobreakspace\pageref{#1}}
+%\def\@azp#1{%
+% \hun@tempadef{hun@r@#1}{r@#1}{}%
+% \ifx\@tempa\empty
+% \else
+% \edef\@tempb{\noexpand\@@az\expandafter\@secondoftwo\@tempa\hbox!}%
+% \@tempb
+% \fi
+%}
+%\def\acite{\azc}
+%\def\Acite{\Azc}
+%\def\azc{a\@ifstar{\@azc}{\azc@}}
+%\def\Azc{A\@ifstar{\@azc}{\azc@}}
+%\def\azc@{\@ifnextchar [{\azc@@}{\azc@@[]}}
+%\def\azc@@[#1]#2{%
+% \@azc{#2}\nobreakspace\def\@tempa{#1}%
+% \ifx\@tempa\@empty\cite{#2}\else\cite[#1]{#2}\fi}
+%\def\@azc#1{\@@azc#1,\hbox!}
+%\def\@@azc#1,#2\hbox#3!{%
+% \hun@tempadef{hun@b@#1}{b@#1}{}%
+% \ifx\@tempa\empty
+% \else
+% \edef\@tempb{\noexpand\@@az\@tempa\hbox!}%
+% \@tempb
+% \fi}
+%\def\hun@number@lehgth#1#2\hbox#3!{%
+% \ifcat\noexpand#11%
+% \ifnum\expandafter`\csname#1\endcsname>47
+% \ifnum\expandafter`\csname#1\endcsname<58
+% \advance\count@ by \@ne
+% \hun@number@lehgth#2\hbox\hbox!\fi\fi\fi}
+%\def\hun@alph@lehgth#1#2\hbox#3!{%
+% \ifcat\noexpand#1A%
+% \advance\count@ by \@ne
+% \hun@alph@lehgth#2\hbox\hbox!\fi}
+%\def\@@az@string#1#2{%
+% \ifx#1A%
+% \let\@tempa\@tempb
+% \else\ifx#1E%
+% \let\@tempa\@tempb
+% \else\ifx#1I%
+% \let\@tempa\@tempb
+% \else\ifx#1O%
+% \let\@tempa\@tempb
+% \else\ifx#1U%
+% \let\@tempa\@tempb
+% \fi\fi\fi\fi\fi
+% \ifx\@tempa\@tempb
+% \else
+% \count@\z@
+% \hun@alph@lehgth#1#2\hbox\hbox!%
+% \ifnum\count@=\@ne
+% \ifx#1F%
+% \let\@tempa\@tempb
+% \else\ifx#1L%
+% \let\@tempa\@tempb
+% \else\ifx#1M%
+% \let\@tempa\@tempb
+% \else\ifx#1N%
+% \let\@tempa\@tempb
+% \else\ifx#1R%
+% \let\@tempa\@tempb
+% \else\ifx#1S%
+% \let\@tempa\@tempb
+% \else\ifx#1X%
+% \let\@tempa\@tempb
+% \else\ifx#1Y%
+% \let\@tempa\@tempb
+% \fi\fi\fi\fi\fi\fi\fi\fi
+% \fi
+% \fi}
+%\def\@@az#1#2\hbox#3!{%
+% \let\@tempa\@empty
+% \def\@tempb{z}%
+% \uppercase{%
+% \ifx5#1%
+% \let\@tempa\@tempb
+% \else\ifx1#1%
+% \count@\@ne
+% \hun@number@lehgth#2\hbox\hbox!%
+% \loop
+% \ifnum\count@>\thr@@
+% \advance\count@-\thr@@
+% \repeat
+% \ifnum\count@=\@ne
+% \let\@tempa\@tempb
+% \fi
+% \else
+% \@@az@string{#1}{#2}%
+% \fi\fi
+% }%
+% \@tempa}
+%\def\refstepcounter#1{\stepcounter{#1}%
+% \def\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}}%
+%\let\old@label\label
+%\def\label#1{\@bsphack
+% \old@label{#1}%
+% \begingroup
+% \let\romannumeral\number
+% \def\@roman##1{\number ##1}%
+% \def\@Roman##1{\number ##1}%
+% {\toks0={\noexpand\noexpand\noexpand\number}%
+% \def\number##1{\the\toks0 ##1}\xdef\tempb@{\thepage}}%
+% \edef\@tempa##1{\noexpand\protected@write\@auxout{}%
+% {\noexpand\string\noexpand\hunnewlabel
+% {##1}{{\@currentlabel}{\tempb@}}}}%
+% \@tempa{#1}%
+% \endgroup
+% \@esphack}%
+%
+%%% noextras :
+%%% \let\label\old@label
+%
+%\def\hunnewlabel#1#2{%
+% \def\@tempa{#2}%
+% \expandafter\ifx\csname r@#1\endcsname\@tempa
+% \relax% \message{No need for def: #1}%
+% \else
+% \global\expandafter\let\csname hun@r@#1\endcsname\@tempa%
+% \fi
+%}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf
new file mode 100644
index 00000000000..c2198134913
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf
@@ -0,0 +1,58 @@
+\ProvidesFile{gloss-norsk.ldf}[polyglossia: module for norwegian]
+\makeatletter
+\def\norsk@font{\normalfontlatin}
+
+\ifx\l@norsk\@undefined%
+ \xpg@nopatterns{Norsk}%
+ \adddialect\l@norsk0%
+\fi
+
+\def\captionsnorsk{%
+ \def\refname{\textnorsk{Referanser}}%
+ \def\abstractname{\textnorsk{Sammendrag}}%
+ \def\bibname{\textnorsk{Bibliografi}}%
+ \def\prefacename{\textnorsk{Forord}}%
+ \def\chaptername{\textnorsk{Kapittel}}%
+ \def\appendixname{\textnorsk{Tillegg}}%
+ \def\contentsname{\textnorsk{Innhold}}%
+ \def\listfigurename{\textnorsk{Figurer}}%
+ \def\listtablename{\textnorsk{Tabeller}}%
+ \def\indexname{\textnorsk{Register}}%
+ \def\figurename{\textnorsk{Figur}}%
+ \def\tablename{\textnorsk{Tabell}}%
+ %\def\thepart{\textnorsk{}}% <<<
+ \def\partname{\textnorsk{Del}}%
+ \def\pagename{\textnorsk{Side}}%
+ \def\seename{\textnorsk{Se}}%
+ \def\alsoname{\textnorsk{Se også}}%
+ \def\enclname{\textnorsk{Vedlegg}}%
+ \def\ccname{\textnorsk{Kopi sendt}}%
+ \def\headtoname{\textnorsk{Til}}%
+ \def\proofname{\textnorsk{Bevis}}%
+ \def\glossaryname{\textnorsk{Ordliste}}%
+ }
+\def\datenorsk{%
+ \def\today{\textnorsk{\number\day.~\ifcase\month\or
+ januar\or februar\or mars\or april\or mai\or juni\or
+ juli\or august\or september\or oktober\or november\or desember
+ \fi\space\number\year}}%
+ }
+
+\def\norsk@language{\protect\language=\l@norsk}
+
+\setlocalhyphenmins{norsk}{2}{2}%
+
+\def\noextras@norsk{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@norsk{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@norsk{%
+ \frenchspacing%
+ }
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf
new file mode 100644
index 00000000000..1f2b48fad93
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf
@@ -0,0 +1,58 @@
+\ProvidesFile{gloss-nynorsk.ldf}[polyglossia: module for norwegian (Nynorsk)]
+\makeatletter
+\def\nynorsk@font{\normalfontlatin}
+
+\ifx\l@nynorsk\@undefined%
+ \xpg@nopatterns{Nynorsk}%
+ \adddialect\l@nynorsk0%
+\fi
+
+\def\captionsnynorsk{%
+ \def\refname{\textnynorsk{Referansar}}%
+ \def\abstractname{\textnynorsk{Sammendrag}}%
+ \def\bibname{\textnynorsk{Litteratur}}%
+ \def\prefacename{\textnynorsk{Forord}}%
+ \def\chaptername{\textnynorsk{Kapittel}}%
+ \def\appendixname{\textnynorsk{Tillegg}}%
+ \def\contentsname{\textnynorsk{Innhald}}%
+ \def\listfigurename{\textnynorsk{Figurar}}%
+ \def\listtablename{\textnynorsk{Tabellar}}%
+ \def\indexname{\textnynorsk{Register}}%
+ \def\figurename{\textnynorsk{Figur}}%
+ \def\tablename{\textnynorsk{Tabell}}%
+ %\def\thepart{\textnynorsk{}}% <<<
+ \def\partname{\textnynorsk{Del}}%
+ \def\pagename{\textnynorsk{Side}}%
+ \def\seename{\textnynorsk{Sjå}}%
+ \def\alsoname{\textnynorsk{Sjå òg}}%
+ \def\enclname{\textnynorsk{Vedlegg}}%
+ \def\ccname{\textnynorsk{Kopi til}}%
+ \def\headtoname{\textnynorsk{Til}}%
+ \def\proofname{\textnynorsk{Bevis}}%
+ \def\glossaryname{\textnynorsk{Ordliste}}%
+ }
+\def\datenynorsk{%
+ \def\today{\textnynorsk{\number\day.~\ifcase\month\or
+ januar\or februar\or mars\or april\or mai\or juni\or
+ juli\or august\or september\or oktober\or november\or desember
+ \fi\space\number\year}}%
+ }
+
+\def\norsk@language{\protect\language=\l@nynorsk}
+
+\setlocalhyphenmins{nynorsk}{2}{2}%
+
+\def\noextras@nynorsk{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@nynorsk{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@nynorsk{%
+ \frenchspacing%
+ }
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf
new file mode 100644
index 00000000000..fc2e6abe894
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf
@@ -0,0 +1,56 @@
+\ProvidesFile{gloss-polish.ldf}[polyglossia: module for polish]
+\makeatletter
+\def\polish@font{\normalfontlatin}
+
+\ifx\l@polish\@undefined
+ \xpg@nopatterns{polish}
+ \adddialect\l@polish0
+\fi
+
+\def\captionspolish{%
+ \def\prefacename{\textpolish{Przedmowa}}%
+ \def\refname{\textpolish{Literatura}}%
+ \def\abstractname{\textpolish{Streszczenie}}%
+ \def\bibname{\textpolish{Bibliografia}}%
+ \def\chaptername{\textpolish{Rozdział}}%
+ \def\appendixname{\textpolish{Dodatek}}%
+ \def\contentsname{\textpolish{Spis treści}}%
+ \def\listfigurename{\textpolish{Spis rysunków}}%
+ \def\listtablename{\textpolish{Spis tablic}}%
+ \def\indexname{\textpolish{Indeks}}%
+ \def\figurename{\textpolish{Rysunek}}%
+ \def\tablename{\textpolish{Tablica}}%
+ \def\partname{\textpolish{Część}}%
+ \def\enclname{\textpolish{Załącznik}}%
+ \def\ccname{\textpolish{Kopie:}}%
+ \def\headtoname{\textpolish{Do}}%
+ \def\pagename{\textpolish{Strona}}%
+ \def\seename{\textpolish{Porównaj}}%
+ \def\alsoname{\textpolish{Porównaj także}}%
+ \def\proofname{\textpolish{Dowód}}%
+ \def\glossaryname{\textpolish{Glossary}}% <-- Needs translation
+ }
+\def\datepolish{%
+ \def\today{\textpolish{\ifcase\month\or%
+ stycznia\or lutego\or marca\or kwietnia\or maja\or czerwca\or%
+ lipca\or sierpnia\or września\or października\or%
+ listopada\or grudnia\fi%
+ \space\number\day, \number\year}}}
+
+\def\polish@language{\protect\language=\l@polish}
+
+\setlocalhyphenmins{polish}{2}{2}%
+
+\def\noextras@polish{%
+ \nonfrenchspacing%
+}
+
+\def\blockextras@polish{%
+ \frenchspacing%
+}
+
+\def\inlineextras@polish{%
+ \frenchspacing%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf
new file mode 100644
index 00000000000..087e90afb17
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf
@@ -0,0 +1,49 @@
+\ProvidesFile{gloss-portuges.ldf}[polyglossia: module for portuguese]
+\makeatletter
+\def\portuges@font{\normalfontlatin}
+
+\ifx\l@portuges\@undefined
+ \ifx\l@portuguese\@undefined
+ \xpg@nopatterns{Portuguese}
+ \adddialect\l@portuges0
+ \else
+ \let\l@portuges\l@portuguese
+ \fi
+\fi
+
+\def\captionsportuges{%
+ \def\refname{\textportuges{Referências}}%
+ \def\abstractname{\textportuges{Resumo}}%
+ \def\bibname{\textportuges{Bibliografia}}%
+ \def\prefacename{\textportuges{Prefácio}}%
+ \def\chaptername{\textportuges{Capítulo}}%
+ \def\appendixname{\textportuges{Apêndice}}%
+ \def\contentsname{\textportuges{Conteúdo}}%
+ \def\listfigurename{\textportuges{Lista de Figuras}}%
+ \def\listtablename{\textportuges{Lista de Tabelas}}%
+ \def\indexname{\textportuges{Índice}}%
+ \def\figurename{\textportuges{Figura}}%
+ \def\tablename{\textportuges{Tabela}}%
+ %\def\thepart{\textportuges{}}%
+ \def\partname{\textportuges{Parte}}%
+ \def\pagename{\textportuges{Página}}%
+ \def\seename{\textportuges{ver}}%
+ \def\alsoname{\textportuges{ver também}}%
+ \def\enclname{\textportuges{Anexo}}%
+ \def\ccname{\textportuges{Com cópia a}}%
+ \def\headtoname{\textportuges{Para}}%
+ \def\proofname{\textportuges{Demonstração}}%
+ \def\glossaryname{\textportuges{Glossário}}%
+ }
+\def\dateportuges{%
+ \def\today{\textportuges{\number\day\space de\space\ifcase\month\or
+ Janeiro\or Fevereiro\or Março\or Abril\or Maio\or Junho\or
+ Julho\or Agosto\or Setembro\or Outubro\or Novembro\or Dezembro%
+ \fi\space de\space\number\year}}%
+ }
+
+\def\portuges@language{\protect\language=\l@portuges}
+
+%\setlocalhyphenmins{portuges}{2}{3}% this is the default
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf
new file mode 100644
index 00000000000..374edfa8d05
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf
@@ -0,0 +1,46 @@
+\ProvidesFile{gloss-romanian.ldf}[polyglossia: module for romanian]
+\makeatletter
+\def\romanian@font{\normalfontlatin}
+
+\ifx\l@romanian\@undefined%
+ \xpg@nopatterns{Romanian}%
+ \adddialect\l@romanian0%
+\fi
+
+\def\captionsromanian{%
+ \def\refname{\textromanian{Bibliografie}}%
+ \def\abstractname{\textromanian{Rezumat}}%
+ \def\bibname{\textromanian{Bibliografie}}%
+ \def\prefacename{\textromanian{Prefaţă}}%
+ \def\chaptername{\textromanian{Capitolul}}%
+ \def\appendixname{\textromanian{Anexa}}%
+ \def\contentsname{\textromanian{Cuprins}}%
+ \def\listfigurename{\textromanian{Listă de figuri}}%
+ \def\listtablename{\textromanian{Listă de tabele}}%
+ \def\indexname{\textromanian{Glosar}}%
+ \def\figurename{\textromanian{Figura}}%
+ \def\tablename{\textromanian{Tabela}}%
+ %\def\thepart{\textromanian{}}%
+ \def\partname{\textromanian{Partea}}%
+ \def\pagename{\textromanian{Pagina}}%
+ \def\seename{\textromanian{Vezi}}%
+ \def\alsoname{\textromanian{Vezi de asemenea}}%
+ \def\enclname{\textromanian{Anexă}}%
+ \def\ccname{\textromanian{Copie}}%
+ \def\headtoname{\textromanian{Pentru}}%
+ \def\proofname{\textromanian{Demonstraţie}}%
+ \def\glossaryname{\textromanian{Glosar}}%
+ }
+\def\dateromanian{%
+ \def\today{\textromanian{\number\day~\ifcase\month\or
+ ianuarie\or februarie\or martie\or aprilie\or mai\or
+ iunie\or iulie\or august\or septembrie\or octombrie\or
+ noiembrie\or decembrie\fi
+ \space \number\year}}%
+ }
+
+\def\romanian@language{\protect\language=\l@romanian}
+
+\setlocalhyphenmins{romanian}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf
new file mode 100644
index 00000000000..d60836d1487
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf
@@ -0,0 +1,205 @@
+\ProvidesFile{gloss-russian.ldf}[polyglossia: module for russian]
+\makeatletter
+
+\ifx\l@russian\@undefined
+ \xpg@nopatterns{Russian}
+ \adddialect\l@russian0
+\fi
+
+\def\russian@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{russianfont}{%
+ \@ifundefined{cyrillicfont}{%
+ \zf@check@ot@script{cyrl}%
+ \if@tempswa%
+ \addfontfeature{Script=Cyrillic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Cyrillic script!^^J
+ Please define \string\cyrillicfont\space or \string\russianfont\space with \string\newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{RUS}%
+ \if@tempswa\addfontfeature{Language=Russian}\fi%
+ }%
+ {\cyrillicfont%
+ \zf@check@ot@lang{RUS}%
+ \if@tempswa\addfontfeature{Language=Russian}\fi}%
+ }%
+ {\russianfont}%
+}
+
+\def\tmp@old{old}
+\define@key{russian}{spelling}[modern]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@old
+ \def\captionsrussian{\captionsrussian@old}
+ \def\daterussian{\daterussian@old}%
+ \else%
+ \def\captionsrussian{\captionsrussian@modern}
+ \def\daterussian{\daterussian@modern}%
+ \fi}
+
+\setkeys{russian}{spelling}
+
+\def\captionsrussian@modern{%
+ \def\prefacename{\textrussian{Предисловие}}%
+ \def\refname{\textrussian{Примечания}}%
+ \def\abstractname{\textrussian{Аннотация}}%
+ \def\bibname{\textrussian{Библиография}}%
+ \def\chaptername{\textrussian{Глава}}%
+ \def\appendixname{\textrussian{Приложение}}%
+ \def\contentsname{\textrussian{Оглавление}}%
+ \def\listfigurename{\textrussian{Список иллюстраций}}%
+ \def\listtablename{\textrussian{Список таблиц}}%
+ \def\indexname{\textrussian{Предметный указатель}}%
+ \def\authorname{\textrussian{Именной указатель}}%
+ \def\figurename{\textrussian{Рис.}}%
+ \def\tablename{\textrussian{Таблица}}%
+ \def\partname{\textrussian{Часть}}%
+ \def\enclname{\textrussian{вкл.}}%
+ \def\ccname{\textrussian{исх.}}%
+ \def\headtoname{\textrussian{вх.}}%
+ \def\pagename{\textrussian{с.}}%
+ \def\seename{\textrussian{см.}}%
+ \def\alsoname{\textrussian{см.~также}}%
+ \def\proofname{\textrussian{Доказательство}}%
+}
+\def\daterussian@modern{%
+ \def\today{\textrussian{\number\day%
+ \space\ifcase\month\or%
+ января\or
+ февраля\or
+ марта\or
+ апреля\or
+ мая\or
+ июня\or
+ июля\or
+ августа\or
+ сентября\or
+ октября\or
+ ноября\or
+ декабря\fi%
+ \space \number\year\space г.}}}
+
+\def\captionsrussian@old{%
+ \def\prefacename{\textrussian{Предисловіе}}%
+ \def\refname{\textrussian{Примѣчанія}}%
+ \def\abstractname{\textrussian{Аннотація}}%
+ \def\bibname{\textrussian{Библіографія}}%
+ \def\chaptername{\textrussian{Глава}}%
+ \def\appendixname{\textrussian{Приложеніе}}%
+ \def\contentsname{\textrussian{Оглавленіе}}%
+ \def\listfigurename{\textrussian{Списокъ иллюстрацій}}%
+ \def\listtablename{\textrussian{Списокъ таблицъ}}%
+ \def\indexname{\textrussian{Предмѣтный указатель}}%
+ \def\authorname{\textrussian{Именной указатель}}%
+ \def\figurename{\textrussian{Рис.}}%
+ \def\tablename{\textrussian{Таблица}}%
+ \def\partname{\textrussian{Часть}}%
+ \def\enclname{\textrussian{вкл.}}%
+ \def\ccname{\textrussian{исх.}}%
+ \def\headtoname{\textrussian{вх.}}%
+ \def\pagename{\textrussian{с.}}%
+ \def\seename{\textrussian{см.}}%
+ \def\alsoname{\textrussian{см.~также}}%
+ \def\proofname{\textrussian{Доказательство}}%
+}
+\def\daterussian@old{
+ \def\today{\textrussian{\number\day%
+ \space\ifcase\month\or%
+ января\or
+ февраля\or
+ марта\or
+ апреля\or
+ мая\or
+ іюня\or
+ іюля\or
+ августа\or
+ сентября\or
+ октября\or
+ ноября\or
+ декабря\fi%
+ \space \number\year\space г.}}}
+
+% The following is based on some ideas from ruscor.sty
+\def\russian@capsformat{%
+ \def\@seccntformat##1{\csname pre##1\endcsname%
+ \csname the##1\endcsname%
+ \csname post##1\endcsname}%
+ \def\@aftersepkern{\hspace{0.5em}}%
+ \def\postchapter{.\@aftersepkern}%
+ \def\postsection{.\@aftersepkern}%
+ \def\postsubsection{.\@aftersepkern}%
+ \def\postsubsubsection{.\@aftersepkern}%
+ \def\postparagraph{.\@aftersepkern}%
+ \def\postsubparagraph{.\@aftersepkern}%
+ \def\prechapter{}%
+ \def\presection{}%
+ \def\presubsection{}%
+ \def\presubsubsection{}%
+ \def\preparagraph{}%
+ \def\presubparagraph{}}
+
+\def\russian@Alph#1{\ifcase#1\or
+ А\or Б\or В\or г\or д\or Е\or Ж\or
+ З\or И\or К\or Л\or М\or Н\or О\or
+ П\or Р\or С\or Т\or У\or Ф\or Х\or
+ Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я\else\xpg@ill@value{#1}{russian@Alph}\fi}
+\def\russian@alph#1{\ifcase#1\or
+ а\or б\or в\or Г\or Д\or е\or ж\or
+ з\or и\or к\or л\or м\or н\or о\or
+ п\or р\or с\or т\or у\or ф\or х\or
+ ц\or ч\or ш\or щ\or э\or ю\or я\else\xpg@ill@value{#1}{russian@alph}\fi}
+
+\def\russian@numbers{%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
+ \let\@Alph\russian@Alph%
+ \let\@alph\russian@alph%
+}
+
+\def\norussian@numbers{%
+ \let\@Alph\latin@Alph%
+ \let\@alph\latin@alph%
+}
+
+\def\russian@language{\protect\language=\l@russian}
+
+\setlocalhyphenmins{russian}{2}{2}%
+
+\def\noextras@russian{%
+ \nonfrenchspacing%
+ \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+ }
+
+\def\blockextras@russian{%
+ \frenchspacing%
+ \russian@capsformat%
+ }
+
+\def\inlineextras@russian{%
+ \frenchspacing%
+ }
+
+\endinput
+
+%\def\russian@punctuation{%
+% \frenchspacing%
+% \def\No{№\kern.1667em}%
+% \def\cyrdash{—}%
+% \def\PlainTextEmDash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi%
+% \cyrdash\hskip.2em\ignorespaces}%
+% \def\CompoundNamesEmDash{\leavevmode\ifdim\lastskip>\z@\unskip\fi%
+% \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}%
+% \def\DirectSpeechEmDash{\leavevmode%
+% \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}}
+%
+%\def\norussian@punctuation{%
+% \nonfrenchspacing%
+% \let\No\@undefined%
+% \let\cyrdash\@undefined%
+% \let\PlainTextEmDash\@undefined%
+% \let\CompoundNamesEmDash\@undefined%
+% \let\DirectSpeechEmDash\@undefined%
+%}
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf
new file mode 100644
index 00000000000..329270c6d01
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf
@@ -0,0 +1,71 @@
+\ProvidesFile{gloss-samin.ldf}[polyglossia: module for samin]
+\makeatletter
+\def\samin@font{\normalfontlatin}
+
+\ifx\l@samin\@undefined%
+ \xpg@nopatterns{Samin}%
+ \adddialect\l@samin0%
+\fi
+
+%\def\samin@punctuation{%
+% \frenchspacing%
+% \XeTeXinterchartokenstate=1%
+% \XeTeXcharclass `\! 7%
+% \XeTeXcharclass `\? 7%
+% \XeTeXcharclass `\; 7%
+% \XeTeXcharclass `\: 7%
+% \XeTeXinterchartoks 0 7 = {\unskip\kern.1667em}%
+% }
+%
+%\def\nosamin@punctuation{%
+% \nonfrenchspacing%
+% \XeTeXinterchartokenstate=0%
+%}
+
+
+\def\captionssamin{%
+ \def\refname{\textsamin{Čujuhusat}}%
+ \def\abstractname{\textsamin{Čoahkkáigeassu}}%
+ \def\bibname{\textsamin{Girjjálašvuohta}}%
+ \def\prefacename{\textsamin{Ovdasátni}}%
+ \def\chaptername{\textsamin{Kapihttal}}%
+ \def\appendixname{\textsamin{Čuovus}}%
+ \def\contentsname{\textsamin{Sisdoallu}}%
+ \def\listfigurename{\textsamin{Govvosat}}%
+ \def\listtablename{\textsamin{Tabeallat}}%
+ \def\indexname{\textsamin{Registtar}}%
+ \def\figurename{\textsamin{Govus}}%
+ \def\tablename{\textsamin{Tabealla}}%
+ \def\thepart{\textsamin{}}%
+ \def\partname{\textsamin{Oassi}}%
+ \def\pagename{\textsamin{Siidu}}%
+ \def\seename{\textsamin{geahča}}%
+ \def\alsoname{\textsamin{geahča maiddái}}%
+ \def\enclname{\textsamin{Mielddus}}%
+ \def\ccname{\textsamin{Kopia sáddejuvvon}}%
+ \def\headtoname{\textsamin{Vuostáiváldi}}%
+ \def\proofname{\textsamin{Duođaštus}}%
+ \def\glossaryname{\textsamin{Sátnelistu}}%
+ }
+\def\datesamin{%
+ \def\today{\textsamin{\ifcase\month\or
+ ođđajagemánu\or
+ guovvamánu\or
+ njukčamánu\or
+ cuoŋománu\or
+ miessemánu\or
+ geassemánu\or
+ suoidnemánu\or
+ borgemánu\or
+ čakčamánu\or
+ golggotmánu\or
+ skábmamánu\or
+ juovlamánu\fi
+ \space\number\day.~b.\space\number\year}}%
+ }
+
+\def\samin@language{\protect\language=\l@samin}
+
+\setlocalhyphenmins{samin}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf
new file mode 100644
index 00000000000..3f92a243edb
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf
@@ -0,0 +1,103 @@
+\ProvidesFile{gloss-sanskrit.ldf}[polyglossia: module for sanskrit]
+\makeatletter
+
+\ifx\l@sanskrit\@undefined%
+ \ifx\l@prakrit\@undefined%
+ \xpg@nopatterns{Sanskrit}%
+ \adddialect\l@sanskrit0%
+ \else%
+ \let\l@sanskrit=\l@prakrit%
+ \fi%
+\fi
+
+%% requested from Yves Codet:
+%François, would it be possible to modify "gloss-sanskrit.ldf" so as
+%to add a non-breaking space before punctuation marks, danda (U+0964)
+%and double danda (U+0965)?
+
+\def\sanskrit@punctuation{%
+ \frenchspacing%
+ \XeTeXinterchartokenstate=1%
+ \XeTeXcharclass `\! 7%
+ \XeTeXcharclass `\? 7%
+ \XeTeXcharclass `\; 7%
+ \XeTeXcharclass `\: 7%
+ \XeTeXcharclass `\। 7%
+ \XeTeXcharclass `\॥ 7%
+ \XeTeXinterchartoks 0 7 = {\unskip\kern.1667em}%
+}
+
+\def\nosanskrit@punctuation{%
+ \nonfrenchspacing%
+ \XeTeXinterchartokenstate=0%
+}
+
+%\def\captionssanskrit{%
+% \def\refname{\textsanskrit{<++>}}%
+% \def\abstractname{\textsanskrit{<++>}}%
+% \def\bibname{\textsanskrit{<++>}}%
+% \def\prefacename{\textsanskrit{<++>}}%
+% \def\chaptername{\textsanskrit{<++>}}%
+% \def\appendixname{\textsanskrit{<++>}}%
+% \def\contentsname{\textsanskrit{<++>}}%
+% \def\listfigurename{\textsanskrit{<++>}}%
+% \def\listtablename{\textsanskrit{<++>}}%
+% \def\indexname{\textsanskrit{<++>}}%
+% \def\figurename{\textsanskrit{<++>}}%
+% \def\tablename{\textsanskrit{<++>}}%
+% \def\thepart{\textsanskrit{}}%
+% \def\partname{\textsanskrit{<++>}}%
+% \def\pagename{\textsanskrit{<++>}}%
+% \def\seename{\textsanskrit{<++>}}%
+% \def\alsoname{\textsanskrit{<++>}}%
+% \def\enclname{\textsanskrit{<++>}}%
+% \def\ccname{\textsanskrit{<++>}}%
+% \def\headtoname{\textsanskrit{<++>}}%
+% \def\proofname{\textsanskrit{<++>}}%
+% \def\glossaryname{\textsanskrit{<++>}}%
+% \def\today{\textsanskrit{<++>}}}
+
+\def\sanskrit@font{%
+\@ifundefined{sanskritfont}{%
+ \@ifundefined{devanagarifont}{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@check@ot@script{deva}%
+ \if@tempswa%
+ \addfontfeature{Script=Devanagari}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the devanagari script!^^J
+ Please define \string\devanagarifont\space or \string\sanskritfont\space with \string\newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{SAN}%
+ \if@tempswa\addfontfeature{Language=Sanskrit}\fi%
+ }%
+ {\devanagarifont%
+ \zf@check@ot@lang{SAN}%
+ \if@tempswa\addfontfeature{Language=Sanskrit}\fi%
+ }
+ }%
+ {\sanskritfont}%
+}
+
+\def\selectnormalfontsanskrit{%
+ \let\normalfont=\sanskrit@font%
+ \let\rmfamily=\sanskrit@font%
+ % TODO add setup to define Sans and Mono Sanskrit fonts if desired
+ \let\sffamily=\sanskrit@font%
+ \let\ttfamily=\sanskrit@font%
+ \def\reset@font{\normalfont}}
+
+\def\sanskrit@language{\protect\language=\l@sanskrit}
+
+\setlocalhyphenmins{sanskrit}{1}{5}%
+
+\def\noextras@sanskrit{%
+ \nosanskrit@punctuation%
+ }
+
+\def\blockextras@sanskrit{%
+ \sanskrit@punctuation%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf
new file mode 100644
index 00000000000..4559ec68b5b
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf
@@ -0,0 +1,48 @@
+\ProvidesFile{gloss-scottish.ldf}[polyglossia: module for scottish]
+\makeatletter
+\def\scottish@font{\normalfontlatin}
+
+\ifx\l@scottish\@undefined%
+ \xpg@nopatterns{Scottish}%
+ \adddialect\l@scottish0%
+\fi
+
+\def\captionsscottish{%
+ \def\refname{\textscottish{Iomraidh}}%
+ \def\abstractname{\textscottish{Brìgh}}%
+ \def\bibname{\textscottish{Leabhraichean}}%
+ \def\prefacename{\textscottish{Preface}}% <-- needs translation
+ \def\chaptername{\textscottish{Caibideil}}%
+ \def\appendixname{\textscottish{Ath-sgr`ıobhadh}}%
+ \def\contentsname{\textscottish{Clàr-obrach}}%
+ \def\listfigurename{\textscottish{Liosta Dhealbh}}%
+ \def\listtablename{\textscottish{Liosta Chlàr}}%
+ \def\indexname{\textscottish{Clàr-innse}}%
+ \def\figurename{\textscottish{Dealbh}}%
+ \def\tablename{\textscottish{Clàr}}%
+ %\def\thepart{\textscottish{}}%
+ \def\partname{\textscottish{Cuid}}%
+ \def\pagename{\textscottish{t.d.}}%
+ \def\seename{\textscottish{see}}% <-- needs translation
+ \def\alsoname{\textscottish{see also}}% <-- needs translation
+ \def\enclname{\textscottish{a-staigh}}%
+ \def\ccname{\textscottish{lethbhreac gu}}%
+ \def\headtoname{\textscottish{gu}}%
+ \def\proofname{\textscottish{Proof}}% <-- needs translation
+ \def\glossaryname{\textscottish{Glossary}}% <-- needs translation
+ }
+\def\datescottish{%
+ \def\today{\textscottish{%
+ \number\day\space \ifcase\month\or
+ am Faoilteach\or an Gearran\or am Màrt\or an Giblean\or
+ an Cèitean\or an t-Òg mhios\or an t-Iuchar\or
+ Lùnasdal\or an Sultuine\or an Dàmhar\or
+ an t-Samhainn\or an Dubhlachd\fi
+ \space \number\year}}%
+ }
+
+\def\scottish@language{\protect\language=\l@scottish}
+
+\setlocalhyphenmins{scottish}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf
new file mode 100644
index 00000000000..6d8d60624d5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf
@@ -0,0 +1,155 @@
+\ProvidesFile{gloss-serbian.ldf}[polyglossia: module for serbian]
+\makeatletter
+
+%TODO eventually there will be patterns for Serbian-Latin as well as Serbian-Cyrillic
+\ifx\l@serbian\@undefined%
+ \xpg@nopatterns{Serbian}%
+ \adddialect\l@serbian0%
+\fi
+
+\newif\if@serbian@cyr
+\def\tmp@cyrillic{cyrillic}
+\define@key{serbian}{script}[cyrillic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@cyrillic\@serbian@cyrtrue\else%
+ \@serbian@cyrfalse\fi%
+ \fi}
+
+\setkeys{serbian}{script}
+
+\def\captionsserbian{%
+ \if@serbian@cyr\captionsserbian@cyr\else\captionsserbian@lat\fi%
+ }
+
+\def\dateserbian{%
+ \if@serbian@cyr\dateserbian@cyr\else\dateserbian@lat\fi%
+ }
+
+\def\captionsserbian@lat{%
+ \def\refname{\textserbian{Literatura}}%
+ \def\abstractname{\textserbian{Sažetak}}%
+ \def\bibname{\textserbian{Bibliografija}}%
+ \def\prefacename{\textserbian{Predgovor}}%
+ \def\chaptername{\textserbian{Glava}}%
+ \def\appendixname{\textserbian{Dodatak}}%
+ \def\contentsname{\textserbian{Sadržaj}}%
+ \def\listfigurename{\textserbian{Slike}}%
+ \def\listtablename{\textserbian{Tabele}}%
+ \def\indexname{\textserbian{Indeks}}%
+ \def\figurename{\textserbian{Slika}}%
+ \def\tablename{\textserbian{Tabela}}%
+ \def\partname{\textserbian{Deo}}%
+ \def\pagename{\textserbian{Strana}}%
+ \def\seename{\textserbian{Vidi}}%
+ \def\alsoname{\textserbian{Vidi takođe}}%
+ \def\enclname{\textserbian{Prilozi}}%
+ \def\ccname{\textserbian{Kopije}}%
+ \def\headtoname{\textserbian{Prima}}%
+ \def\proofname{\textserbian{Dokaz}}%
+ \def\glossaryname{\textserbian{Glosar}}% <-- CHECK
+ }
+\def\dateserbian@lat{%
+ \def\today{\textserbian{\number\day .~\ifcase\month\or
+ januar\or februar\or mart\or april\or maj\or
+ juni\or juli\or avgust\or septembar\or oktobar\or novembar\or
+ decembar\fi \space \number\year}}%
+ }
+
+%%%TODO ASK SOMEONE TO CHECK THESE!
+\def\captionsserbian@cyr{%
+ \def\refname{\textserbian{Литература}}%
+ \def\abstractname{\textserbian{Сажетак}}%
+ \def\bibname{\textserbian{Библиографија}}%
+ \def\prefacename{\textserbian{Предговор}}%
+ \def\chaptername{\textserbian{Глава}}%
+ \def\appendixname{\textserbian{Додатак}}%
+ \def\contentsname{\textserbian{Садржај}}%
+ \def\listfigurename{\textserbian{Слике}}%
+ \def\listtablename{\textserbian{Табеле}}%
+ \def\indexname{\textserbian{Индекс}}%
+ \def\figurename{\textserbian{Слика}}%
+ \def\tablename{\textserbian{Табела}}%
+ %\def\thepart{\textserbian{}}%
+ \def\partname{\textserbian{Део}}%
+ \def\pagename{\textserbian{Страна}}%
+ \def\seename{\textserbian{Види}}%
+ \def\alsoname{\textserbian{Види такође}}%
+ \def\enclname{\textserbian{Прилоzи}}%
+ \def\ccname{\textserbian{Копије}}%
+ \def\headtoname{\textserbian{Прима}}%
+ \def\proofname{\textserbian{Докаz}}%
+ \def\glossaryname{\textserbian{Глосар}}% <-- CHECK
+ }
+\def\dateserbian@cyr{%
+ \def\today{\textserbian{\number\day .~\ifcase\month\or
+ јануар\or фебруар\or март\or април\or мај\or
+ јуни\or јули\or август\or септембар\or октобар\or нобембар\or
+ децембар\fi \space \number\year}}%
+ }
+
+\def\serbian@font@cyr{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{serbianfont}{%
+ \@ifundefined{cyrillicfont}{%
+ \zf@check@ot@script{cyrl}%
+ \if@tempswa%
+ \addfontfeature{Script=Cyrillic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Cyrillic script!^^J
+ Please define \string\cyrillicfont\space or \string\serbianfont\space with \string\newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{SRB}%
+ \if@tempswa\addfontfeature{Language=Serbian}\fi%
+ }%
+ {\cyrillicfont%
+ \zf@check@ot@lang{SRB}%
+ \if@tempswa\addfontfeature{Language=Serbian}\fi%
+ }%
+ }%
+ {\serbianfont}%
+}
+
+\def\serbian@font@lat{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \@ifundefined{serbianfontlatin}{%
+ \zf@check@ot@lang{SRB}%
+ \if@tempswa\addfontfeature{Language=Serbian}\fi}%
+ {\serbianfontlatin}%
+}
+
+\def\serbian@font{%
+ \if@serbian@cyr\serbian@font@cyr\else\serbian@font@lat\fi}
+
+%TODO when available load latin hyphenation patterns as well!
+\def\serbian@language{\protect\language=\l@serbian}
+
+\setlocalhyphenmins{serbian}{2}{2}%
+
+\def\noextras@serbian{%
+ \nofrench@indent%
+ }
+
+\def\blockextras@serbian{%
+ \french@indent%
+ }
+\endinput
+% TODO ? stuff from babel
+
+\def\sh{\mathop{\operator@font sh}\nolimits} % same as \sinh
+\def\ch{\mathop{\operator@font ch}\nolimits} % same as \cosh
+\def\th{\mathop{\operator@font th}\nolimits} % same as \tanh
+\def\cth{\mathop{\operator@font cth}\nolimits} % same as \coth
+\def\arsh{\mathop{\operator@font arsh}\nolimits}
+\def\arch{\mathop{\operator@font arch}\nolimits}
+\def\arth{\mathop{\operator@font arth}\nolimits}
+\def\arcth{\mathop{\operator@font arcth}\nolimits}
+\def\tg{\mathop{\operator@font tg}\nolimits} % same as \tan
+\def\ctg{\mathop{\operator@font ctg}\nolimits} % same as \cot
+\def\arctg{\mathop{\operator@font arctg}\nolimits} % same as \arctan
+\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
+\def\Prob{\mathop{\mathsf P\hskip0pt}\nolimits}
+\def\Expect{\mathop{\mathsf E\hskip0pt}\nolimits}
+\def\Variance{\mathop{\mathsf D\hskip0pt}\nolimits}
+
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf
new file mode 100644
index 00000000000..240ddb75736
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf
@@ -0,0 +1,46 @@
+\ProvidesFile{gloss-slovak.ldf}[polyglossia: module for slovak]
+\makeatletter
+\def\slovak@font{\normalfontlatin}
+
+\ifx\l@slovak\@undefined%
+ \xpg@nopatterns{Slovak}%
+ \adddialect\l@slovak0%
+\fi
+
+\def\captionsslovak{%
+ \def\refname{\textslovak{Referencie}}%
+ \def\abstractname{\textslovak{Abstrakt}}%
+ \def\bibname{\textslovak{Literatúra}}%
+ \def\prefacename{\textslovak{Úvod}}%
+ \def\chaptername{\textslovak{Kapitola}}%
+ \def\appendixname{\textslovak{Dodatok}}%
+ \def\contentsname{\textslovak{Obsah}}%
+ \def\listfigurename{\textslovak{Zoznam obrázkov}}%
+ \def\listtablename{\textslovak{Zoznam tabuliek}}%
+ \def\indexname{\textslovak{Index}}%
+ \def\figurename{\textslovak{Obrázok}}%
+ \def\tablename{\textslovak{Tabuľka}}%
+ %\def\thepart{\textslovak{}}%
+ \def\partname{\textslovak{Časť}}%
+ \def\pagename{\textslovak{Strana}}%
+ \def\seename{\textslovak{viď}}%
+ \def\alsoname{\textslovak{viď tiež}}%
+ \def\enclname{\textslovak{Prílohy}}%
+ \def\ccname{\textslovak{cc.}}%
+ \def\headtoname{\textslovak{Pre}}% was komu
+ \def\proofname{\textslovak{Dôkaz}}%
+ \def\glossaryname{\textslovak{Slovník}}%
+ }
+\def\dateslovak{%
+ \def\today{\textslovak{\number\day.~\ifcase\month\or
+ januára\or februára\or marca\or apríla\or mája\or
+ júna\or júla\or augusta\or septembra\or októbra\or
+ novembra\or decembra\fi
+ \space \number\year}}%
+ }
+
+\def\slovak@language{\protect\language=\l@slovak}
+
+\setlocalhyphenmins{slovak}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf
new file mode 100644
index 00000000000..b9f5e4a81cd
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf
@@ -0,0 +1,46 @@
+\ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for slovenian]
+\makeatletter
+\def\slovenian@font{\normalfontlatin}
+
+\ifx\l@slovenian\@undefined%
+ \ifx\l@slovene\@undefined%
+ \xpg@nopatterns{Slovenian}%
+ \adddialect\l@slovenian0%
+\fi\fi
+
+\def\captionsslovenian{%
+ \def\refname{\textslovenian{Literatura}}%
+ \def\abstractname{\textslovenian{Povzetek}}%
+ \def\bibname{\textslovenian{Literatura}}%
+ \def\prefacename{\textslovenian{Predgovor}}%
+ \def\chaptername{\textslovenian{Poglavje}}%
+ \def\appendixname{\textslovenian{Dodatek}}%
+ \def\contentsname{\textslovenian{Kazalo}}%
+ \def\listfigurename{\textslovenian{Slike}}%
+ \def\listtablename{\textslovenian{Tabele}}%
+ \def\indexname{\textslovenian{Stvarno kazalo}}%
+ \def\figurename{\textslovenian{Slika}}%
+ \def\tablename{\textslovenian{Tabela}}%
+ %\def\thepart{\textslovenian{}}%
+ \def\partname{\textslovenian{Del}}%
+ \def\pagename{\textslovenian{Stran}}%
+ \def\seename{\textslovenian{glej}}%
+ \def\alsoname{\textslovenian{glej tudi}}%
+ \def\enclname{\textslovenian{Priloge}}%
+ \def\ccname{\textslovenian{Kopije}}%
+ \def\headtoname{\textslovenian{Prejme}}%
+ \def\proofname{\textslovenian{Dokaz}}%
+ \def\glossaryname{\textslovenian{Glosar}}% <-- CHECK!
+ }
+\def\dateslovenian{%
+ \def\today{\textslovenian{\number\day.~\ifcase\month\or
+ januar\or februar\or marec\or april\or maj\or junij\or
+ julij\or avgust\or september\or oktober\or november\or december\fi
+ \space \number\year}}%
+ }
+
+\def\slovenian@language{\protect\language=\l@slovenian}
+
+\setlocalhyphenmins{slovenian}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf
new file mode 100644
index 00000000000..7186142b7ad
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf
@@ -0,0 +1,58 @@
+\ProvidesFile{gloss-spanish.ldf}[polyglossia: module for spanish]
+\makeatletter
+\def\spanish@font{\normalfontlatin}
+
+\ifx\l@spanish\@undefined
+ \xpg@nopatterns{spanish}
+ \adddialect\l@spanish0
+\fi
+
+\def\captionsspanish{%
+ \def\prefacename{\textspanish{Prefacio}}%
+ \def\refname{\textspanish{Referencias}}%
+ \def\abstractname{\textspanish{Resumen}}%
+ \def\bibname{\textgerman{Bibliografía}}%
+ \def\chaptername{\textspanish{Capítulo}}%
+ \def\appendixname{\textspanish{Apéndice}}%
+ \def\contentsname{\textspanish{Índice general}}%
+ \def\listfigurename{\textspanish{Índice de figuras}}%
+ \def\listtablename{\textspanish{Índice de cuadros}}%
+ \def\indexname{\textspanish{Índice alfabético}}%
+ \def\figurename{\textspanish{Figura}}%
+ \def\tablename{\textspanish{Cuadro}}%
+ \def\partname{\textspanish{Parte}}%
+ \def\enclname{\textspanish{Adjunto(s)}}%
+ \def\ccname{\textspanish{Copia a}}%
+ \def\headtoname{\textspanish{A}}%
+ \def\pagename{\textspanish{Página}}%
+ \def\seename{\textspanish{véase}}%
+ \def\alsoname{\textspanish{véase también}}%
+ \def\proofname{\textspanish{Prueba}}%
+ \def\glossaryname{\textspanish{Glosario}}%
+ }
+\def\datespanish{%
+ \def\today{\textspanish{\number\day\NonBreakingSpace de%
+ \space \ifcase\month%
+ \or enero\or febrero\or marzo\or abril\or mayo\or junio\or%
+ julio\or agosto\or septiembre\or octubre\or noviembre\or%
+ diciembre\fi%
+ \space de~\number\year}}%
+ }
+
+\def\spanish@language{\protect\language=\l@spanish}
+
+\setlocalhyphenmins{spanish}{2}{2}%
+
+\def\noextras@spanish{%
+ \nonfrenchspacing%
+}
+
+\def\blockextras@spanish{%
+ \frenchspacing%
+}
+
+\def\inlineextras@spanish{%
+ \frenchspacing%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf
new file mode 100644
index 00000000000..8c430db44c1
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf
@@ -0,0 +1,63 @@
+\ProvidesFile{gloss-swedish.ldf}[polyglossia: module for swedish]
+\makeatletter
+\def\swedish@font{\normalfontlatin}
+
+\ifx\l@swedish\@undefined%
+ \xpg@nopatterns{Swedish}%
+ \adddialect\l@swedish0%
+\fi
+
+\def\captionsswedish{%
+ \def\refname{\textswedish{Referenser}}%
+ \def\abstractname{\textswedish{Sammanfattning}}%
+ \def\bibname{\textswedish{Litteraturförteckning}}%
+ \def\prefacename{\textswedish{Förord}}%
+ \def\chaptername{\textswedish{Kapitel}}%
+ \def\appendixname{\textswedish{Bilaga}}%
+ \def\contentsname{\textswedish{Innehåll}}%
+ \def\listfigurename{\textswedish{Figurer}}%
+ \def\listtablename{\textswedish{Tabeller}}%
+ \def\indexname{\textswedish{Sakregister}}%
+ \def\figurename{\textswedish{Figur}}%
+ \def\tablename{\textswedish{Tabell}}%
+ %\def\thepart{\textswedish{}}%
+ \def\partname{\textswedish{Del}}%
+ \def\pagename{\textswedish{Sida}}%
+ \def\seename{\textswedish{se}}%
+ \def\alsoname{\textswedish{se även}}%
+ \def\enclname{\textswedish{Bil.}}%
+ \def\ccname{\textswedish{Kopia för kännedom}}%
+ \def\headtoname{\textswedish{Till}}%
+ \def\proofname{\textswedish{Bevis}}%
+ \def\glossaryname{\textswedish{Ordlista}}%
+ }
+\def\dateswedish{%
+ \def\today{\textswedish{%
+ \number\day~\ifcase\month\or
+ januari\or februari\or mars\or april\or maj\or juni\or
+ juli\or augusti\or september\or oktober\or november\or
+ december\fi
+ \space\number\year}}
+ \def\datesymd{%
+ \def\today{\number\year-\two@digits\month-\two@digits\day}}%
+ \def\datesdmy{%
+ \def\today{\number\day/\number\month\space\number\year}}%
+ }
+
+\def\swedish@language{\protect\language=\l@swedish}
+
+\setlocalhyphenmins{swedish}{2}{2}%
+
+\def\noextras@swedish{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@swedish{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@swedish{%
+ \frenchspacing%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf
new file mode 100644
index 00000000000..57e312cd6f9
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf
@@ -0,0 +1,162 @@
+\ProvidesFile{gloss-syriac.ldf}[polyglossia: module for syriac]
+\RequirePackage{bidi}
+\makeatletter
+
+\ifx\l@syriac\@undefined
+ \xpg@nopatterns{Syriac}%
+ \adddialect\l@syriac0
+\fi
+
+\def\syriac@RL{\relax}
+
+
+\newif\if@eastern@numerals
+\def\tmp@eastern{eastern}
+\define@key{syriac}{numerals}[western]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@eastern%
+ \@eastern@numeralstrue%
+ \else%
+ \@eastern@numeralsfalse%
+ \fi}
+
+\setkeys{syriac}{numerals}
+
+\def\syriac@font{%
+ \@ifundefined{syriacfont}{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@check@ot@script{syrc}%
+ \if@tempswa%
+ \addfontfeature{Script=Syriac}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Syriac script!^^J
+ Please define \string\syriacfont\space with \string\newfontfamily}%
+ \fi%
+ }%
+ {\syriacfont}%
+}
+
+\def\selectnormalfontsyriac{%
+ \let\normalfont=\syriac@font%
+ \let\rmfamily=\syriac@font%
+ % TODO add setup to define Sans and Mono Syriac fonts if desired
+ \let\sffamily=\syriac@font%
+ \let\ttfamily=\syriac@font%
+ \def\reset@font{\normalfont}}
+
+%\define@key{polyglossia}{syriaclocale}[default]{%
+% \def\@syriac@locale{#1}}
+%
+%\def\captionssyriac{%
+%\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\datesyriac{%
+ \def\syriac@month##1{\ifcase##1%
+ \or ܟܢܘܢ ܐܚܪܝ\or ܫܒܛ\or ܐܕܪ\or ܢܝܣܢ\or ܐܝܪ\or ܚܙܝܪܢ\or ܬܡܘܙ\or ܐܒ\or ܐܝܠܘܠ% ܐܠܘܠ
+ \or ܬܫܪܝܢ ܩܕܡ% ܬܫܪܝܢ ܩܕܝܡ
+ \or ܬܫܪܝܢ ܐܚܪܝ\or ܟܢܘܢ ܩܕܡ% ܟܢܘܢ ܩܕܝܡ
+ \fi}
+ \def\today{\@ensure@RL{\syriacnumber\day\space\syriac@month{\month}\space\syriacnumber\year}}
+}
+
+\def\syriac@zero{}
+
+\def\abjadsyriac#1{%
+\ifnum#1>499 \PackageWarning{polyglossia}{Illegal value (#1) for Syriac abjad numeral} {#1}
+\else
+ \ifnum#1<\z@\space\PackageWarning{polyglossia}{Illegal value (#1) for Syriac abjad numeral}%
+ \else
+ \ifnum#1<10\expandafter\abj@syr@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\abj@syr@num@ii\number#1%
+ \else
+ \expandafter\abj@syr@num@iii\number#1%
+ \fi
+ \fi
+ \fi
+\fi
+}
+\def\abj@syr@num@i#1{%
+ \ifcase#1\or\char"0710 \or\char"0712 \or\char"0713 \or\char"0715 %
+ \or\char"0717 \or\char"0718 \or\char"0719 \or\char"071A \or\char"071B\fi
+ \ifnum#1=\z@\syriac@zero\fi}
+\def\abj@syr@num@ii#1{%
+ \ifcase#1\or\char"071D \or\char"071F \or\char"0720 \or\char"0721 \or\char"0722 %
+ \or\char"0723 \or\char"0725 \or\char"0726 \or\char"0728 \fi
+ \ifnum#1=\z@\fi\abj@syr@num@i}
+\def\abj@syr@num@iii#1{%
+ \ifcase#1\or\char"0729 \or\char"072A \or\char"072B \or\char"072C \fi
+ \ifnum#1=\z@\fi\abj@syr@num@ii}
+
+\def\syriacnumber#1{%
+ \if@eastern@numerals{%
+ \ifnum\XeTeXcharglyph"0661 > 0%
+ %%% we test for the presence of one of ١٢٣٤٥٦٧٨٩٠ in the Syriac font,
+ %%% else we try \arabicfont if defined (and give a warning),
+ %%% else we fall back to the Western numerals.
+ \protect\addfontfeature{Mapping=arabicdigits}\number#1}%
+ \else%
+ \ifcsdef{arabicfont}%
+ {{\protect\arabicfont\protect\addfontfeature{Mapping=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}}%
+ {\RL{\reset@font\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}}
+ \fi
+ \else%
+ \RL{\reset@font\number#1}%
+ \fi}
+
+\def\syriac@globalnumbers{%
+ \let\@latinarabic\@arabic%
+ \let\@arabic\syriacnumber%
+ \renewcommand\thefootnote{\protect\syriacnumber{\c@footnote}}%
+ }
+\def\nosyriac@globalnumbers{
+ \let\@arabic\@latinarabic%
+ }
+\def\syriac@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \let\@alph\abjadsyriac%
+ \let\@Alph\abjadsyriac%
+}
+\def\nosyriac@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+ }
+
+\def\syriac@language{\language=\l@syriac}
+
+\def\blockextras@syriac{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+\def\noextras@syriac{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf
new file mode 100644
index 00000000000..c456ccdb93d
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf
@@ -0,0 +1,173 @@
+\ProvidesFile{gloss-thai.ldf}[polyglossia: module for thai]
+%% This is partly based on thai-latex for Babel:
+%%%% Copyright (C) 1999 - 2006
+%%%% by Surapant Meknavin,
+%%%% Theppitak Karoonboonyanan (thep at linux.thai.net),
+%%%% Chanop Silpa-Anan (chanop at debian.org),
+%%%% Poonlap Veerathanabutr (poonlap at linux.thai.net)
+%%%% Thai Linux Working Group
+%%%% http://linux.thai.net/
+%%%%
+\makeatletter
+
+\ifx\l@thai\@undefined%
+ \xpg@nopatterns{Thai}%
+ \adddialect\l@thai0%
+\fi
+
+\newif\if@thai@numerals
+\def\tmp@thai{thai}
+\define@key{thai}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@thai\@thai@numeralstrue\else%
+ \@thai@numeralsfalse\fi%
+ }
+
+\setkeys{thai}{numerals}
+
+\def\captionsthai{%
+ \def\refname{\textthai{หนังสืออ้างอิง}}%
+ \def\abstractname{\textthai{บทคัดย่อ}}%
+ \def\bibname{\textthai{บรรณานุกรม}}%
+ \def\prefacename{\textthai{คำนำ}}%
+ \def\chaptername{\textthai{บทที่}}%
+ \def\appendixname{\textthai{ภาคผนวก}}%
+ \def\contentsname{\textthai{สารบัญ}}%
+ \def\listfigurename{\textthai{สารบัญรูป}}%
+ \def\listtablename{\textthai{สารบัญตาราง}}%
+ \def\indexname{\textthai{ดรรชนี}}%
+ \def\figurename{\textthai{รูปที่}}%
+ \def\tablename{\textthai{ตารางที่}}%
+ %\def\thepart{\textthai{}}%
+ \def\partname{\textthai{ภาค}}%
+ \def\pagename{\textthai{หน้า}}%
+ \def\seename{\textthai{ดู}}%
+ \def\alsoname{\textthai{ดูเพิ่มเติม}}%
+ \def\enclname{\textthai{สิ่งที่แนบมาด้วย}}%
+ \def\ccname{\textthai{สำเนาถึง}}%
+ \def\headtoname{\textthai{เรียน}}%
+ \def\proofname{\textthai{พิสูจน์}}%
+ %\def\glossaryname{\textthai{}}%
+ }
+\def\datethai{%
+ \def\thai@month{%
+ \ifcase\month\or
+ มกราคม\or กุมภาพันธ์\or มีนาคม\or เมษายน%
+ \or พฤษภาคม\or มิถุนายน\or กรกฎาคม\or สิงหาคม%
+ \or กันยายน\or ตุลาคม\or พฤศจิกายน\or ธันวาคม\fi}%
+ \newcount\thai@year%
+ \thai@year=\year%
+ \advance\thai@year by 543%
+ \def\today{\textthai{\thainumber\day \space \thai@month\space พ.ศ.~\thainumber\thai@year}}%
+ }
+
+%NB: thai-latex had "plus 0.6pt", but .4em appears to give better results
+% FIXME to avoid name clashes, rename \wbr to \wordbreak or \thaiworkbreak ?
+\def\wbr{\hskip0pt plus .4em\relax} %%OR \char"200B = ZWSP ? Does not work
+%\catcode"200b=\active
+%\def^^200b{\hskip 0pt plus .4em}
+
+\def\thainumber#1{\if@thai@numerals{\protect\addfontfeature{Mapping=thaidigits}\protect\number#1}\else{\protect\reset@font\protect\number#1}\fi}
+
+\def\@thaialph#1{%
+ \ifcase#1\or ก\or ข\or ค\or ง\or จ\or ฉ\or ช\or ซ\or ฌ\or ญ\or ฎ\or
+ ฏ\or ฐ\or ฑ\or ฒ\or ณ\or ด\or ต\or ถ\or ท\or ธ\or น\or บ\or ป\or ผ\or
+ ฝ\or พ\or ฟ\or ภ\or ม\or ย\or ร\or ล\or ว\or ศ\or ษ\or ส\or ห\or ฬ\or อ\or
+ ฮ\else\xpg@ill@value{#1}{@thaialph}\fi}
+\def\thaiAlph#1{\expandafter\@thaiAlph\csname c@#1\endcsname}
+\def\@thaiAlph#1{%
+ \ifcase#1\or ก\or ข\or ฃ\or ค\or ฅ\or ฆ\or ง\or จ\or ฉ\or ช\or ซ\or
+ ฌ\or ญ\or ฎ\or ฏ\or ฐ\or ฑ\or ฒ\or ณ\or ด\or ต\or ถ\or ท\or ธ\or น\or
+ บ\or ป\or ผ\or ฝ\or พ\or ฟ\or ภ\or ม\or ย\or ร\or ฤ\or ล\or ฦ\or ว\or
+ ศ\or ษ\or ส\or ห\or ฬ\or อ\or ฮ\else\xpg@ill@value{#1}{@thaialph}\fi}
+
+\def\thai@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \if@thai@numerals
+ \let\@alph\@thaialph%
+ \let\@Alph\@thaiAlph%
+ \fi
+ }
+\def\nothai@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+ }
+
+\def\thai@globalnumbers{%
+ \let\@latinarabic\@arabic%
+ \let\@arabic\thainumber%
+ \renewcommand{\thefootnote}{\protect\thainumber{\c@footnote}}%
+ }
+\def\nothai@globalnumbers{%
+ \let\@arabic\@latinarabic%
+ \renewcommand{\thefootnote}{\protect\number{\c@footnote}}%
+ }
+
+\def\thai@font{%
+ \@ifundefined{thaifont}{%
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@check@ot@script{thai}%
+ \if@tempswa%
+ \addfontfeature{Script=Thai}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Thai script!^^J
+ Please define \string\thaifont\space with \string\newfontfamily}%
+ \fi%
+ }%
+ {\thaifont}}
+
+\def\selectnormalfontthai{%
+ \let\normalfont=\thai@font%
+ \let\rmfamily=\thai@font%
+ \let\sffamily=\thai@font%
+ \let\ttfamily=\thai@font%
+ \def\reset@font{\normalfont}}
+
+\def\thai@language{\protect\language=\l@thai}
+
+\setlocalhyphenmins{thai}{11}{11}%
+
+\def\blockextras@thai{%
+ \renewcommand{\baselinestretch}{1.2}% FIXME restore default value in noextras?
+ }
+\endinput
+
+%TODO ?
+
+%\def\thainum#1{\expandafter\thainumber\csname c@#1\endcsname}
+%\def\thaibracenum#1{(\expandafter\thainumber\csname c@#1\endcsname)}
+%\def\thaialph#1{\expandafter\@thaialph\csname c@#1\endcsname}
+
+\@ifclassloaded{book}{%
+ % redefine page numbering for frontmatter and mainmatter
+ \def\ps@headnum{\let\@mkboth\@gobbletwo
+ \def\@oddhead{\reset@font\hfil\thepage\hfil}\let\@oddfoot\@empty
+ \let\@evenhead\@oddhead\let\@evenfoot\@empty}
+ \let\@ltxfrontmatter\frontmatter
+ \renewcommand\frontmatter{\@ltxfrontmatter\pagestyle{headnum}\pagenumbering{thaibracenum}}
+ \let\@ltxmainmatter\mainmatter
+ \renewcommand\mainmatter{\@ltxmainmatter\pagestyle{headings}\pagenumbering{thainum}}
+}{}
+
+\@ifclassloaded{book}{%
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@thaialph\c@chapter}}
+}{}
+\@ifclassloaded{report}{%
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@thaialph\c@chapter}}
+}{}
+\@ifclassloaded{article}{%
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@thaialph\c@section}}
+}{}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf
new file mode 100644
index 00000000000..e44ab1a8570
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf
@@ -0,0 +1,80 @@
+\ProvidesFile{gloss-turkish.ldf}[polyglossia: module for turkish]
+\makeatletter
+
+\def\turkish@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{turkishfont}{%
+ \zf@check@ot@lang{TUR}%
+ \if@tempswa\addfontfeature{Language=Turkish}\fi}
+ {\turkishfont}%
+}%
+
+\ifx\l@turkish\@undefined
+ \xpg@nopatterns{turkish}
+ \adddialect\l@turkish0
+\fi
+
+\def\turkish@punctuation{%
+ \frenchspacing%
+ \XeTeXinterchartokenstate=1%
+ \XeTeXcharclass `\! 7%
+ \XeTeXcharclass `\= 8%
+ \XeTeXcharclass `\: 7%
+ \XeTeXinterchartoks 0 7 = {\unskip\penalty\@M\thinspace}%
+ \XeTeXinterchartoks 0 8 = {\unskip\kern\fontdimen2\font\kern-1.4\fontdimen3\font}%
+}
+
+\def\noturkish@punctuation{%
+ \nonfrenchspacing%
+ \XeTeXinterchartokenstate=0%
+}
+
+\def\captionsturkish{%
+ \def\prefacename{Önsöz}%
+ \def\refname{Kaynaklar}%
+ \def\abstractname{Özet}%
+ \def\bibname{Kaynakça}%
+ \def\chaptername{Bölüm}%
+ \def\appendixname{Ek}%
+ \def\contentsname{İçindekiler}%
+ \def\listfigurename{Şekil Listesi}%
+ \def\listtablename{Tablo Listesi}%
+ \def\indexname{Dizin}%
+ \def\figurename{Şekil}%
+ \def\tablename{Tablo}%
+ \def\partname{Kısım}%
+ \def\enclname{İlişik}%
+ \def\ccname{Diğer Alıcılar}%
+ \def\headtoname{Alıcı}%
+ \def\pagename{Sayfa}%
+ \def\subjectname{İlgili}%
+ \def\seename{bkz.}%
+ \def\alsoname{ayrıca bkz.}%
+ \def\proofname{Kanıt}%
+ \def\glossaryname{Glossary}% <-- Needs translation
+ }
+\def\dateturkish{%
+ \def\today{\number\day~\ifcase\month\or
+ Ocak\or Şubat\or Mart\or Nisan\or Mayıs\or Haziran\or
+ Temmuz\or Ağustos\or Eylül\or Ekim\or Kasım\or
+ Aralık\fi
+ \space\number\year}
+}
+
+\def\turkish@language{\protect\language=\l@turkish}
+
+\setlocalhyphenmins{turkish}{2}{2}%
+
+\def\noextras@turkish{%
+ \noturkish@punctuation%
+}
+
+\def\blockextras@turkish{%
+ \turkish@punctuation%
+}
+
+\def\inlineextras@turkish{%
+ \turkish@punctuation%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf
new file mode 100644
index 00000000000..eac0a7d8df5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf
@@ -0,0 +1,136 @@
+\ProvidesFile{gloss-ukrainian.ldf}[polyglossia: module for ukrainian]
+% Strings taken from Babel
+% and revised by Roman Kyrylych
+%
+\makeatletter
+
+\ifx\l@ukrainian\@undefined%
+ \xpg@nopatterns{Ukrainian}%
+ \adddialect\l@ukrainian0%
+\fi
+
+\def\ukrainian@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{ukrainianfont}{%
+ \@ifundefined{cyrillicfont}{%
+ \zf@check@ot@script{cyrl}%
+ \if@tempswa%
+ \addfontfeature{Script=Cyrillic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Cyrillic script!^^J
+ Please define \string\cyrillicfont\space or \string\ukrainianfont\space with \newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{UKR}%
+ \if@tempswa\addfontfeature{Language=Ukrainian}\fi
+ }%
+ {\cyrillicfont%
+ \zf@check@ot@lang{UKR}%
+ \if@tempswa\addfontfeature{Language=Ukrainian}\fi%
+ }%
+ }%
+ {\ukrainianfont}%
+}%
+
+\def\captionsukrainian{%
+ \def\refname{\textukrainian{Література}}%
+ \def\abstractname{\textukrainian{Анотація}}%
+ \def\bibname{\textukrainian{Бібліоґрафія}}%
+ \def\prefacename{\textukrainian{Вступ}}%
+ \def\chaptername{\textukrainian{Розділ}}%
+ \def\appendixname{\textukrainian{Додаток}}%
+ \def\contentsname{\textukrainian{Зміст}}%
+ \def\listfigurename{\textukrainian{Перелік ілюстрацій}}%
+ \def\listtablename{\textukrainian{Перелік таблиць}}%
+ \def\indexname{\textukrainian{Покажчик}}%
+ \def\authorname{\textukrainian{Іменний покажчик}}% babel has "Їменний покажчик"
+ \def\figurename{\textukrainian{Рис.}}%
+ \def\tablename{\textukrainian{Табл.}}%
+ %\def\thepart{\textukrainian{}}%
+ \def\partname{\textukrainian{Частина}}%
+ \def\pagename{\textukrainian{с.}}%
+ \def\seename{\textukrainian{див.}}%
+ \def\alsoname{\textukrainian{див.\ також}}%
+ \def\enclname{\textukrainian{вкладка}}%
+ \def\ccname{\textukrainian{копія}}%
+ \def\headtoname{\textukrainian{До}}%
+ \def\proofname{\textukrainian{Доведення}}%
+ \def\glossaryname{\textukrainian{Словник термінів}}%
+ }
+\def\dateukrainian{%
+ \def\today{\textukrainian{\number\day~\ifcase\month\or
+ січня\or
+ лютого\or
+ березня\or
+ квітня\or
+ травня\or
+ червня\or
+ липня\or
+ серпня\or
+ вересня\or
+ жовтня\or
+ листопада\or
+ грудня\fi%
+ \space\number\year~р.}}}
+
+\def\ukrainian@Alph#1{\ifcase#1\or
+ А\or Б\or В\or г\or д\or Е\or Є\or Ж\or
+ З\or И\or І\or Ї\or Й\or К\or Л\or М\or Н\or О\or
+ П\or Р\or С\or Т\or У\or Ф\or Х\or
+ Ц\or Ч\or Ш\or Щ\or Ю\or Я\else\xpg@ill@value{#1}{ukrainian@Alph}\fi}
+\def\ukrainian@alph#1{\ifcase#1\or
+ а\or б\or в\or г\or д\or е\or є\or ж\or
+ з\or и\or і\or ї\or й\or к\or л\or м\or н\or о\or
+ п\or р\or с\or т\or у\or ф\or х\or
+ ц\or ч\or ш\or щ\or ю\or я\else\xpg@ill@value{#1}{ukrainian@alph}\fi}
+
+\def\ukrainian@numbers{%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
+ \let\@Alph\ukrainian@Alph%
+ \let\@alph\ukrainian@alph%
+ }
+
+\def\noukrainian@numbers{%
+ \let\@Alph\latin@Alph%
+ \let\@alph\latin@alph%
+}
+
+\def\ukrainian@language{\protect\language=\l@ukrainian}
+
+\setlocalhyphenmins{ukrainian}{2}{2}%
+
+\def\noextras@ukrainian{%
+ \nonfrenchspacing%
+ }
+
+\def\blockextras@ukrainian{%
+ \frenchspacing%
+ }
+
+\def\inlineextras@ukrainian{%
+ \frenchspacing%
+ }
+
+\endinput
+
+%TODO? stuff from Babel
+\def\sh{\mathop{\operator@font sh}\nolimits}
+\def\ch{\mathop{\operator@font ch}\nolimits}
+\def\tg{\mathop{\operator@font tg}\nolimits}
+\def\arctg{\mathop{\operator@font arctg}\nolimits}
+\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
+\def\ctg{\mathop{\operator@font ctg}\nolimits}
+\def\cth{\mathop{\operator@font cth}\nolimits}
+\def\cosec{\mathop{\operator@font cosec}\nolimits}
+\def\Prob{\mathop{\kern\z@\mathsf{P}}\nolimits}
+\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
+\def\nsd{\mathop{\mathrm{н.х.д.}}\nolimits}
+\def\nsk{\mathop{\mathrm{н.х.к.}}\nolimits}
+\def\NSD{\mathop{\mathrm{НСД}}\nolimits}
+\def\NSK{\mathop{\mathrm{НСК}}\nolimits}
+\def\nod{\mathop{\mathrm{н.о.д.}}\nolimits} % ??????
+\def\nok{\mathop{\mathrm{н.о.к.}}\nolimits} % ??????
+\def\NOD{\mathop{\mathrm{НОД}}\nolimits} % ??????
+\def\NOK{\mathop{\mathrm{НОК}}\nolimits} % ??????
+\def\Proj{\mathop{\mathrm{пр}}\nolimits}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf
new file mode 100644
index 00000000000..242269f84b1
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf
@@ -0,0 +1,59 @@
+\ProvidesFile{gloss-usorbian.ldf}[polyglossia: module for upper sorbian]
+\makeatletter
+\def\usorbian@font{\normalfontlatin}
+
+\ifx\l@uppersorbian\@undefined
+ \ifx\l@usorbian\@undefined
+ \xpg@nopatterns{Upper Sorbian}
+ \adddialect\l@usorbian0
+ \let\l@uppersorbian\l@usorbian
+ \else
+ \let\l@uppersorbian\l@usorbian
+ \fi
+\else
+ \let\l@usorbian\l@uppersorbian
+\fi
+
+\def\captionsusorbian{%
+ \def\refname{\textusorbian{Referency}}%
+ \def\abstractname{\textusorbian{Abstrakt}}%
+ \def\bibname{\textusorbian{Literatura}}%
+ \def\prefacename{\textusorbian{Zawod}}%
+ \def\chaptername{\textusorbian{Kapitl}}%
+ \def\appendixname{\textusorbian{Dodawki}}%
+ \def\contentsname{\textusorbian{Wobsah}}%
+ \def\listfigurename{\textusorbian{Zapis wobrazow}}%
+ \def\listtablename{\textusorbian{Zapis tabulkow}}%
+ \def\indexname{\textusorbian{Indeks}}%
+ \def\figurename{\textusorbian{Wobraz}}%
+ \def\tablename{\textusorbian{Tabulka}}%
+ %\def\thepart{\textusorbian{}}%
+ \def\partname{\textusorbian{Dźěl}}%
+ \def\pagename{\textusorbian{Strona}}%
+ \def\seename{\textusorbian{hl.}}%
+ \def\alsoname{\textusorbian{hl.~tež}}%
+ \def\enclname{\textusorbian{Přłoha}}%
+ \def\ccname{\textusorbian{CC}}%
+ \def\headtoname{\textusorbian{Komu}}%
+ \def\proofname{\textusorbian{Proof}}% <-- needs translation
+ \def\glossaryname{\textusorbian{Glossary}}% <-- needs translation
+ }%
+\def\dateusorbian{%
+ \def\today{\textusorbian{\number\day.~\ifcase\month\or
+ januara\or februara\or měrca\or apryla\or meje\or junija\or
+ julija\or awgusta\or septembra\or oktobra\or
+ nowembra\or decembra\fi
+ \space \number\year}}%
+%TODO implement option olddate:
+ \def\oldtoday{\number\day.~\ifcase\month\or
+ wulkeho róžka\or małeho róžka\or nalětnika\or
+ jutrownika\or róžownika\or smažnika\or pražnika\or
+ žnjenca\or požnjenca\or winowca\or nazymnika\or
+ hodownika\fi \space \number\year}%
+ }
+
+\def\usorbian@language{\protect\language=\l@usorbian}
+
+\setlocalhyphenmins{usorbian}{2}{2}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf
new file mode 100644
index 00000000000..21f9d6385b7
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf
@@ -0,0 +1,47 @@
+\ProvidesFile{gloss-welsh.ldf}[polyglossia: module for welsh]
+\makeatletter
+\def\welsh@font{\normalfontlatin}
+
+\ifx\l@welsh\@undefined%
+ \xpg@nopatterns{Welsh}%
+ \adddialect\l@welsh0%
+\fi
+
+\def\captionswelsh{%
+ \def\refname{\textwelsh{Cyfeiriadau}}%
+ \def\abstractname{\textwelsh{Crynodeb}}%
+ \def\bibname{\textwelsh{Llyfryddiaeth}}%
+ \def\prefacename{\textwelsh{Rhagair}}%
+ \def\chaptername{\textwelsh{Pennod}}%
+ \def\appendixname{\textwelsh{Atodiad}}%
+ \def\contentsname{\textwelsh{Cynnwys}}%
+ \def\listfigurename{\textwelsh{Rhestr Ddarluniau}}%
+ \def\listtablename{\textwelsh{Rhestr Dablau}}%
+ \def\indexname{\textwelsh{Mynegai}}%
+ \def\figurename{\textwelsh{Darlun}}%
+ \def\tablename{\textwelsh{Taflen}}%
+ %\def\thepart{\textwelsh{}}%
+ \def\partname{\textwelsh{Rhan}}%
+ \def\pagename{\textwelsh{tudalen}}%
+ \def\seename{\textwelsh{gweler}}%
+ \def\alsoname{\textwelsh{gweler hefyd}}%
+ \def\enclname{\textwelsh{amgaeëdig}}%
+ \def\ccname{\textwelsh{copïau}}%
+ \def\headtoname{\textwelsh{At}}%
+ \def\proofname{\textwelsh{Prawf}}%
+ \def\glossaryname{\textwelsh{Rhestr termau}}%
+ }
+\def\datewelsh{%
+ \def\today{\textwelsh{\ifnum\day=1\relax 1\/\textsuperscript{añ}\else%
+ \number\day\fi\space\ifcase\month\or
+ Ionawr\or Chwefror\or Mawrth\or Ebrill\or
+ Mai\or Mehefin\or Gorffennaf\or Awst\or
+ Medi\or Hydref\or Tachwedd\or Rhagfyr\fi%
+ \space\number\year}}%
+ }
+
+\def\welsh@language{\protect\language=\l@welsh}
+
+\setlocalhyphenmins{welsh}{2}{3}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty b/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
new file mode 100644
index 00000000000..d4f53fccd48
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
@@ -0,0 +1,331 @@
+\ProvidesPackage{hebrewcal}
+ [2008/07/01 v2.4 %
+ Hebrew calendar for polyglossia (adapted from hebcal.sty in Babel)]
+\RequirePackage{bidi}
+
+%% TODO rewrite this on the basis of Reingold & Dershowitz
+%% on the model of hijrical (using calc)
+
+\@ifundefined{@Remainder}{\input{cal-util.def}}{}
+
+\define@boolkey{hebrew}[@hebrew@]{fullyear}[false]{}
+\setkeys{hebrew}{fullyear}
+
+\newcount\hebrewday \newcount\hebrewmonth \newcount\hebrewyear
+\def\hebrewdate#1#2#3{%
+ \HebrewFromGregorian{#1}{#2}{#3}%
+ {\hebrewday}{\hebrewmonth}{\hebrewyear}%
+ \if@rl%
+ \@FormatForHebrew{\hebrewday}{\hebrewmonth}{\hebrewyear}%
+ \else%
+ \@FormatForEnglish{\hebrewday}{\hebrewmonth}{\hebrewyear}%
+ \fi}
+\def\hebrewtoday{\hebrewdate{\day}{\month}{\year}}
+\def\hebrewsetreg{%
+ \HebrewFromGregorian{\day}{\month}{\year}%
+ {\hebrewday}{\hebrewmonth}{\hebrewyear}}
+\def\HebrewYearName#1{{%
+ \@tempcnta=#1\divide\@tempcnta by 1000\multiply\@tempcnta by 1000
+ \ifnum#1=\@tempcnta\relax % divisible by 1000: disambiguate
+ \hebrewnumeral{#1}\ (לפ"ג)%
+ \else % not divisible by 1000
+ \ifnum#1<1000\relax % first millennium: disambiguate
+ \hebrewnumeral{#1}\ (לפ"ג)%
+ \else
+ \ifnum#1<5000
+ \hebrewnumeral{#1}%
+ \else
+ \ifnum#1<6000 % current millenium, print without thousands
+ \@tempcnta=#1\relax
+ \if@hebrew@fullyear\else\advance\@tempcnta by -5000\fi
+ \hebrewnumeral{\@tempcnta}%
+ \else % #1>6000
+ \hebrewnumeral{#1}%
+ \fi
+ \fi
+ \fi
+ \fi}}
+\def\HebrewMonthName#1#2{%
+ \ifnum #1 = 7 %
+ \@CheckLeapHebrewYear{#2}%
+ \if@HebrewLeap אדר\ ב'%
+ \else אדר%
+ \fi%
+ \else%
+ \ifcase#1%
+ % nothing for 0
+ \or תשרי%
+ \or השון%
+ \or כסלו%
+ \or טבת%
+ \or שבט%
+ \or אדר\ א'%
+ \or אדר\ ב'%
+ \or ניסן%
+ \or אייר%
+ \or סיון%
+ \or תמוז%
+ \or אב%
+ \or אלול%
+ \fi%
+ \fi}
+\def\@FormatForHebrew#1#2#3{%
+ \hebrewnumeral{#1}~ב\HebrewMonthName{#2}{#3}~%
+ \HebrewYearName{#3}}
+\def\HebrewMonthNameInEnglish#1#2{%
+ \ifnum #1 = 7%
+ \@CheckLeapHebrewYear{#2}%
+ \if@HebrewLeap Adar II\else Adar\fi%
+ \else%
+ \ifcase #1%
+ % nothing for 0
+ \or Tishrei%
+ \or Heshvan%
+ \or Kislev%
+ \or Tebeth%
+ \or Shebat%
+ \or Adar I%
+ \or Adar II%
+ \or Nisan%
+ \or Iyar%
+ \or Sivan%
+ \or Tammuz%
+ \or Av%
+ \or Elul%
+ \fi
+ \fi}
+\def\@FormatForEnglish#1#2#3{%
+ \HebrewMonthNameInEnglish{#2}{#3} \number#1,\ \number#3}
+\newcount\@common
+\newif\if@HebrewLeap
+\def\@CheckLeapHebrewYear#1{%
+ {%
+ \countdef\tmpa = 0% % \tmpa==\count0
+ \countdef\tmpb = 1% % \tmpb==\count1
+ \tmpa = #1%
+ \multiply \tmpa by 7%
+ \advance \tmpa by 1%
+ \@Remainder{\tmpa}{19}{\tmpb}%
+ \ifnum \tmpb < 7% % \tmpb = (7*year+1)%19
+ \global\@HebrewLeaptrue%
+ \else%
+ \global\@HebrewLeapfalse%
+ \fi}}
+\def\@HebrewElapsedMonths#1#2{%
+ {%
+ \countdef\tmpa = 0% % \tmpa==\count0
+ \countdef\tmpb = 1% % \tmpb==\count1
+ \countdef\tmpc = 2% % \tmpc==\count2
+ \tmpa = #1% %
+ \advance \tmpa by -1% %
+ #2 = \tmpa% % #2 = \tmpa = year-1
+ \divide #2 by 19% % Number of complete Meton cycles
+ \multiply #2 by 235% % #2 = 235*((year-1)/19)
+ \@Remainder{\tmpa}{19}{\tmpb}% \tmpa = years%19-years this cycle
+ \tmpc = \tmpb% %
+ \multiply \tmpb by 12% %
+ \advance #2 by \tmpb% % add regular months this cycle
+ \multiply \tmpc by 7% %
+ \advance \tmpc by 1% %
+ \divide \tmpc by 19% % \tmpc = (1+7*((year-1)%19))/19 -
+ \advance #2 by \tmpc% % add leap months
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@HebrewElapsedDays#1#2{%
+ {%
+ \countdef\tmpa = 0% % \tmpa==\count0
+ \countdef\tmpb = 1% % \tmpb==\count1
+ \countdef\tmpc = 2% % \tmpc==\count2
+ \@HebrewElapsedMonths{#1}{#2}%
+ \tmpa = #2% %
+ \multiply \tmpa by 13753% %
+ \advance \tmpa by 5604% % \tmpa=MonthsElapsed*13758 + 5604
+ \@Remainder{\tmpa}{25920}{\tmpc}% \tmpc == ConjunctionParts
+ \divide \tmpa by 25920%
+ \multiply #2 by 29%
+ \advance #2 by 1%
+ \advance #2 by \tmpa% % #2 = 1 + MonthsElapsed*29 +
+ \@Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek
+ \ifnum \tmpc < 19440%
+ \ifnum \tmpc < 9924%
+ \else% % New moon at 9 h. 204 p. or later
+ \ifnum \tmpa = 2% % on Tuesday ...
+ \@CheckLeapHebrewYear{#1}% of a common year
+ \if@HebrewLeap%
+ \else%
+ \advance #2 by 1%
+ \fi%
+ \fi%
+ \fi%
+ \ifnum \tmpc < 16789%
+ \else% % New moon at 15 h. 589 p. or later
+ \ifnum \tmpa = 1% % on Monday ...
+ \advance #1 by -1%
+ \@CheckLeapHebrewYear{#1}% at the end of leap year
+ \if@HebrewLeap%
+ \advance #2 by 1%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \advance #2 by 1% % new moon at or after midday
+ \fi%
+ \@Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek
+ \ifnum \tmpa = 0% % if Sunday ...
+ \advance #2 by 1%
+ \else% %
+ \ifnum \tmpa = 3% % Wednesday ...
+ \advance #2 by 1%
+ \else%
+ \ifnum \tmpa = 5% % or Friday
+ \advance #2 by 1%
+ \fi%
+ \fi%
+ \fi%
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@DaysInHebrewYear#1#2{%
+ {%
+ \countdef\tmpe = 12% % \tmpe==\count12
+ \@HebrewElapsedDays{#1}{\tmpe}%
+ \advance #1 by 1%
+ \@HebrewElapsedDays{#1}{#2}%
+ \advance #2 by -\tmpe%
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@HebrewDaysInPriorMonths#1#2#3{%
+ {%
+ \countdef\tmpf= 14% % \tmpf==\count14
+ #3 = \ifcase #1% % Days in prior month of regular year
+ 0 \or% % no month number 0
+ 0 \or% % Tishri
+ 30 \or% % Heshvan
+ 59 \or% % Kislev
+ 89 \or% % Tebeth
+ 118 \or% % Shebat
+ 148 \or% % Adar I
+ 148 \or% % Adar II
+ 177 \or% % Nisan
+ 207 \or% % Iyar
+ 236 \or% % Sivan
+ 266 \or% % Tammuz
+ 295 \or% % Av
+ 325 \or% % Elul
+ 400% % Dummy
+ \fi%
+ \@CheckLeapHebrewYear{#2}%
+ \if@HebrewLeap% % in leap year
+ \ifnum #1 > 6% % if month after Adar I
+ \advance #3 by 30% % add 30 days
+ \fi%
+ \fi%
+ \@DaysInHebrewYear{#2}{\tmpf}%
+ \ifnum #1 > 3%
+ \ifnum \tmpf = 353% %
+ \advance #3 by -1% %
+ \fi% % Short Kislev
+ \ifnum \tmpf = 383% %
+ \advance #3 by -1% %
+ \fi% %
+ \fi%
+ \ifnum #1 > 2%
+ \ifnum \tmpf = 355% %
+ \advance #3 by 1% %
+ \fi% % Long Heshvan
+ \ifnum \tmpf = 385% %
+ \advance #3 by 1% %
+ \fi% %
+ \fi%
+ \global\@common = #3}%
+ #3 = \@common}
+\def\@FixedFromHebrew#1#2#3#4{%
+ {%
+ #4 = #1%
+ \@HebrewDaysInPriorMonths{#2}{#3}{#1}%
+ \advance #4 by #1% % Add days in prior months this year
+ \@HebrewElapsedDays{#3}{#1}%
+ \advance #4 by #1% % Add days in prior years
+ \advance #4 by -1373429% % Subtract days before Gregorian
+ \global\@common = #4}% % 01.01.0001
+ #4 = \@common}
+\def\@GregorianDaysInPriorMonths#1#2#3{%
+ {%
+ #3 = \ifcase #1%
+ 0 \or% % no month number 0
+ 0 \or%
+ 31 \or%
+ 59 \or%
+ 90 \or%
+ 120 \or%
+ 151 \or%
+ 181 \or%
+ 212 \or%
+ 243 \or%
+ 273 \or%
+ 304 \or%
+ 334%
+ \fi%
+ \if@GregorianLeap{#2}%
+ \ifnum #1 > 2% % if month after February
+ \advance #3 by 1% % add leap day
+ \fi%
+ \fi%
+ \global\@common = #3}%
+ #3 = \@common}
+\def\@GregorianDaysInPriorYears#1#2{%
+ {%
+ \countdef\tmpc = 4% % \tmpc==\count4
+ \countdef\tmpb = 2% % \tmpb==\count2
+ \tmpb = #1% %
+ \advance \tmpb by -1% %
+ \tmpc = \tmpb% % \tmpc = \tmpb = year-1
+ \multiply \tmpc by 365% % Days in prior years =
+ #2 = \tmpc% % = 365*(year-1) ...
+ \tmpc = \tmpb% %
+ \divide \tmpc by 4% % \tmpc = (year-1)/4
+ \advance #2 by \tmpc% % ... plus Julian leap days ...
+ \tmpc = \tmpb% %
+ \divide \tmpc by 100% % \tmpc = (year-1)/100
+ \advance #2 by -\tmpc% % ... minus century years ...
+ \tmpc = \tmpb% %
+ \divide \tmpc by 400% % \tmpc = (year-1)/400
+ \advance #2 by \tmpc% % ... plus 4-century years.
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@AbsoluteFromGregorian#1#2#3#4{%
+ {%
+ \countdef\tmpd = 0% % \tmpd==\count0
+ #4 = #1% % days so far this month
+ \@GregorianDaysInPriorMonths{#2}{#3}{\tmpd}%
+ \advance #4 by \tmpd% % add days in prior months
+ \@GregorianDaysInPriorYears{#3}{\tmpd}%
+ \advance #4 by \tmpd% % add days in prior years
+ \global\@common = #4}%
+ #4 = \@common}
+\def\HebrewFromGregorian#1#2#3#4#5#6{%
+ {%
+ \countdef\tmpx= 17% % \tmpx==\count17
+ \countdef\tmpy= 18% % \tmpy==\count18
+ \countdef\tmpz= 19% % \tmpz==\count19
+ #6 = #3% %
+ \global\advance #6 by 3761% approximation from above
+ \@AbsoluteFromGregorian{#1}{#2}{#3}{#4}%
+ \tmpz = 1 \tmpy = 1%
+ \@FixedFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}%
+ \ifnum \tmpx > #4% %
+ \global\advance #6 by -1% Hyear = Gyear + 3760
+ \@FixedFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}%
+ \fi% %
+ \advance #4 by -\tmpx% % Days in this year
+ \advance #4 by 1% %
+ #5 = #4% %
+ \divide #5 by 30% % Approximation for month from below
+ \loop% % Search for month
+ \@HebrewDaysInPriorMonths{#5}{#6}{\tmpx}%
+ \ifnum \tmpx < #4%
+ \advance #5 by 1%
+ \tmpy = \tmpx%
+ \repeat%
+ \global\advance #5 by -1%
+ \global\advance #4 by -\tmpy}}
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty b/Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty
new file mode 100644
index 00000000000..02fd693ad2d
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty
@@ -0,0 +1,84 @@
+\ProvidesPackage{hijrical}
+ [2007/12/27 v0.1 %
+ Islamic calendar]
+\RequirePackage{bidi}
+
+\@ifundefined{@Remainder}{\input{cal-util.def}}{}
+
+%% The following functions are straightforward implementation
+%% of Reingold & Dershowitz, Calendrical Calculations, The Millenium Edition
+%%
+
+\def\@FixedFromHijri#1#2#3#4{% year,month,day,counter
+\@ifundefined{c@#4}{\newcounter{#4}}{}%
+\setcounter{tmpA}{#2/2}% see errata of Reingold+Dershowitz
+%\message{tmpA is \thetmpA}%
+\setcounter{tmpB}{(3+11*#1)/30}%
+%\message{tmpB is \thetmpB}%
+\setcounter{#4}{227014+(#1-1)*354+\value{tmpB}+(29*(#2-1))+\value{tmpA}+#3}%
+}
+
+\newcounter{Hijriday}\newcounter{Hijrimonth}\newcounter{Hijriyear}
+
+\def\HijriFromGregorian#1#2#3{% year,month,day
+\@FixedFromGregorian{#1}{#2}{#3}{RDdate}%
+\setcounter{Hijriyear}{(30*(\value{RDdate}-227015)+10646)/10631}%
+\@FixedFromHijri{\value{Hijriyear}}{1}{1}{tmpx}%
+%\message{tmpx is \thetmpx}%
+\setcounter{tmpB}{\value{RDdate}-\value{tmpx}}%
+%\message{tmpB is \thetmpB}%
+\setcounter{Hijrimonth}{((11*\value{tmpB})+330)/325}%
+\@FixedFromHijri{\value{Hijriyear}}{\value{Hijrimonth}}{1}{tmpy}%
+%\message{tmpy is \thetmpy}%
+\setcounter{Hijriday}{1+\value{RDdate}-\value{tmpy}}%
+}
+
+%\HijriFromGregorian{\year}{\month}{\day}%
+
+%\def\PlainHijritoday{%
+%\theHijriday.\theHijrimonth.\theHijriyear}
+
+\def\Hijridate#1#2#3{%
+ \HijriFromGregorian{#1}{#2}{#3}%
+ \if@rl%
+ \FormatHijriDate%
+ \else%
+ \FormatHijriDateEnglish%
+ \fi}
+% added option \Hijritoday[n] (default 0) for adjusting the date + n days
+\@ifundefined{@hijri@correction}{\gdef\@hijri@correction{0}}{}
+\newcommand\Hijritoday[1][\@hijri@correction]{%
+ \@ifundefined{c@adj@day}{\global\newcounter{adj@day}}{}%
+ \setcounter{adj@day}{\the\day+#1}%
+ \Hijridate{\year}{\month}{\value{adj@day}}}
+%\def\Hijritoday{\Hijridate{\year}{\month}{\day}}
+\let\hijritoday=\Hijritoday
+%FIXME necessary?
+%\def\Hijrisetreg{%
+% \HijriFromGregorian{\year}{\month}{\day}}
+
+\def\HijriMonthTranslit#1{\ifcase#1\or Muḥarram\or Ṣafar\or Rabīʿ I\or Rabīʿ II\or%
+Jumādā I\or Jumādā II\or Rajab\or Shaʿbān\or Ramaḍān\or%
+Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
+
+\def\HijriMonthArabic#1{\ifcase#1\or محرم\or صفر\or ربيع الأول\or ربيع الآخر\or%
+جمادى الأولى\or جمادى الآخرة\or رجب\or شعبان\or رمضان\or%
+شوال\or ذو القعدة\or ذو الحجة\fi}
+
+\def\FormatHijriDateEnglish{%
+\number\value{Hijriday}\space\HijriMonthTranslit{\value{Hijrimonth}}\space\number\value{Hijriyear}}
+
+%FIXME : this is already in gloss-arabic
+\def\@rabicnumb@r#1{\@ifundefined{arabicnumber}{{\addfontfeature{Mapping=arabicdigits} #1}}%
+{\arabicnumber{#1}}}
+
+\def\FormatHijriDate{\@ensure@RL{%
+\@rabicnumb@r{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\@rabicnumb@r{\value{Hijriyear}}}}
+
+\endinput
+
+%TODO
+\def\CYearsFromHijri#1{%yields the corr julian or gregorian years
+} % e.g. \CYearsFromHijri{425} -> 1033/34
+
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
new file mode 100644
index 00000000000..1d3abc4c0aa
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
@@ -0,0 +1,360 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{polyglossia}[2008/07/11 v1.0
+ Babel replacement for XeLaTeX]
+\RequirePackage{etoolbox} % TEMPORARY? but so convenient!
+\RequirePackage{fontspec} %which itself depends on xkeyval
+\providecommand*{\xpg@warning}[1]{%
+ \PackageWarning{polyglossia}%
+ {#1}}
+\providecommand*{\xpg@info}[1]{%
+ \PackageInfo{polyglossia}%
+ {#1\@gobble}} %% the \@gobble is to prevent displaying the line nr
+\providecommand*{\xpg@nopatterns}[1]{%
+ \xpg@warning{No hyphenation patterns were loaded for `#1'\MessageBreak
+ I will use the patterns loaded for \string\language=0\MessageBreak instead}}
+\providecommand*{\xpg@nolang}[1]{%
+ \xpg@warning{Couldn't find file gloss-#1.ldf!}}%
+ %TODO try at least to load the hyphenation patterns for #1.
+\def\xpg@ill@value#1#2{%
+ \xpg@warning{Illegal value (#1) for #2}}
+
+\def\xpg@csifdef@warn#1{%
+ \ifcsundef{#1}{\PackageWarning{polyglossia}{ #1 is not defined}}%
+ {\expandafter\protect\csname #1\endcsname}}
+
+\def\xpg@csifdef#1{\ifcsundef{#1}{\relax}{\expandafter\protect\csname #1\endcsname}}
+
+
+\def\@@ensure@dir#1{\ifcsundef{@ensure@dir}{#1}{\@ensure@dir{#1}}}
+\def\@@ensure@maindir#1{\ifcsundef{@ensure@maindir}{#1}{\@ensure@maindir{#1}}}
+
+\def\opt@enabled{on}
+\def\opt@disabled{off}
+\define@key{polyglossia}{localmarks}[on]{%
+ \def\@tmpa{#1}
+ \ifx\@tmpa\opt@enabled
+ \def\local@marks##1{%
+ \def\markboth####1####2{%
+ \begingroup%
+ \let\label\relax \let\index\relax \let\glossary\relax%
+ \unrestored@protected@xdef\@themark%
+ {{\foreignlanguage{##1}{%
+ \protect\@@ensure@maindir{####1}}}%
+ {\foreignlanguage{##1}{%
+ \protect\@@ensure@maindir{####2}}}}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup%
+ \if@nobreak\ifvmode\nobreak\fi\fi}%
+ \def\markright####1{%
+ \begingroup%
+ \let\label\relax \let\index\relax \let\glossary\relax%
+ \expandafter\@markright\@themark%
+ {\foreignlanguage{##1}{\protect\@@ensure@maindir{####1}}}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup%
+ \if@nobreak\ifvmode\nobreak\fi\fi}%
+ \def\@markright####1####2####3{\@temptokena{\protect\@@ensure@maindir{####1}}%
+ \unrestored@protected@xdef\@themark{{\the\@temptokena}%
+ {{\protect\@@ensure@maindir{####3}}}}}}
+ \else\ifx\@tmpa\opt@disabled
+ \def\local@marks#1{}
+ \xpg@info{Option: localmarks=off}
+ \fi%
+ \fi%
+}
+\setkeys{polyglossia}{localmarks=on}
+
+%%TODO Use the etoolbox macros instead!
+%\def\oaddto#1#2{%
+% \ifx#1\@undefined
+% \def#1{#2}%
+% \else
+% \ifx#1\relax
+% \def#1{#2}%
+% \else
+% {\toks@\expandafter{#1#2}%
+% \xdef#1{\the\toks@}}%
+% \fi
+% \fi
+%}
+
+\newcommand{\setdefaultlanguage}[2][]{%
+ \IfFileExists{gloss-#2.ldf}%
+ {\ifcsundef{#2@loaded}% from etoolbox.sty
+ {\input{gloss-#2.ldf}%
+ \xpg@info{Default language is #2.}
+ \def\languagename{#2}%
+ % This is needed because \arabic is a built-in LaTeX command:
+ % so now we have \begin{Arabic}... instead of \begin{arabic}...
+ \edef\@tmpa{arabic}%
+ \edef\@tmpb{#2}%
+ \ifx\@tmpb\@tmpa%
+ \newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
+ {\end{otherlanguage}}%
+ \else%
+ \newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
+ {\end{otherlanguage}}%
+ \fi%
+ \expandafter\newcommand\csname text#2\endcsname[2][]{%
+ \ifcsdef{RL}%
+ {\ifcsundef{#2@RL}%
+ {\@ensure@LR{\foreignlanguage[####1]{#2}{####2}}}%
+ {\@ensure@RL{\foreignlanguage[####1]{#2}{####2}}}}%
+ {\foreignlanguage[####1]{#2}{####2}}%
+ }%
+ \csletcs{local#2}{text#2}%
+ \csgdef{#2@loaded}{}%
+ \gdef\xpg@main@language{#2}%
+ }%
+ {\PackageWarning{polyglossia}{gloss-#2.ldf is already loaded!}}%
+ %% The following settings are for the default language and script:
+ \ifcsundef{#2@RL}{}%
+ {\@rlmaintrue\@rl@footnotetrue%
+ \let\@@oddfoot\@oddfoot%
+ \let\@@evenfoot\@evenfoot%
+ \let\@oddfoot\@@evenfoot%
+ \let\@evenfoot\@@oddfoot%
+ \let\@@oddhead\@oddhead%
+ \let\@@evenhead\@evenhead%
+ \let\@oddhead\@@evenhead%
+ \let\@evenhead\@@oddhead%
+ }%
+ \AtBeginDocument{%
+ \selectlanguage[#1]{#2}%
+ \selectbackgroundlanguage{#2}}%
+ }%
+ %ELSE
+ {\xpg@nolang{#2}}}%
+
+\let\setmainlanguage=\setdefaultlanguage
+
+\newcommand{\resetdefaultlanguage}[2][]{%
+ \ifcsundef{#2@loaded}{%
+ \PackageError{polyglossia}{gloss-#2.ldf is not loaded!}}%
+ {\def\languagename{#2}%
+ \ifcsundef{#2@RL}{}{\@rlmaintrue\@rl@footnotetrue}%
+ \selectlanguage[#1]{#2}%
+ \selectbackgroundlanguage{#2}}}
+
+% This saves the normalfont for the latin script since we may change normalfont in other scripts
+\let\normalfontlatin=\normalfont%
+\let\rmfamilylatin=\rmfamily%
+\let\sffamilylatin=\sffamily%
+\let\ttfamilylatin=\ttfamily%
+
+\def\reset@latin@script{%
+ \let\rmfamily=\rmfamilylatin%
+ \let\sffamily=\sffamilylatin%
+ \let\ttfamily=\ttfamilylatin%
+ \normalfontlatin}
+
+\def\reset@LR{\xpg@csifdef{setLR}}
+
+\let\@@fterindentfalse\@afterindentfalse
+\def\french@indent{\let\@afterindentfalse\@afterindenttrue
+ \@afterindenttrue}
+\def\nofrench@indent{\let\@afterindentfalse\@@fterindentfalse
+ \@afterindentfalse}
+
+\newcommand{\selectbackgroundlanguage}[1]{%
+ \xpg@csifdef{selectnormalfont#1}%
+ \xpg@csifdef{#1@globalnumbers}%
+ }
+
+\newcommand{\setotherlanguage}[2][]{%
+ \IfFileExists{gloss-#2.ldf}%
+ {\ifcsundef{#2@loaded}%
+ {\input{gloss-#2.ldf}%
+ \setkeys{#2}{#1}%
+ \edef\@tmpa{arabic}%
+ \edef\@tmpb{#2}%
+ \ifx\@tmpb\@tmpa%
+ \newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
+ {\end{otherlanguage}}%
+ \else%
+ \newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
+ {\end{otherlanguage}}%
+ \fi%
+ \expandafter\newcommand\csname text#2\endcsname[2][]{%
+ \ifcsdef{RL}{%
+ \ifcsundef{#2@RL}%
+ {\@ensure@LR{\foreignlanguage[####1]{#2}{####2}}}%
+ {\@ensure@RL{\foreignlanguage[####1]{#2}{####2}}}%
+ }{% else
+ \foreignlanguage[####1]{#2}{####2}%
+ }}%
+ \csletcs{local#2}{text#2}%
+ \csgdef{#2@loaded}{}%
+ }%
+ {\PackageWarning{polyglossia}{gloss-#2.ldf is already loaded!}}%
+ }%
+ %ELSE
+ {\xpg@nolang{#2}}%
+ %TODO ? \expandafter\ifx\csname l@#2\endcsname\@undefined
+ %\xpg@nopatterns{#2}\expandafter\adddialect\csname l@#2\endcsname 0%
+ %\else\expandafter\expandafter\protect\language=\csname l@#2\endcsname\fi%
+}
+
+\newcommand\setotherlanguages[1]{%
+ \def\do##1{\setotherlanguage{##1}}%
+ \docsvlist{#1}}% from etoolbox.sty
+
+\def\common@language{%
+ \protect\language=0%
+ \lefthyphenmin=2\righthyphenmin=3}
+
+\def\noextrascurrent#1{\xpg@csifdef{noextras@#1}}
+
+\def\xpg@initial@setup{\ifcsundef{languagename}{}%
+ {\noextrascurrent{\languagename}}%
+ \common@language}
+
+\AtBeginDocument{\xpg@initial@setup}
+
+\ifcsundef{foreignlanguage}{}%
+ {\let\foreignlanguage\@undefined}
+
+\newcommand{\foreignlanguage}[3][]{%
+ \ifcsundef{#2@loaded}{\xpg@nolang{#2}}{%
+ {\def\languagename{#2}%
+ \setkeys{#2}{#1}%
+ \xpg@csifdef@warn{#2@font}%
+ \xpg@csifdef@warn{#2@language}%
+ \xpg@csifdef{date#2}%
+ \xpg@csifdef{#2@numbers}%
+ \use@localhyphenmins{#2}%
+ \xpg@csifdef{inlineextras@#2}%
+ #3}%
+}}
+
+\ifcsundef{selectlanguage}{}%
+ {\let\selectlanguage\@undefined}
+
+\newcommand{\selectlanguage}[2][]{%
+ \ifcsundef{#2@loaded}{\xpg@nolang{#2}}{%
+ \def\xpg@pop@language{%
+ \xpg@set@language{\languagename}%
+ \let\emp@langname\@undefined}%
+ \aftergroup\xpg@pop@language%
+ \setkeys{#2}{#1}%
+ \xpg@set@language{#2}%
+}}
+
+\newcommand{\xpg@set@language}[1]{%
+ \select@language{#1}%
+ \if@filesw%
+ \protected@write\@auxout{}{\protect\select@language{#1}}%
+ \addtocontents{toc}{\protect\select@language{#1}}%
+ \addtocontents{lof}{\protect\select@language{#1}}%
+ \addtocontents{lot}{\protect\select@language{#1}}%
+ \fi%
+}
+
+\ifcsundef{select@language}{}%
+ {\let\select@language\@undefined}
+
+\newcommand{\select@language}[1]{%
+ \xpg@initial@setup%
+ \edef\languagename{#1}%
+ \ifcsundef{RL}{}%
+ {\ifcsundef{#1@RL}{\setLR}{\setRL}}%
+ \xpg@csifdef@warn{#1@font}%
+ \xpg@csifdef@warn{#1@language}%
+ \use@localhyphenmins{#1}%
+ \xpg@csifdef{captions#1}%
+ \xpg@csifdef{date#1}%
+ \xpg@csifdef{#1@numbers}%
+ \local@marks{#1}%
+ \xpg@csifdef{blockextras@#1}%
+}
+
+\let\xpg@pop@language\relax
+
+\ifcsundef{otherlanguage}{}%
+ {\let\otherlanguage\@undefined}
+\ifcsundef{endotherlanguage}{}%
+ {\let\endotherlanguage\@undefined}
+
+\newenvironment{otherlanguage}[2][]{%
+ \selectlanguage[#1]{#2}%
+ }{}
+
+\newcommand{\setlocalhyphenmins}[3]{%
+ \providehyphenmins{#1}{#2#3}}
+
+\def\use@localhyphenmins#1{%
+ \ifcsundef{#1hyphenmins}{}%
+ {\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}}
+
+%% package options
+\DeclareOption{nolocalmarks}{\setkeys{polyglossia}{localmarks=off}}
+\DeclareOption{quiet}{%
+ \gdef\@latex@info#1{\relax}% no latex info
+ \gdef\@font@info#1{\relax}% no latex font info
+ \gdef\@font@warning#1{\relax}% no latex font warnings
+ \gdef\zf@PackageInfo#1{\relax}% no fontspec info
+ \gdef\xpg@info#1{\relax}}% no polyglossia info
+\DeclareOption{USenglish}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=american]{english}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=american]{english}}}%
+ \@temp}
+\DeclareOption{american}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=american]{english}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=american]{english}}}%
+ \@temp}
+\DeclareOption{UKenglish}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=british]{english}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=british]{english}}}%
+ \@temp}
+\DeclareOption{british}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=british]{english}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=british]{english}}}%
+ \@temp}
+\DeclareOption{australian}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=australian]{english}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=australian]{english}}}%
+ \@temp}
+\DeclareOption{newzealand}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=newzealand]{english}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=newzealand]{english}}}%
+ \@temp}
+\DeclareOption{ngerman}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[spelling=new]{german}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[spelling=new]{german}}}%
+ \@temp}
+\DeclareOption{polygreek}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=poly]{greek}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=poly]{greek}}}%
+ \@temp}
+\DeclareOption{monogreek}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=mono]{greek}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=mono]{greek}}}%
+ \@temp}
+\DeclareOption{ancientgreek}{%
+\ifcsundef{xpg@main@language}%
+ {\edef\@temp{\noexpand\setdefaultlanguage[variant=ancient]{greek}}}%
+ {\edef\@temp{\noexpand\setotherlanguage[variant=ancient]{greek}}}%
+ \@temp}
+%%% FIXME: this does not work when gloss-<option>.ldf contains a \RequirePackage command !!!
+%%% let's try with \AtEndOfPackage (not tested)
+\DeclareOption*{%
+\ifcsundef{xpg@main@language}%
+{\edef\@temp{\noexpand\setdefaultlanguage{\CurrentOption}}}%
+{\edef\@temp{\noexpand\setotherlanguage{\CurrentOption}}}%
+ \AtEndOfPackage{\@temp}}
+\ProcessOptions*
+%This is for compatibility with biblatex and perhaps other pkgs:
+\def\languageshorthands#1{\relax}
+\endinput
+