summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-31 00:32:53 +0000
committerKarl Berry <karl@freefriends.org>2008-07-31 00:32:53 +0000
commit3ebec47ec1910a7135f38c5f31b996882af238e4 (patch)
treee720f68daa2693630a8fe76a75bcdcb92a40333f /Master/texmf-dist/tex/xelatex/polyglossia
parent0afeedcaa724ef694a1e475f019ddb0472184acc (diff)
polyglossia update (30jul08)
git-svn-id: svn://tug.org/texlive/trunk@9918 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/polyglossia')
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf231
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf2
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf5
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf45
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf85
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf15
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty23
7 files changed, 340 insertions, 66 deletions
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf
new file mode 100644
index 00000000000..8aa6db34a2c
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf
@@ -0,0 +1,231 @@
+%% RENAME TO gloss-amharic.ldf
+\ProvidesFile{gloss-amharic.ldf}[polyglossia: module for amharic]
+\makeatletter
+
+\ifx\l@amharic\@undefined%
+ \xpg@nopatterns{Amharic}%
+ \adddialect\l@amharic0%
+\fi
+
+\def\captionsamharic{%
+ \def\refname{\textamharic{የነሥ ጹሁፍ ምንጭ}}%
+ \def\abstractname{\textamharic{አኅጽተሮ ጽሁፍ}}%
+ \def\bibname{\textamharic{ቢዋ መጽሃፍት}}%
+ \def\prefacename{\textamharic{መቅድም}}%
+ \def\chaptername{\textamharic{ክፍል}}%
+ \def\appendixname{\textamharic{መድበል}}%
+ \def\contentsname{\textamharic{ይዘት}}%
+ \def\listfigurename{\textamharic{የሥዕችሎ ማውጫ}}%
+ \def\listtablename{\textamharic{የሰንጠዥረ ማውጫ}}%
+ \def\indexname{\textamharic{ምህጻር ቃል}}%
+ \def\figurename{\textamharic{ሥዕል}}%
+ \def\tablename{\textamharic{ሰንጠረዥ}}%
+ %\def\thepart{\textamharic{}}%
+ \def\partname{\textamharic{ንዑስ ክፍል}}%
+ \def\pagename{\textamharic{ገጽ}}%
+ \def\seename{\textamharic{ይመልከቱ}}%
+ \def\alsoname{\textamharic{ይህምን ይመልከቱ}}%
+ \def\enclname{\textamharic{አባሪዎች}}%
+ \def\ccname{\textamharic{ግልባጭ}}%
+ \def\headtoname{\textamharic{ለ}}%
+ \def\proofname{\textamharic{ማረጋገጫ}}%
+ %\def\glossaryname{\textamharic{<++>}}%
+ }
+
+\newcommand{\eth@monthname}[1]{\ifcase#1\or
+ መስከረም\or
+ ጥቅምት\or
+ ህዳር\or
+ ታህሳስ\or
+ ጥር\or
+ የካቲት\or
+ መጋቢት\or
+ ሚያዝያ\or
+ ግንቦት\or
+ ሰኔ\or
+ ሐምሌ\or
+ ነሐሴ\or
+ ጰጉሜን\fi
+}
+\newcount\ethcnt@temp
+\newcount\ethcnt@modtemp
+\newcount\ethcnt@leap
+\newcount\ethcnt@yminone
+\newcount\ethcnt@days
+\newcount\ethcnt@jdn
+\newcount\ethcnt@cycle
+\newcount\ethcnt@ethdays
+\newcount\ethcnt@ethyear
+\newcount\ethcnt@ethmonth
+\newcount\ethcnt@ethday
+\newcommand{\eth@modulo}[2]{%
+ \ethcnt@modtemp=#1%
+ \divide\ethcnt@modtemp by #2%
+ \multiply\ethcnt@modtemp by #2%
+ \advance#1 by -\ethcnt@modtemp
+}
+\def\dateamharic{%
+ \def\today{{%
+ \ethcnt@yminone=\year
+ \advance\ethcnt@yminone by -1
+ \ethcnt@leap=\year
+ \divide\ethcnt@leap by 4
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 4
+ \advance\ethcnt@leap by -\ethcnt@temp
+ \ethcnt@temp=\year
+ \divide\ethcnt@temp by 100
+ \advance\ethcnt@leap by -\ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 100
+ \advance\ethcnt@leap by \ethcnt@temp
+ \ethcnt@temp=\year
+ \divide\ethcnt@temp by 400
+ \advance\ethcnt@leap by \ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 400
+ \advance\ethcnt@leap by -\ethcnt@temp
+ \ifnum\month<3
+ \ethcnt@days=\month
+ \advance\ethcnt@days by -1
+ \multiply\ethcnt@days by 31
+ \advance\ethcnt@days by \day
+ \advance\ethcnt@days by -1
+ \else
+ \ethcnt@days=\month
+ \advance\ethcnt@days by -1
+ \multiply\ethcnt@days by 30
+ \advance\ethcnt@days by \day
+ \advance\ethcnt@days by \ethcnt@leap
+ \advance\ethcnt@days by -3
+ \ethcnt@temp=\month
+ \multiply\ethcnt@temp by 3
+ \advance\ethcnt@temp by -2
+ \divide\ethcnt@temp by 5
+ \advance\ethcnt@days by \ethcnt@temp
+ \fi
+ \ethcnt@jdn=\ethcnt@days
+ \advance\ethcnt@jdn by 1721426
+ \ethcnt@temp=\ethcnt@yminone
+ \multiply\ethcnt@temp by 365
+ \advance\ethcnt@jdn by \ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 4
+ \advance\ethcnt@jdn by \ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 100
+ \advance\ethcnt@jdn by -\ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 400
+ \advance\ethcnt@jdn by \ethcnt@temp
+ \ethcnt@cycle=\ethcnt@jdn
+ \advance\ethcnt@cycle by -1723856
+ \eth@modulo{\ethcnt@cycle}{1461}%
+ \ethcnt@ethdays=\ethcnt@cycle
+ \eth@modulo{\ethcnt@ethdays}{365}%
+ \ethcnt@temp=\ethcnt@cycle
+ \divide\ethcnt@temp by 1460
+ \multiply\ethcnt@temp by 365
+ \advance\ethcnt@ethdays by \ethcnt@temp
+ \ethcnt@ethyear=\ethcnt@jdn
+ \advance\ethcnt@ethyear by -1723856
+ \divide\ethcnt@ethyear by 1461
+ \multiply\ethcnt@ethyear by 4
+ \ethcnt@temp=\ethcnt@cycle
+ \divide\ethcnt@temp by 365
+ \advance\ethcnt@ethyear by \ethcnt@temp
+ \divide\ethcnt@cycle by 1460
+ \advance\ethcnt@ethyear by -\ethcnt@cycle
+ \ethcnt@ethmonth=\ethcnt@ethdays
+ \divide\ethcnt@ethmonth by 30
+ \advance\ethcnt@ethmonth by 1
+ \ethcnt@ethday=\ethcnt@ethdays
+ \eth@modulo{\ethcnt@ethday}{30}%
+ \advance\ethcnt@ethday by 1%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \textamharic{%
+ \eth@monthname{\ethcnt@ethmonth}\relax\space%
+ \number\ethcnt@ethday\relax\space%
+ \number\ethcnt@ethyear}%
+ }}%
+}
+
+\def\ethiop#1{\expandafter\@ethiop\csname c@#1\endcsname}
+\def\@ethiop#1{{%
+ \ifnum#1<1\relax\ethnum@err{#1}%
+ \else\ifnum#1<10\relax\expandafter\ethnum@one\number #1%
+ \else\ifnum#1<100\relax\expandafter\ethnum@two\number #1%
+ \else\ifnum#1<1000\relax\expandafter\ethnum@three\number #1%
+ \else\ifnum#1<10000\relax\expandafter\ethnum@four\number #1%
+ \else\ifnum#1<100000\relax\expandafter\ethnum@five\number #1%
+ \else\ifnum#1<1000000\relax\expandafter\ethnum@six\number #1%
+ \else%
+ \ethnum@err%
+ \number#1%
+ \fi\fi\fi\fi\fi\fi\fi%
+}}
+\let\ethnum\@ethiop
+\newcommand{\ethnum@tens}[1]{%
+ \ifcase#1\or ፲\or ፳\or ፴%
+ \or ፵\or ፶\or ፷%
+ \or ፸\or ፹\or ፺\fi%
+}%
+\newcommand{\ethnum@one}[1]{%
+ \ifcase#1\or ፩\or ፪\or ፫%
+ \or ፬\or ፭\or ፮%
+ \or ፯\or ፰\or ፱\fi%
+}%
+\newcommand{\ethnum@two}[1]{%
+ \ethnum@tens#1%
+ \ethnum@one%
+}
+\newcommand{\ethnum@three}[1]{%
+ \ifnum#1>1\relax\ethnum@one#1\fi%
+ \ifnum#1>0\relax ፻\fi%
+ \ethnum@two%
+}
+\newcommand{\ethnum@four}[1]{%
+ \ethnum@tens#1%
+ \ifnum#1>0\relax ፻\fi%
+ \ethnum@three%
+}
+\newcommand{\ethnum@five}[1]{%
+ \ifnum#1>1\relax\ethnum@one#1\fi%
+ \ifnum#1>0\relax ፼\fi%
+ \ethnum@four%
+}
+\newcommand{\ethnum@six}[1]{%
+ \ethnum@tens#1%
+ \ifnum#1>0\relax ፼\fi%
+ \ethnum@five%
+}
+
+\def\amharic@font{%
+\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+\@ifundefined{amharicfont}{%
+ \@ifundefined{ethiopicfont}{%
+ \zf@check@ot@script{ethi}%
+ \if@tempswa%
+ \addfontfeature{Script=Ethiopic}%
+ \else%
+ \PackageError{polyglossia}{^^J
+ The current font does not contain the Ethiopic script!^^J
+ Please define \string\ethiopicfont\space or \string\amharicfont\space with \string\newfontfamily}%
+ \fi%
+ \zf@check@ot@lang{AMH}%
+ \if@tempswa\addfontfeature{Language=Amharic}\fi%
+ }%
+ {\ethiopicfont%
+ \zf@check@ot@lang{AMH}%
+ \if@tempswa\addfontfeature{Language=Amharic}\fi%
+ }}%
+ {\amharicfont}%
+}
+
+\def\selectnormalfontamharic{%
+ \let\normalfont=\amharic@font%
+ \def\reset@font{\normalfont}}
+
+\def\amharic@language{\protect\language=\l@amharic}
+
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf
index 6b9c82e0e44..6997b45bf15 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf
@@ -155,7 +155,7 @@
}
\def\abjadmaghribi#1{%
-\ifnum#1>1999 \xpg@ill@value{#1}{abjad}%
+\ifnum#1>1999\xpg@ill@value{#1}{abjad}%
\else
\ifnum#1<\z@\space\xpg@ill@value{#1}{abjad}%
\else
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
index 74b572a09f3..9815bb39a12 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
@@ -26,6 +26,7 @@
\fi
\def\tmp@us{us}
+\def\tmp@usmax{usmax}
\def\tmp@uk{uk}
\def\tmp@british{british}
\def\tmp@american{american}
@@ -44,11 +45,13 @@
\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@usmax\def\en@variant{usenglishmax}\@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=american (with additional patterns)}
\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}
+ \fi\fi\fi\fi\fi\fi}
\def\tmp@true{true}
\define@key{english}{ordinalmonthday}[false]{%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf
index ebe1c170140..19ded76cf14 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf
@@ -2,24 +2,44 @@
\makeatletter
\def\german@font{\normalfontlatin}
-\ifx\l@german\@undefined
- \xpg@nopatterns{german}
- \adddialect\l@german0
-\fi
-
-
-\def\tmp@new{new}
\def\tmp@old{old}
+\def\tmp@oldyr{1901}
+\newif\if@german@oldspelling
+\@german@oldspellingfalse
\define@key{german}{spelling}[new]{%
\def\@tmpa{#1}%
\ifx\@tmpa\tmp@old%
- \def\german@hyph{\l@german}%
+ \ifx\l@german\@undefined%
+ \xpg@nopatterns{german}%
+ \adddialect\l@german0%
+ \fi%
+ \@german@oldspellingtrue%
\else%
- \def\german@hyph{\l@ngerman}%
+ \ifx\@tmpa\tmp@oldyr%
+ \ifx\l@german\@undefined%
+ \xpg@nopatterns{german}%
+ \adddialect\l@german0%
+ \fi%
+ \@german@oldspellingtrue%
+ \else%
+ \ifx\l@ngerman\@undefined%
+ \ifx\l@german\@undefined%
+ \xpg@nopatterns{ngerman}%
+ \adddialect\l@ngerman0%
+ \else%
+ \xpg@warning{You asked for `ngerman' but only `german' hyphenation is available!}%
+ \@german@oldspellingtrue%
+ \fi%
+ \else%
+ \@german@oldspellingfalse
+ \fi%
+ \fi%
\fi%
}
-\setkeys{german}{spelling}
+\define@boolkey{german}[german@]{latesthyphen}[false]{}
+
+\setkeys{german}{spelling,latesthyphen}
\def\captionsgerman{%
\def\prefacename{\textgerman{Vorwort}}%
@@ -46,14 +66,15 @@
}
\def\dategerman{%
\def\today{\textgerman{\number\day.%
- \space \ifcase\month%
+ \space \ifcase\month%TODO add option for Austrian forms (Jänner etc)
\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}
+\def\german@language{\protect\language=%
+ \csname l@\if@german@oldspelling\else n\fi german\ifgerman@latesthyphen -x-latest\fi\endcsname}
\setlocalhyphenmins{german}{2}{2}%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf
index 57e312cd6f9..2b2ac6717f1 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf
@@ -1,5 +1,5 @@
\ProvidesFile{gloss-syriac.ldf}[polyglossia: module for syriac]
-\RequirePackage{bidi}
+\RequirePackage{bidi}[0.3]
\makeatletter
\ifx\l@syriac\@undefined
@@ -9,16 +9,22 @@
\def\syriac@RL{\relax}
+\def\syriacnumber#1{\@syriacnumber{#1}}%
\newif\if@eastern@numerals
\def\tmp@eastern{eastern}
+\def\tmp@abjad{abjad}
\define@key{syriac}{numerals}[western]{%
\def\@tmpa{#1}%
- \ifx\@tmpa\tmp@eastern%
- \@eastern@numeralstrue%
+ \ifx\@tmpa\tmp@abjad%
+ \let\syriacnumber\abjadsyriac%
\else%
- \@eastern@numeralsfalse%
- \fi}
+ \ifx\@tmpa\tmp@eastern%
+ \@eastern@numeralstrue%
+ \else%
+ \@eastern@numeralsfalse%
+ \fi%
+ \fi}
\setkeys{syriac}{numerals}
@@ -56,21 +62,20 @@
%\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\enclname{\@ensure@RL{}}%
+%\def\ccname{\@ensure@RL{}}%
+%\def\headtoname{\@ensure@RL{}}%
%\def\pagename{\@ensure@RL{}}%
-%\def\seename{\@ensure@RL{}}%\alefhamza\nun\za\ra
-%\def\alsoname{\@ensure@RL{}}%<<\alefhamza\nun\za\ra
+%\def\seename{\@ensure@RL{}}%
+%\def\alsoname{\@ensure@RL{}}%
%\def\proofname{\@ensure@RL{}}%
-%\def\glossaryname{\@ensure@RL{}}%<<
+%\def\glossaryname{\@ensure@RL{}}%
%}
\def\datesyriac{%
@@ -78,40 +83,52 @@
\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}}
+ \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>9999\xpg@ill@value{#1}{abjadsyriac}%
+\else%
+ \ifnum#1<\z@\space\xpg@ill@value{#1}{abjadsyriac}%
+ \else%
\ifnum#1<10\expandafter\abj@syr@num@i\number#1%
- \else
+ \else%
\ifnum#1<100\expandafter\abj@syr@num@ii\number#1%
- \else
- \expandafter\abj@syr@num@iii\number#1%
- \fi
- \fi
- \fi
-\fi
+ \else%
+ \ifnum#1<1000\expandafter\abj@syr@num@iii\number#1%
+ \else%
+ \expandafter\abj@syr@num@iv\number#1%
+ \fi%
+ \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
+ \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
+ \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
+ \ifcase#1\or\char"0729\or\char"072A\or\char"072B\or\char"072C%
+ \or\char"0722\char"0307\or\char"0723\char"0307\or\char"0725\char"0307%
+ \or\char"0726\char"0307\or\char"0728\char"0307\fi%
\ifnum#1=\z@\fi\abj@syr@num@ii}
+\def\abj@syr@num@iv#1{%
+ \ifcase#1\or\char"0710\char"0748\or\char"0712\char"0748%
+ \or\char"0713\char"0748\or\char"0715\char"0748%
+ \or\char"0717\char"0748\or\char"0718\char"0748%
+ \or\char"0719\char"0748\or\char"071A\char"0748\or\char"071B\char"0748\fi%
+ \ifnum#1=\z@\fi\abj@syr@num@iii}
-\def\syriacnumber#1{%
+\def\@syriacnumber#1{%
\if@eastern@numerals{%
\ifnum\XeTeXcharglyph"0661 > 0%
%%% we test for the presence of one of ١٢٣٤٥٦٧٨٩٠ in the Syriac font,
@@ -124,8 +141,8 @@
\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
+ \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}
@@ -135,7 +152,7 @@
\let\@arabic\syriacnumber%
\renewcommand\thefootnote{\protect\syriacnumber{\c@footnote}}%
}
-\def\nosyriac@globalnumbers{
+\def\nosyriac@globalnumbers{%
\let\@arabic\@latinarabic%
}
\def\syriac@numbers{%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf
index c456ccdb93d..aec440e0027 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf
@@ -1,4 +1,5 @@
\ProvidesFile{gloss-thai.ldf}[polyglossia: module for thai]
+\makeatletter
%% This is partly based on thai-latex for Babel:
%%%% Copyright (C) 1999 - 2006
%%%% by Surapant Meknavin,
@@ -8,12 +9,6 @@
%%%% 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}
@@ -84,10 +79,10 @@
\def\thai@numbers{%
\let\@latinalph\@alph%
\let\@latinAlph\@Alph%
- \if@thai@numerals
+ \if@thai@numerals%
\let\@alph\@thaialph%
\let\@Alph\@thaiAlph%
- \fi
+ \fi%
}
\def\nothai@numbers{%
\let\@alph\@latinalph%
@@ -125,9 +120,7 @@
\let\ttfamily=\thai@font%
\def\reset@font{\normalfont}}
-\def\thai@language{\protect\language=\l@thai}
-
-\setlocalhyphenmins{thai}{11}{11}%
+\def\thai@language{\protect\language=\l@nohyphenation}
\def\blockextras@thai{%
\renewcommand{\baselinestretch}{1.2}% FIXME restore default value in noextras?
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
index 1d3abc4c0aa..f2d3f762faa 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2008/07/11 v1.0
+\ProvidesPackage{polyglossia}[2008/07/26 v1.0.1
Babel replacement for XeLaTeX]
\RequirePackage{etoolbox} % TEMPORARY? but so convenient!
\RequirePackage{fontspec} %which itself depends on xkeyval
@@ -13,7 +13,8 @@
\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!}}%
+ \xpg@warning{File gloss-#1.ldf does not exist!^^J
+ I will nevertheless try to use hyphenation patterns for #1.}}%
%TODO try at least to load the hyphenation patterns for #1.
\def\xpg@ill@value#1#2{%
\xpg@warning{Illegal value (#1) for #2}}
@@ -126,7 +127,7 @@
\selectbackgroundlanguage{#2}}%
}%
%ELSE
- {\xpg@nolang{#2}}}%
+ {\xpg@nolang{#2}\hyphenrules{#2}}}%
\let\setmainlanguage=\setdefaultlanguage
@@ -191,7 +192,7 @@
{\PackageWarning{polyglossia}{gloss-#2.ldf is already loaded!}}%
}%
%ELSE
- {\xpg@nolang{#2}}%
+ {\xpg@nolang{#2}\hyphenrules{#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%
@@ -217,7 +218,7 @@
{\let\foreignlanguage\@undefined}
\newcommand{\foreignlanguage}[3][]{%
- \ifcsundef{#2@loaded}{\xpg@nolang{#2}}{%
+ \ifcsundef{#2@loaded}{\xpg@nolang{#2}\hyphenrules{#2}}{%
{\def\languagename{#2}%
\setkeys{#2}{#1}%
\xpg@csifdef@warn{#2@font}%
@@ -233,7 +234,7 @@
{\let\selectlanguage\@undefined}
\newcommand{\selectlanguage}[2][]{%
- \ifcsundef{#2@loaded}{\xpg@nolang{#2}}{%
+ \ifcsundef{#2@loaded}{\xpg@nolang{#2}\hyphenrules{#2}}{%
\def\xpg@pop@language{%
\xpg@set@language{\languagename}%
\let\emp@langname\@undefined}%
@@ -282,7 +283,15 @@
}{}
\newcommand{\setlocalhyphenmins}[3]{%
- \providehyphenmins{#1}{#2#3}}
+ \expandafter\ifx\csname l@#1\endcsname\relax%
+ \xpg@warning{\string\setlocalhyphenmin useless for unknown language #1}%
+ \else
+ \expandafter\ifx\csname l@#1\endcsname\l@nohyphenation%
+ \xpg@warning{\string\setlocalhyphenmin useless for unhyphenated language #1}%
+ \else%
+ \providehyphenmins{#1}{#2#3}%
+ \fi%
+ \fi}
\def\use@localhyphenmins#1{%
\ifcsundef{#1hyphenmins}{}%