summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-07 21:45:43 +0000
committerKarl Berry <karl@freefriends.org>2015-08-07 21:45:43 +0000
commita395e96459bb0e174924a5738ed16da58e86f1ee (patch)
treea09a124bed9726a15b115a9d6d59b54163698955 /Master/texmf-dist/tex
parent809a2782f6a6514f7689c13bdc1875a4fd388e5a (diff)
polyglossia (7aug15)
git-svn-id: svn://tug.org/texlive/trunk@38072 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/bengalidigits.sty13
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf53
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf157
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf3
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf28
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf25
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty2
8 files changed, 278 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/bengalidigits.sty b/Master/texmf-dist/tex/latex/polyglossia/bengalidigits.sty
new file mode 100644
index 00000000000..5e0603b37fb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/bengalidigits.sty
@@ -0,0 +1,13 @@
+\ProvidesPackage{bengalidigits}
+ [2015/05/25 v.01%
+ Formatting of Bengali digits]
+
+\def\bengalidigits#1{\expandafter\@bengali@digits #1@}
+\def\@bengali@digits#1{%
+ \ifx @#1% terminate
+ \else
+ \ifx0#1০\else\ifx1#1১\else\ifx2#1২\else\ifx3#1৩\else\ifx4#1৪\else\ifx5#1৫\else\ifx6#1৬\else\ifx7#1৭\else\ifx8#1৮\else\ifx9#1৯\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\@bengali@digits
+ \fi
+}
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
index 3934111a355..31587b0a433 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
@@ -9,6 +9,7 @@ the output is not guaranteed to be correct\MessageBreak
and may look very wrong.}
\fi
\RequirePackage{devanagaridigits}
+\RequirePackage{bengalidigits}
\PolyglossiaSetup{bengali}{
script=Bengali,
@@ -24,13 +25,53 @@ and may look very wrong.}
\def\tmp@western{Western}
\newif\ifbengali@devanagari@numerals
\bengali@devanagari@numeralstrue
+\def\tmp@bengali{Bengali}
+\newif\ifbengali@bengali@numerals
+\bengali@bengali@numeralsfalse % Implied, but you never know
+
\define@key{bengali}{numerals}[Devanagari]{%
\def\@tmpa{#1}%
\ifx\@tmpa\tmp@western
\bengali@devanagari@numeralsfalse
+ \else\ifx\@tmpa\tmp@bengali
+ \bengali@devanagari@numeralsfalse
+ \bengali@bengali@numeralstrue\fi
\fi}
+\def\extras@bengali{}
+\def\noextras@bengali{}
+
+\define@boolkey{bengali}[bengali@]{changecounternumbering}{
+ \def\@tmpa{#1}
+ \def\@tmptrue{true}
+ \ifx\@tmpa\@tmptrue
+ \def\extras@bengali{%
+ % FIXME Tied to the article class! And horrible coding style
+ \let\savethepage\thepage
+ \let\savethesection\thesection
+ \let\savethesubsection\thesubsection
+ \let\savethesubsubsection\thesubsubsection
+ \let\savetheparagraph\theparagraph
+ \let\savethesubparagraph\thesubparagraph
+ \def\thepage{\bengalinumeral{page}}
+ \def\thesection{\bengalinumeral{section}}
+ \def\thesubsection{\bengalinumeral{subsection}}
+ \def\thesubsubsection{\bengalinumeral{subsubsection}}
+ \def\theparagraph{\bengalinumeral{paragraph}}
+ \def\thesubparagraph{\bengalinumeral{subparagraph}}
+ }
+ \def\noextras@bengali{%
+ \let\thepage\savethepage
+ \let\thesection\savethesection
+ \let\thesubsection\savethesubsection
+ \let\thesubsubsection\savethesubsubsection
+ \let\theparagraph\savetheparagraph
+ \let\thesubparagraph\savethesubparagraph
+ }
+ \fi
+}
+
\def\captionsbengali{%
\def\refname{তথ্যসুত্রসমূহ}%
\def\abstractname{সারসংক্ষেপ}%
@@ -77,7 +118,17 @@ and may look very wrong.}
\ifbengali@devanagari@numerals
\devanagaridigits{\number#1}%
\else
- \number#1%
+ \ifbengali@bengali@numerals
+ \bengalidigits{\number#1}%
+ \else % Assumed Western
+ \number#1%
+ \fi
\fi}
+\def\bengalinumber#1{\bengalidigits{\number#1}}% Takes number
+\def\bengalinumeral#1{\bengalinumber{\csname c@#1\endcsname}}% Takes counter
+
+\def\blockextras@bengali{\extras@bengali}
+\def\inlineextras@bengali{\extras@bengali}
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
index 007b11ef5ec..9902892aad5 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
@@ -35,7 +35,7 @@
\xpg@info{Option: english variant=american}}%
{\ifstrequal{#1}{usmax}%
{\@british@hyphenfalse\english@ordinalmonthdayfalse
- \setkeys[xpg@setup]{english}{hyphennames={usenglishmax}}%
+ \ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={usenglishmax}}\fi
\xpg@info{Option: english variant=american (with additional patterns)}%
\ifcsundef{l@usenglishmax}%
{\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak
@@ -52,7 +52,7 @@
}}}}}}%
\if@british@locale\@british@hyphentrue\english@ordinalmonthdaytrue\fi
\if@british@hyphen
- \setkeys[xpg@setup]{english}{hyphennames={ukenglish,british,UKenglish}}%
+ \ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={ukenglish,british,UKenglish}}\fi
\ifcsundef{l@ukenglish}%
{\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak
I will use the patterns for US English instead}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf
new file mode 100644
index 00000000000..bb57f178a01
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf
@@ -0,0 +1,157 @@
+\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
+\PolyglossiaSetup{khmer}{
+ script=Khmer,%
+ scripttag=khmr,%
+ langtag=KHM,%
+ hyphennames={nohyphenation},%
+ fontsetup=true%
+}
+\newif\if@khmer@numerals
+\def\tmp@khmer{khmer}
+\define@key{khmer}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue%
+ \else\@khmer@numeralsfalse\fi%
+}
+\setkeys{khmer}{numerals}
+\def\captionskhmer{%
+ \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\pagename{ទំព័រ}%
+ \def\seename{មើល}%
+ \def\alsoname{មើលបន្ថែម}%
+ \def\enclname{ឯកសារភ្ជាប់}%
+ \def\ccname{ចម្លងជួន}%
+ \def\headtoname{ផ្ញើរទៅ}%
+ \def\proofname{សម្រាយ}%
+ \def\glossaryname{សទានុក្រម}%
+}
+\def\datekhmer{%
+ \def\khmer@month{%
+ \ifcase\month\or%
+ មករា\or%
+ កុម្ភៈ\or%
+ មិនា\or%
+ មេសា\or%
+ ឧសភា\or%
+ មិថុនា\or%
+ កក្កដា\or%
+ សីហា\or%
+ កញ្ញា\or%
+ តុលា\or%
+ វិច្ឆិកា\or%
+ ធ្នូ\fi}%
+ \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}%
+}
+\def\khmerdigits#1{\expandafter\@khmer@digits #1@}
+\def\@khmer@digits#1{%
+ \ifx @#1% then terminate
+ \else\ifx0#1០%
+ \else\ifx1#1១%
+ \else\ifx2#1២%
+ \else\ifx3#1៣%
+ \else\ifx4#1៤%
+ \else\ifx5#1៥%
+ \else\ifx6#1៦%
+ \else\ifx7#1៧%
+ \else\ifx8#1៨%
+ \else\ifx9#1៩%
+ \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\@khmer@digits%
+ \fi
+}
+\def\khmernumber#1{%
+ \if@khmer@numerals%
+ \khmerdigits{\number#1}%
+ \else%
+ \number#1%
+ \fi}
+\def\khmer@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\khmernumber%
+ \renewcommand{\thefootnote}{\protect\khmernumber{\c@footnote}}%
+}
+\def\nokhmer@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+}
+\def\thepart{\arabic{part}}
+\def\@khmeralph#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 អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname}
+\def\@khmerAlph#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 អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmer@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \if@khmer@numerals
+ \let\@alph\@khmeralph%
+ \let\@Alph\@khmerAlph%
+ \fi%
+}
+\def\nokhmer@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+\def\blockextras@khmer{%
+ \XeTeXlinebreaklocale "kh" %
+ \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt
+% \let\orig@baselinestretch\baselinestretch%
+% \renewcommand{\baselinestretch}{1.2}% not work
+}
+\def\noblockextras@khmer{%
+ \XeTeXlinebreaklocale "en"%
+% \let\baselinestretch\orig@baselinestretch%
+}
+\@ifclassloaded{beamer}{%
+ \usefonttheme{professionalfonts}%
+ \def\factname{ស្វ័យសត្យ}%
+ \def\lemmaname{បទគន្លិះ}%
+ \def\theoremname{ទ្រឹស្ដីបទ}%
+ \def\corollaryname{អនុសាធ្យ}%
+ \def\problemname{ចំណោទ}%
+ \def\solutionname{ដំណោះស្រាយ}%
+ \def\definitionname{និយមន័យ}%
+ \def\examplename{ឧទាហរណ៏}%
+ \uselanguage{khmer}%
+ \languagepath{khmer}%
+ \deftranslation[to=khmer]{Fact}{\factname}%
+ \deftranslation[to=khmer]{Lemma}{\lemmaname}%
+ \deftranslation[to=khmer]{Theorem}{\theoremname}%
+ \deftranslation[to=khmer]{Corollary}{\corollaryname}%
+ \deftranslation[to=khmer]{Problem}{\problemname}%
+ \deftranslation[to=khmer]{Solution}{\solutionname}%
+ \deftranslation[to=khmer]{Definition}{\definitionname}%
+ \deftranslation[to=khmer]{Definitions}{\definitionname}%
+ \deftranslation[to=khmer]{Example}{\examplename}%
+ \deftranslation[to=khmer]{Examples}{\examplename}%
+ \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
+ {\noexpand\headcommand{\noexpand\def\noexpand%
+ \inserttotalframenumber{\khmernumber{\the\c@framenumber}}}}}}%
+}{}
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
index fe2c1580bfc..13da4cbeafc 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
@@ -63,6 +63,7 @@
% set modern as default
\def\latin@variant{\l@latin}%
+\ifluatex\xpg@set@language@luatex@ii{latin}\fi
\def\captionslatin{\modernlatincaptions}%
\def\datelatin{\modernlatindate}%
\def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V}
@@ -75,6 +76,7 @@
\def\@tempa{#1}%
\ifx\@tempa\tmp@medieval
\def\latin@variant{\l@latin}%
+ \xpg@set@language@luatex@ii{latin}
\def\captionslatin{\medievallatincaptions}%
\def\datelatin{\classiclatindate}%
\classicuclccodes
@@ -95,6 +97,7 @@
\xpg@info{Option: Classic Latin}%
\else
\def\latin@variant{\l@latin}%
+ \xpg@set@language@luatex@ii{latin}
\def\captionslatin{\modernlatincaptions}%
\def\datelatin{\modernlatindate}%
\xpg@info{Option: Modern Latin}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
index ef527b16cb2..9c32311bd9e 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
@@ -6,6 +6,17 @@
fontsetup=true,
}
+\providebool{slovenian@localalph}
+\define@boolkey{slovenian}[slovenian@]{localalph}[false]{%
+ \def\@tmpa{#1}%
+ \def\@tmptrue{true}%
+ \ifx\@tmpa\@tmptrue
+ \slovenian@localalphtrue
+ \fi
+ \setlocalalph
+}
+
+
\def\captionsslovenian{%
\def\refname{Literatura}%
\def\abstractname{Povzetek}%
@@ -38,4 +49,21 @@
\space \number\year}%
}
+\def\slovenian@alph#1{%
+ \ifcase#1\or a\or b\or c\or č\or d\or e\or f\or g\or h\or i\or j\or k\or l\or
+ m\or n\or o\or p\or r\or s\or š\or t\or u\or v\or z\or ž\else#1\fi
+}
+\def\slovenian@Alph#1{%
+ \ifcase#1\or A\or B\or C\or Č\or D\or E\or F\or G\or H\or I\or J\or K\or L\or
+ M\or N\or O\or P\or R\or S\or Š\or T\or U\or V\or Z\or Ž\else#1\fi}
+\def\abeceda#1{\expandafter\slovenian@alph\csname c@#1\endcsname}
+\def\Abeceda#1{\expandafter\slovenian@Alph\csname c@#1\endcsname}
+
+\def\setlocalalph{%
+ \def\extras@slovenian{\let\savealph\alph\let\saveAlph\Alph\let\alph\abeceda\let\Alph\Abeceda}
+ \def\blockextras@slovenian{\extras@slovenian}
+ \def\inlineextras@slovenian{\extras@slovenian}
+ \def\noextras@slovenian{\let\alph\savealph\let\Alph\saveAlph}
+}
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
index d861308b2c7..dccb3137001 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
@@ -6,6 +6,15 @@
fontsetup=true,
}
+\providebool{welsh@formaldate}
+
+% TODO (maybe) Interface to change that mid-document
+\define@key{welsh}{date}{%
+ \ifstrequal{#1}{long}{%
+ \welsh@formaldatetrue
+ }% Anything else gives \welsh@formaldatefalse
+}
+
\def\captionswelsh{%
\def\refname{Cyfeiriadau}%
\def\abstractname{Crynodeb}%
@@ -26,18 +35,28 @@
\def\alsoname{gweler hefyd}%
\def\enclname{amgaeëdig}%
\def\ccname{copïau}%
- \def\headtoname{At}%
+ \def\headtoname{At}% ‘at’ on letters meaning ‘to (a person)’;
+ % ‘to (a place)’ is ‘i’ in Welsh
\def\proofname{Prawf}%
\def\glossaryname{Rhestr termau}%
}
\def\datewelsh{%
- \def\today{\ifnum\day=1\relax 1\/\textsuperscript{añ}\else
- \number\day\fi\space\ifcase\month\or
+ \def\today{\ifwelsh@formaldate\formaltoday\else\standardtoday\fi}
+ \def\standardtoday{%
+ \ifcase\day\or 1af\or 2ail\or 3ydd\or 4ydd\or 5ed\or 6ed%
+ \or 7fed\or 8fed\or 9fed\or 10fed\or 11eg\or 12fed\or 13eg\or
+ 14eg\or 15fed\or 16eg\or 17eg\or 18fed\or 19eg\or
+ 20fed\else\number\day ain\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\formaltoday{%
+ \space\ifcase\day\or y\space cyntaf\or yr\space ail\or y\space trydydd\or y\space pedwerydd\or
+ y\space pumed\or y\space chweched\or y\space seithfed\or yr\space wythfed\or y\space nawfed\or y\space degfed\or yr\space unfed ar ddeg\or y\space deuddegfed\or y\space trydydd ar ddeg\or y\space pedwerydd ar ddeg\or y\space pymthegfed\or yr\space unfed ar bymtheg\or yr\space ail ar bymtheg\or y\space deunawfed\or y\space pedwerydd ar bymtheg\or yr\space ugeinfed\or yr\space unfed ar hugain\or yr\space ail ar hugain\or y\space trydydd ar hugain\or y\space pedwerydd ar hugain\or y\space pumed ar hugain\or y\space chweched ar hugain\or y\space seithfed ar hugain\or yr\space wythfed ar hugain\or y\space nawfed ar hugain\or y\space degfed ar hugain\or yr\space unfed ar ddeg ar hugain\fi\space o\space\ifcase\month\or Ionawr\or Chwefror\or Fawrth\or Ebrill\or Fai\or Fehefin\or Orffenaf\or Awst\or Fedi\or Hydref\or Dachwedd\or Ragfyr\fi
+ \space\number\year}%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 57101f4adf6..8d7f77e692b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2015/07/14 v1.40.1
+\ProvidesPackage{polyglossia}[2015/08/06 v1.42.0
Alternative to Babel for XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}