summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-29 22:37:53 +0000
committerKarl Berry <karl@freefriends.org>2020-01-29 22:37:53 +0000
commit015c5f064b14e4a79f151b46a6dd46b150520c81 (patch)
treecc3434d0ae73900950b37bc952816286d4d76d5c /Master/texmf-dist/tex/latex
parente9549ffe43d42fda4e5d3778e1d26fbd95e4ae9f (diff)
polyglossia (29jan20)
git-svn-id: svn://tug.org/texlive/trunk@53592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/farsical.sty6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-aeb.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-af.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-afb.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-afrikaans.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-am.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-apd.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-IQ.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-JO.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-LB.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-MR.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-PS.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-SY.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar-YE.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ar.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf26
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-arq.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ary.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-arz.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ast.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-austrian.ldf2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ayl.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bahasa.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-be-tarask.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-be.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf95
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf89
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bg.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bn.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bo.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bosnian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-br.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-british.ldf2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bs.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ca.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-canadien.ldf2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf47
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Arab.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Latn.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ckb.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-cop.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf141
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-cy.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-cz.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf19
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-da.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1901.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1996.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1901.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1996.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1901.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1996.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1901.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1996.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1901.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1996.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1901.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1996.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-de.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-dsb.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-dv.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-el-monoton.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-el-polyton.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-el.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-en-AU.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-en-CA.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-en-GB.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-en-NZ.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-en-US.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-en.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf38
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-eo.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-es-ES.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-es-MX.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-es.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-et.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-eu.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fa.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fi.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CA.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CH.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fr-FR.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fr.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf94
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-friulian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-fur.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ga.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf11
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-gd.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-georgian.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf115
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-gl.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-grc.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf20
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-he.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf33
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hi.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf10
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hr.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hsb.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hu.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf141
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hy.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ia.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-id.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-is.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-it.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ja.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf78
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ka.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf1
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-km.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Arab.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Latn.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kmr.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kn.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ko.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf257
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Arab.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Latn.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ku.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf43
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kurmanji.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-classic.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-ecclesia.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-medieval.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-la.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf164
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lo.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lt.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lv.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-macedonian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf15
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf127
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-mk.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ml.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-mn.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf82
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-mr.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-nb.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-nko.ldf2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf14
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf5
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-persian.ldf28
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf3
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf16
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf3
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf95
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf50
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf98
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf19
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf38
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf11
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf15
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf38
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf7
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf231
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf23
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia-french.lua1
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia-korean.lua19
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia-latin.lua36
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia-punct.lua78
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia-sanskrit.lua28
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty522
206 files changed, 3220 insertions, 815 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/farsical.sty b/Master/texmf-dist/tex/latex/polyglossia/farsical.sty
index 7c715c82471..862a806cc24 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/farsical.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/farsical.sty
@@ -1,5 +1,5 @@
\ProvidesPackage{farsical}
- [2008/07/02 v0.1 %
+ [2019/12/12 v0.2 %
Farsi (jalali) calendar]
\ifluatex\RequirePackage{luabidi}\else\RequirePackage{bidi}\fi
\RequirePackage{calc,arabicnumbers}
@@ -197,7 +197,7 @@
\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 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/latex/polyglossia/gloss-aeb.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-aeb.ldf
new file mode 100644
index 00000000000..3148830da51
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-aeb.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-aeb.ldf}[polyglossia: module for aeb (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-af.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-af.ldf
new file mode 100644
index 00000000000..681ef83507d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-af.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-af.ldf}[polyglossia: module for af (afrikaans)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{afrikaans}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-afb.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-afb.ldf
new file mode 100644
index 00000000000..4624d19d1ac
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-afb.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-afb.ldf}[polyglossia: module for afb (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-afrikaans.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-afrikaans.ldf
index 76b0bd1a58f..545ecd34292 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-afrikaans.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-afrikaans.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-afrikaans.ldf}[polyglossia: module for afrikaans]
\PolyglossiaSetup{afrikaans}{
+ bcp47=af,
hyphennames={afrikaans,dutch},
hyphenmins={2,2},
langtag=AFK,
@@ -8,8 +9,14 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{afrikaans}{af}
+
\define@boolkey{afrikaans}[afrikaans@]{babelshorthands}[true]{}
+% Register default options
+\xpg@initialize@gloss@options{afrikaans}{babelshorthands=false}
+
\ifsystem@babelshorthands
\setkeys{afrikaans}{babelshorthands=true}
\else
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
index 617bdca2755..fdc720bc001 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-albanian.ldf}[polyglossia: module for albanian]
\PolyglossiaSetup{albanian}{
+ bcp47=sq,
hyphennames={albanian},
langtag=SQI,
hyphenmins={2,2},
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{albanian}{sq}
+
\def\captionsalbanian{%
\def\refname{Referencat}%
\def\abstractname{Përmbledhja}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-am.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-am.ldf
new file mode 100644
index 00000000000..60b5f54d061
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-am.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-am.ldf}[polyglossia: module for am (amharic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{amharic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
index 9a33de9fb90..14fca7f35ca 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-amharic.ldf}[polyglossia: module for amharic]
\PolyglossiaSetup{amharic}{
+ bcp47=am,
script=Ethiopic,
scripttag=ethi,
langtag=AMH,
@@ -9,6 +10,9 @@
%TODO localalph=ethnum
}
+% BCP-47 compliant aliases
+\setlanguagealias*{amharic}{am}
+
\def\captionsamharic{%
\def\refname{የነሥ ጹሁፍ ምንጭ}%
\def\abstractname{አኅጽተሮ ጽሁፍ}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-apd.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-apd.ldf
new file mode 100644
index 00000000000..f828ac234cc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-apd.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-apd.ldf}[polyglossia: module for apd (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-IQ.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-IQ.ldf
new file mode 100644
index 00000000000..d0982b16bbf
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-IQ.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-IQ.ldf}[polyglossia: module for ar-IQ (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-JO.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-JO.ldf
new file mode 100644
index 00000000000..ed09424bf49
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-JO.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-JO.ldf}[polyglossia: module for ar-JO (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-LB.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-LB.ldf
new file mode 100644
index 00000000000..f7edef6ed87
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-LB.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-LB.ldf}[polyglossia: module for ar-LB (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-MR.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-MR.ldf
new file mode 100644
index 00000000000..2b3a50e66ab
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-MR.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-MR.ldf}[polyglossia: module for ar-MR (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-PS.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-PS.ldf
new file mode 100644
index 00000000000..b93863f9d40
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-PS.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-PS.ldf}[polyglossia: module for ar-PS (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-SY.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-SY.ldf
new file mode 100644
index 00000000000..ac4a8bd8ac7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-SY.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-SY.ldf}[polyglossia: module for ar-SY (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-YE.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-YE.ldf
new file mode 100644
index 00000000000..df33b749538
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar-YE.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar-YE.ldf}[polyglossia: module for ar-YE (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ar.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar.ldf
new file mode 100644
index 00000000000..f86a520af9e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ar.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ar.ldf}[polyglossia: module for ar (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf
index a00d3c777dd..6cd68bdb7f6 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf
@@ -10,6 +10,7 @@ and may look very wrong.}
\RequirePackage{hijrical}
\PolyglossiaSetup{arabic}{
+ bcp47=ar,
script=Arabic,
direction=RL,
langtag=ARA,
@@ -21,6 +22,23 @@ and may look very wrong.}
%TODO localalph={abjad,abjad}
}
+% BCP-47 compliant aliases
+\setlanguagealias*{arabic}{ar}
+\setlanguagealias*[locale=mashriq]{arabic}{ar-IQ}
+\setlanguagealias*[locale=default]{arabic}{ar-YE}
+\setlanguagealias*[locale=mashriq]{arabic}{ar-LB}
+\setlanguagealias*[locale=mashriq]{arabic}{ar-JO}
+\setlanguagealias*[locale=default]{arabic}{afb}
+\setlanguagealias*[locale=mauritania]{arabic}{ar-MR}
+\setlanguagealias*[locale=default]{arabic}{arz}
+\setlanguagealias*[locale=morocco]{arabic}{ary}
+\setlanguagealias*[locale=algeria]{arabic}{arq}
+\setlanguagealias*[locale=tunisia]{arabic}{aeb}
+\setlanguagealias*[locale=mashriq]{arabic}{ar-SY}
+\setlanguagealias*[locale=libya]{arabic}{ayl}
+\setlanguagealias*[locale=default]{arabic}{apd}
+\setlanguagealias*[locale=mashriq]{arabic}{ar-PS}
+
\newif\ifeastern@numerals
\def\tmp@mashriq{mashriq}
\def\tmp@maghrib{maghrib}
@@ -47,9 +65,11 @@ and may look very wrong.}
\def\@tmpa{#1}%
\ifx\@tmpa\tmp@morocco%
\eastern@numeralsfalse%
+ \SetLanguageKeys{arabic}{bcp47=ary}%
\else
\ifx\@tmpa\tmp@algeria%
\eastern@numeralsfalse%
+ \SetLanguageKeys{arabic}{bcp47=arq}%
\fi%
\fi%
\gdef\@@arabic@month{\@arabic@month{#1}}}
@@ -69,8 +89,10 @@ and may look very wrong.}
\define@key{arabic}{hijricorrection}[0]{%
\gdef\@hijri@correction{#1}}%
-% This should set the defaults
-\setkeys{arabic}{locale,calendar,numerals,hijricorrection,abjadjimnotail=false}
+% Register default options
+\xpg@initialize@gloss@options{arabic}{locale=default,calendar=gregorian,numerals=mashriq,hijricorrection=0,abjadjimnotail=false}
+% Register alias options
+\xpg@set@alias@values{arabic}{calendar}{islamic}{hijri}
\def\arabicgregmonth@default#1{\ifcase#1%
% Egypt, Sudan, Yemen and Golf states
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
index b645a3af818..add8aa5cb30 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-armenian.ldf}[polyglossia: module for armenian]
\PolyglossiaSetup{armenian}{
+ bcp47=hy,
script=Armenian,
scripttag=armn,
langtag=HYE,
@@ -10,6 +11,9 @@
localnumeral=armeniannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{armenian}{hy}
+
\newif\if@eastern@armenian
\@eastern@armenianfalse
\define@choicekey*+{armenian}{variant}[\val\nr]{western,eastern}[western]{%
@@ -29,6 +33,9 @@
\ifstrequal{#1}{arabic}{\@armenian@numeralsfalse}{\@armenian@numeralstrue}%
}
+% Register default options
+\xpg@initialize@gloss@options{armenian}{numerals=armenian,variant=western}
+
% Taken from ArmTeX. Audit!
\def\captionsarmenian{%
\def\refname{Հղումներ}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-arq.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-arq.ldf
new file mode 100644
index 00000000000..bff535e088e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-arq.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-arq.ldf}[polyglossia: module for arq (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ary.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ary.ldf
new file mode 100644
index 00000000000..495efac6c56
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ary.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ary.ldf}[polyglossia: module for ary (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-arz.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-arz.ldf
new file mode 100644
index 00000000000..051b4ccd50d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-arz.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-arz.ldf}[polyglossia: module for arz (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ast.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ast.ldf
new file mode 100644
index 00000000000..4d83cf6e45a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ast.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ast.ldf}[polyglossia: module for ast (asturian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{asturian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf
index 5c21fde3175..0cdec249b4b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf
@@ -3,6 +3,7 @@
%
\ProvidesFile{gloss-asturian.ldf}[polyglossia: module for asturian]
\PolyglossiaSetup{asturian}{
+ bcp47=ast,
hyphennames={asturian,catalan},
hyphenmins={2,2},
langtag=AST,
@@ -11,6 +12,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{asturian}{ast}
+
\def\captionsasturian{%
\def\prefacename{Entamu}%
\def\refname{Referencies}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-austrian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-austrian.ldf
index 87d89848742..816c0ee220b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-austrian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-austrian.ldf
@@ -1,4 +1,4 @@
-\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for austrian german (old spelling)]
+\ProvidesFile{gloss-austrian.ldf}[polyglossia: module for austrian german (old spelling)]
% We provide this as a babel alias
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ayl.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ayl.ldf
new file mode 100644
index 00000000000..26a4d41544b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ayl.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ayl.ldf}[polyglossia: module for ayl (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasa.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasa.ldf
index 7e897526982..43b65c656ea 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasa.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasa.ldf
@@ -1,7 +1,7 @@
-\ProvidesFile{gloss-kurmanji.ldf}[polyglossia: module for kurmanji kurdish]
+\ProvidesFile{gloss-bahasa.ldf}[polyglossia: module for bahasa indonesia]
% We provide this as a babel alias
-\xpg@load@master@language{kurdish}
+\xpg@load@master@language{malay}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf
index 16ee1d3b909..d11fbe857b1 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-basque.ldf}[polyglossia: module for basque]
\PolyglossiaSetup{basque}{
+ bcp47=eu,
hyphennames={basque},
hyphenmins={2,2},
langtag=EUQ,
@@ -7,6 +8,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{basque}{eu}
+
\def\captionsbasque{%
\def\refname{Erreferentziak}%
\def\abstractname{Laburpena}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-be-tarask.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-be-tarask.ldf
new file mode 100644
index 00000000000..5ec8cd3e89c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-be-tarask.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-be-tarask.ldf}[polyglossia: module for be-tarask (belarusian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{belarusian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-be.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-be.ldf
new file mode 100644
index 00000000000..0c144cced1b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-be.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-be.ldf}[polyglossia: module for be (belarusian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{belarusian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf
index c02dc9b3bc6..f6c78ad7595 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf
@@ -3,6 +3,7 @@
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{belarusian}{
+ bcp47=be,
script=Cyrillic,
scripttag=cyrl,
langtag=BEL,
@@ -14,30 +15,56 @@
Localnumeral=Belarusiannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*[spelling=classic]{belarusian}{be-tarask}
+\setlanguagealias*{belarusian}{be}
+
\def\belarusian@spelling{modern}
\define@choicekey*+{belarusian}{spelling}[\val\nr]{modern,classic,tarask}[modern]{%
\ifcase\nr\relax
% modern:
- \def\belarusian@spelling{modern}
+ \def\belarusian@spelling{modern}%
+ \SetLanguageKeys{belarusian}{bcp47=be}%
\or
% classic:
- \def\belarusian@spelling{tarask}
+ \def\belarusian@spelling{tarask}%
+ \SetLanguageKeys{belarusian}{bcp47=be-tarask}%
\or
% tarask:
- \def\belarusian@spelling{tarask}
+ \def\belarusian@spelling{tarask}%
+ \SetLanguageKeys{belarusian}{bcp47=be-tarask}%
\fi
}{\xpg@warning{Unknown Belarusian spelling `#1'}}
\newif\ifcyrillic@numerals
-\define@key{belarusian}{numerals}[arabic]{%
- \ifstrequal{#1}{cyrillic}%
- {\cyrillic@numeralstrue}%
- {\cyrillic@numeralsfalse}%
-}
+\newif\ifcyrillic@asbuk@numerals
+\define@choicekey*+{belarusian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\nr\relax
+ % arabic:
+ \cyrillic@numeralsfalse%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-trad:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-alph:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralstrue%
+ \fi
+ \xpg@info{Option: Belarusian, numerals=\val}%
+}{\xpg@warning{Unknown Belarusian numerals value `#1'}}
-\define@boolkey{belarusian}[belarusian@]{babelshorthands}[false]{}
+\define@boolkey{belarusian}[belarusian@]{babelshorthands}[true]{}
-\setkeys{belarusian}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{belarusian}{babelshorthands=false,numerals=arabic,spelling=modern}
+% Register alias options
+\xpg@set@alias@values{belarusian}{spelling}{classic}{tarask}
\ifsystem@babelshorthands
\setkeys{belarusian}{babelshorthands=true}
@@ -202,7 +229,11 @@
\def\belarusiannumber#1{%
\ifcyrillic@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \belarusian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -210,7 +241,11 @@
\def\Belarusiannumber#1{%
\ifcyrillic@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \belarusian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -219,24 +254,30 @@
\let\belarusiannumeral=\belarusiannumber
\let\Belarusiannumeral=\Belarusiannumber
-\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\Asbuk#1{\expandafter\belarusian@asbuk@Alph\csname c@#1\endcsname}
+\def\asbuk#1{\expandafter\belarusian@asbuk@alph\csname c@#1\endcsname}
+
+\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname}
-\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname}
% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
-% thus ends at 30. We now use proper cyrillic numbering.
-
-%\def\belarusian@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}{belarusian@Alph}\fi}
-
-%\def\belarusian@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}{belarusian@alph}\fi}
+% thus ends at 30.
+\def\belarusian@asbuk@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}{belarusian@asbuk@Alph}\fi%
+}
+
+\def\belarusian@asbuk@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}{belarusian@asbuk@alph}\fi%
+}
\def\belarusian@numbers{%
\let\latin@alph\@alph
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
index 3b2226be3b5..802a7db00b1 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
@@ -2,16 +2,19 @@
% TODO implement Bengali calendar
\ProvidesFile{gloss-bengali.ldf}[polyglossia: module for bengali]
+
\ifluatex
\xpg@warning{Bengali is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
+ I will proceed with the compilation, but\MessageBreak
+ the output is not guaranteed to be correct\MessageBreak
+ and may look very wrong.}
\fi
+
\RequirePackage{devanagaridigits}
\RequirePackage{bengalidigits}
\PolyglossiaSetup{bengali}{
+ bcp47=bn,
script=Bengali,
scripttag=beng,
langtag=BEN,
@@ -22,55 +25,35 @@ and may look very wrong.}
%TODO nouppercase=true,
}
-\def\tmp@western{Western}
+% BCP-47 compliant aliases
+\setlanguagealias*{bengali}{bn}
+
\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}
+\define@choicekey*+{bengali}{numerals}[\val\nr]{Devanagari,Bengali,Western}[Devanagari]{%
+ \ifcase\nr\relax
+ % Devanagari:
+ \bengali@bengali@numeralsfalse%
+ \bengali@devanagari@numeralstrue%
+ \or
+ % Bengali:
+ \bengali@bengali@numeralstrue%
+ \bengali@devanagari@numeralsfalse%
+ \or
+ % Western:
+ \bengali@bengali@numeralsfalse%
+ \bengali@devanagari@numeralsfalse%
+ \fi
+ \xpg@info{Option: Bengali, numerals=\val}%
+}{\xpg@warning{Unknown Bengali numeral `#1'}}
\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
-}
+\define@boolkey{bengali}[bengali@]{changecounternumbering}[true]{}
+
+% Register default options
+\xpg@initialize@gloss@options{bengali}{changecounternumbering=false,numerals=Devanagari}
\def\captionsbengali{%
\def\refname{তথ্যসূত্রসমূহ}%
@@ -125,13 +108,19 @@ and may look very wrong.}
\else % Assumed Western
\number#1%
\fi
- \fi}
+ \fi%
+}
-\def\bengalinumeral#1{\expandafter\bengalinumber\expandafter{\the##1}}% Takes counter
+% Backwards compatibility. This command was never documented, but
+% some people might use it nevertheless (see #381).
+% This takes a counter.
+\newcommand\bengalinumeral[1]{\localnumeral*[lang=bengali]{#1}}
\def\bengali@globalnumbers{%
- \let\@arabic\bengalinumber%
- \renewcommand\thefootnote{\localnumeral*{footnote}}%
+ \ifbengali@changecounternumbering
+ \let\@arabic\bengalinumber%
+ \renewcommand\thefootnote{\localnumeral*{footnote}}%
+ \fi
}
% Store original definition
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bg.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bg.ldf
new file mode 100644
index 00000000000..3a60349b213
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bg.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-bg.ldf}[polyglossia: module for bg (bulgarian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{bulgarian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bn.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bn.ldf
new file mode 100644
index 00000000000..d61dcb54245
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bn.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-bn.ldf}[polyglossia: module for bn (bengali)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{bengali}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bo.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bo.ldf
new file mode 100644
index 00000000000..45bc3080f56
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bo.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-bo.ldf}[polyglossia: module for bo (tibetan)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{tibetan}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bosnian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bosnian.ldf
index 187bb3e65f9..e533f8c439b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-bosnian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bosnian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-bosnian.ldf}[polyglossia: module for bosnian]
\PolyglossiaSetup{bosnian}{
+ bcp47=bs,
langtag=BOS,
hyphennames={bosnian,croatian},
hyphenmins={2,2}, % adapted from gloss-croatian
@@ -9,6 +10,9 @@
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{bosnian}{bs}
+
% TODO: Add script=Cyrillic
% from babel-bosnian
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-br.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-br.ldf
new file mode 100644
index 00000000000..6b87c846698
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-br.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-br.ldf}[polyglossia: module for br (breton)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{breton}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf
index a3d1eee2a12..de859428fb9 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-breton.ldf}[polyglossia: module for breton]
\PolyglossiaSetup{breton}{
+ bcp47=br,
hyphennames={breton},
hyphenmins={2,2},
langtag=BRE,
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{breton}{br}
+
\ifluatex
% TODO
\else
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-british.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-british.ldf
index e598d02edcf..5aa113d6efc 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-british.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-british.ldf
@@ -1,4 +1,4 @@
-\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for british english]
+\ProvidesFile{gloss-british.ldf}[polyglossia: module for british english]
% We provide this as a babel alias
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bs.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bs.ldf
new file mode 100644
index 00000000000..c7f14b64aea
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bs.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-bs.ldf}[polyglossia: module for bs (bosnian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{bosnian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf
index 8f8aef1b727..bb30dd1c6ab 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-bulgarian.ldf}[polyglossia: module for bulgarian]
\PolyglossiaSetup{bulgarian}{
+ bcp47=bg,
script=Cyrillic,
scripttag=cyrl,
langtag=BGR,
@@ -10,6 +11,9 @@
%TODO localalph=bulgarian@alph
}
+% BCP-47 compliant aliases
+\setlanguagealias*{bulgarian}{bg}
+
\def\bulgarian@Alph#1{%
\ifcase#1\or
А\or Б\or В\or Г\or Д\or Е\or Ж\or
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ca.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ca.ldf
new file mode 100644
index 00000000000..9e9768c120a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ca.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ca.ldf}[polyglossia: module for ca (catalan)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{catalan}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-canadien.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-canadien.ldf
index 02f9e44a888..afe4ccd80f1 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-canadien.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-canadien.ldf
@@ -1,4 +1,4 @@
-\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for canadian french]
+\ProvidesFile{gloss-canadien.ldf}[polyglossia: module for canadian french]
% We provide this as a babel alias
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
index 6dbd8df9130..a2a5d7c420f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan]
\PolyglossiaSetup{catalan}{
+ bcp47=ca,
hyphennames={catalan},
hyphenmins={2,2},
langtag=CAT,
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{catalan}{ca}
+
\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
\ifsystem@babelshorthands
\setkeys{catalan}{babelshorthands=true}
@@ -15,6 +19,9 @@
\setkeys{catalan}{babelshorthands=false}
\fi
+% Register default options
+\xpg@initialize@gloss@options{catalan}{babelshorthands=false}
+
\ifcsundef{initiate@active@char}{%
\input{babelsh.def}%
\initiate@active@char{"}%
@@ -23,33 +30,21 @@
%%% adapted from Babel's catalan.ldf
\newdimen\leftllkern \newdimen\rightllkern \newdimen\raiselldim
+
% we check if char · exists, and use it instead of raised dot:
\def\xpg@raiseddot{%
- \ifluatex %
- \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\hbox{\char"00B7}%
- \else\raise\raiselldim\hbox{.}%
- \fi %
- \else %
- \ifnum\XeTeXcharglyph"00B7 > 0\hbox{\char"00B7}% why a hbox here?
- \else\raise\raiselldim\hbox{.}%
- \fi %
- \fi %
- }
+ \charifavailable{00B7}{\raise\raiselldim\hbox{.}}%
+}
+
\def\lgem{%
\ifmmode
\csname normal@char\string"\endcsname l%
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
\setbox0\hbox{l}\setbox1\hbox{l\/}%
- \ifluatex %
- \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\setbox2\hbox{\char"00B7}%
- \else\setbox2\hbox{.}%
- \fi %
- \else %
- \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}%
- \else\setbox2\hbox{.}%
- \fi %
- \fi %
+ \xpg@if@char@available{00B7}%
+ {\setbox2\hbox{\char"00B7}}%
+ {\setbox2\hbox{.}}%
\advance\raiselldim by \the\fontdimen5\the\font
\advance\raiselldim by -\ht2%
\leftllkern=-.25\wd0%
@@ -63,21 +58,16 @@
\kern\rightllkern\hbox{l}}\allowhyphens
\fi
}
+
\def\Lgem{%
\ifmmode
\csname normal@char\string"\endcsname L%
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
\setbox0\hbox{L}\setbox1\hbox{L\/}%
- \ifluatex %
- \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\setbox2\hbox{\char"00B7}%
- \else\setbox2\hbox{.}%
- \fi %
- \else %
- \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}%
- \else\setbox2\hbox{.}%
- \fi %
- \fi %
+ \xpg@if@char@available{00B7}%
+ {\setbox2\hbox{\char"00B7}}%
+ {\setbox2\hbox{.}}%
\advance\raiselldim by .5\ht0%
\advance\raiselldim by -.5\ht2%
\leftllkern=-.125\wd0%
@@ -92,6 +82,7 @@
\kern\rightllkern\hbox{L}}\allowhyphens
\fi
}
+
\AtBeginDocument{%
\let\lslash\l
\let\Lslash\L
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Arab.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Arab.ldf
new file mode 100644
index 00000000000..2f3321d71c4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Arab.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ckb-Arab.ldf}[polyglossia: module for ckb-Arab (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Latn.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Latn.ldf
new file mode 100644
index 00000000000..ab59c00e670
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb-Latn.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ckb-Latn.ldf}[polyglossia: module for ckb-Latn (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb.ldf
new file mode 100644
index 00000000000..104c4e4ec74
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ckb.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ckb.ldf}[polyglossia: module for ckb (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-cop.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-cop.ldf
new file mode 100644
index 00000000000..94859cec3ef
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-cop.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-cop.ldf}[polyglossia: module for cop (coptic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{coptic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf
index 76a4fb151a5..455b9faaf59 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-coptic.ldf}[polyglossia: module for coptic]
\PolyglossiaSetup{coptic}{
+ bcp47=cop,
script=Coptic,
scripttag=copt,
langtag=COP,
@@ -8,6 +9,9 @@
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{coptic}{cop}
+
%\def\captionscoptic{%
% \def\refname{<++>}%
% \def\abstractname{<++>}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
index 50574e1ddd0..1d7fe73f9b5 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-croatian.ldf}[polyglossia: module for croatian]
\PolyglossiaSetup{croatian}{
+ bcp47=hr,
langtag=HRV,
hyphennames={croatian},
hyphenmins={2,2}, % aligned with https://ctan.org/pkg/hrhyph patterns and http://lebesgue.math.hr/~nenad/Diplomski/Maja_Ribaric_2011.pdf
@@ -8,12 +9,134 @@
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{croatian}{hr}
+
+\define@boolkey{croatian}[croatian@]{babelshorthands}[true]{}
+
+\define@boolkey{croatian}[croatian@]{disableligatures}[true]{}
+
+% Register default options
+\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disableligatures=false}
+
+\ifsystem@babelshorthands
+ \setkeys{croatian}{babelshorthands=true}
+\else
+ \setkeys{croatian}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+ \input{babelsh.def}%
+ \initiate@active@char{"}%
+ \shorthandoff{"}%
+}{}
+
+\def\croatian@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{croatian}%
+ \declare@shorthand{croatian}{"=}{\penalty\@M-\hskip\z@skip}%
+ \declare@shorthand{croatian}{""}{\hskip\z@skip}%
+ \declare@shorthand{croatian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{croatian}{"-}{\nobreak\-\bbl@allowhyphens}%
+ \declare@shorthand{croatian}{"|}{%
+ \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
+ \bbl@allowhyphens}{}%
+ }%
+ \declare@shorthand{croatian}{"/}{\textormath
+ {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}}%
+ \declare@shorthand{croatian}{"`}{„}%
+ \declare@shorthand{croatian}{"'}{”}%
+ \declare@shorthand{croatian}{"<}{«}%
+ \declare@shorthand{croatian}{">}{»}%
+ \declare@shorthand{croatian}{"D}{\xpg@hr@lig{D}}%
+ \declare@shorthand{croatian}{"d}{\xpg@hr@lig{d}}%
+ \declare@shorthand{croatian}{"L}{\xpg@hr@lig{L}}%
+ \declare@shorthand{croatian}{"l}{\xpg@hr@lig{l}}%
+ \declare@shorthand{croatian}{"N}{\xpg@hr@lig{N}}%
+ \declare@shorthand{croatian}{"n}{\xpg@hr@lig{n}}%
+}
+
+\def\nocroatian@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+
+\newcommand*\hr@charifavailable[2]{%
+ \ifcroatian@disableligatures
+ \bgroup#2\egroup%
+ \else
+ \charifavailable{#1}{#2}%
+ \fi%
+}
+
+% Provide croatian ligatures if available in current font
+\def\xpg@hr@lig#1#2{%
+ \bgroup%
+ % 1. DŽ, Dž and dž
+ \ifx#1D%
+ \ifx#2Z\relax%
+ \hr@charifavailable{01C4}{DŽ}%
+ \else%
+ \ifx#2z\relax
+ \hr@charifavailable{01C5}{Dž}%
+ \else
+ D#2%
+ \fi%
+ \fi%
+ \fi%
+ \ifx#1d%
+ \ifx#2z\relax
+ \hr@charifavailable{01C6}{dž}%
+ \else
+ d#2%
+ \fi%
+ \fi%
+ % 2. LJ, Lj and lj
+ \ifx#1L%
+ \ifx#2J\relax%
+ \hr@charifavailable{01C7}{LJ}%
+ \else%
+ \ifx#2j\relax
+ \hr@charifavailable{01C8}{Lj}%
+ \else
+ L#2%
+ \fi%
+ \fi%
+ \fi%
+ \ifx#1l%
+ \ifx#2j\relax
+ \hr@charifavailable{01C9}{lj}%
+ \else
+ l#2%
+ \fi%
+ \fi%
+ % 2. NJ, Nj and nj
+ \ifx#1N%
+ \ifx#2J\relax%
+ \hr@charifavailable{01CA}{NJ}%
+ \else%
+ \ifx#2j\relax
+ \hr@charifavailable{01CB}{Nj}%
+ \else
+ N#2%
+ \fi%
+ \fi%
+ \fi%
+ \ifx#1n%
+ \ifx#2j\relax
+ \hr@charifavailable{01CC}{nj}%
+ \else
+ n#2%
+ \fi%
+ \fi%
+ \egroup%
+}
+
\def\captionscroatian{%
\def\prefacename{Predgovor}%
\def\refname{Literatura}%
\def\abstractname{Sažetak}%
\def\bibname{Bibliografija}%
- \def\chaptername{Poglavlje}%
+ \def\chaptername{Poglav\hr@charifavailable{01C9}{lj}e}%
\def\appendixname{Dodatak}%
\def\contentsname{Sadržaj}%
\def\listfigurename{Popis slika}%
@@ -31,10 +154,24 @@
\def\proofname{Dokaz}%
\def\glossaryname{Pojmovnik}%
}
+
\def\datecroatian{%
\def\today{\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 studenoga\or
- prosinca\fi \space \number\year.}}
+ prosinca\fi \space \number\year.}%
+}
+
+\def\noextras@croatian{%
+ \nocroatian@shorthands%
+}
+
+\def\blockextras@croatian{%
+ \ifcroatian@babelshorthands\croatian@shorthands\fi%
+}
+
+\def\inlineextras@croatian{%
+ \ifcroatian@babelshorthands\croatian@shorthands\fi%
+}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-cy.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-cy.ldf
new file mode 100644
index 00000000000..0032d39ccda
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-cy.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-cy.ldf}[polyglossia: module for cy (welsh)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{welsh}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-cz.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-cz.ldf
new file mode 100644
index 00000000000..aa0b681bed2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-cz.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-cz.ldf}[polyglossia: module for cz (czech)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{czech}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf
index 1205da7870b..afa8ef435c9 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-czech.ldf}[polyglossia: module for czech]
\PolyglossiaSetup{czech}{
+ bcp47=cz,
hyphennames={czech},
hyphenmins={2,2},
langtag=CSY,
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{czech}{cz}
+
\ifluatex
\RequirePackage{luavlna}
\fi
@@ -18,7 +22,8 @@
\define@boolkey{czech}[czech@]{vlna}[true]{}
-\setkeys{czech}{splithyphens,vlna}
+% Register default options
+\xpg@initialize@gloss@options{czech}{babelshorthands=false,splithyphens=true,vlna=true}
\ifsystem@babelshorthands
\setkeys{czech}{babelshorthands=true}
@@ -33,8 +38,12 @@
}{}
\def\cs@@splithyphen#1{%
- \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
- \nobreak\hskip\z@%
+ \ifnum\hyphenchar \font>0%
+ \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
+ \nobreak\hskip\z@%
+ \else%
+ #1%
+ \fi%
}
\def\cs@splithyphen{%
@@ -212,13 +221,13 @@
\def\blockextras@czech{%
\ifczech@babelshorthands\czech@shorthands\fi%
\ifczech@vlna\czech@vlna\else\noczech@vlna\fi%
- \ifczech@splithyphens\czech@hyphens\else\noczech@hyhens\fi%
+ \ifczech@splithyphens\czech@hyphens\else\noczech@hyphens\fi%
}
\def\inlineextras@czech{%
\ifczech@babelshorthands\czech@shorthands\fi%
\ifczech@vlna\czech@vlna\else\noczech@vlna\fi%
- \ifczech@splithyphens\czech@hyphens\else\noczech@hyhens\fi%
+ \ifczech@splithyphens\czech@hyphens\else\noczech@hyphens\fi%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-da.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-da.ldf
new file mode 100644
index 00000000000..b4bdb898a3a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-da.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-da.ldf}[polyglossia: module for da (danish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{danish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf
index 2de0ae89278..a4356d67c1f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-danish.ldf}[polyglossia: module for danish]
\PolyglossiaSetup{danish}{
+ bcp47=da,
hyphennames={danish},
hyphenmins={2,3},
langtag=DAN,
@@ -7,6 +8,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{danish}{da}
+
\def\captionsdanish{%
\def\prefacename{Forord}%
\def\refname{Litteratur}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1901.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1901.ldf
new file mode 100644
index 00000000000..023d14760e1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1901.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-AT-1901.ldf}[polyglossia: module for de-AT-1901 (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1996.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1996.ldf
new file mode 100644
index 00000000000..f1ec1091f45
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT-1996.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-AT-1996.ldf}[polyglossia: module for de-AT-1996 (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT.ldf
new file mode 100644
index 00000000000..6cd9e5f2c0d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-AT.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-AT.ldf}[polyglossia: module for de-AT (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1901.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1901.ldf
new file mode 100644
index 00000000000..f5f75b90927
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1901.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-CH-1901.ldf}[polyglossia: module for de-CH-1901 (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1996.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1996.ldf
new file mode 100644
index 00000000000..ca782509210
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH-1996.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-CH-1996.ldf}[polyglossia: module for de-CH-1996 (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH.ldf
new file mode 100644
index 00000000000..3b53a24534e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-CH.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-CH.ldf}[polyglossia: module for de-CH (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1901.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1901.ldf
new file mode 100644
index 00000000000..280712a0135
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1901.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-DE-1901.ldf}[polyglossia: module for de-DE-1901 (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1996.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1996.ldf
new file mode 100644
index 00000000000..eb47982699e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE-1996.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-DE-1996.ldf}[polyglossia: module for de-DE-1996 (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE.ldf
new file mode 100644
index 00000000000..5d18658335f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-DE.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-DE.ldf}[polyglossia: module for de-DE (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1901.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1901.ldf
new file mode 100644
index 00000000000..8494e0aab09
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1901.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-AT-1901-Latf.ldf}[polyglossia: module for de-AT-1901-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1996.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1996.ldf
new file mode 100644
index 00000000000..1fc174cafc9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT-1996.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-AT-1996-Latf.ldf}[polyglossia: module for de-AT-1996-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT.ldf
new file mode 100644
index 00000000000..905d2e318fe
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-AT.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-AT-Latf.ldf}[polyglossia: module for de-AT-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1901.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1901.ldf
new file mode 100644
index 00000000000..dbbd4467be8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1901.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-CH-1901-Latf.ldf}[polyglossia: module for de-CH-1901-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1996.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1996.ldf
new file mode 100644
index 00000000000..afd8626169b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH-1996.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-CH-1996-Latf.ldf}[polyglossia: module for de-CH-1996-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH.ldf
new file mode 100644
index 00000000000..971936554c8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-CH.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-CH-Latf.ldf}[polyglossia: module for de-CH-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1901.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1901.ldf
new file mode 100644
index 00000000000..abd6b680356
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1901.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-DE-1901-Latf.ldf}[polyglossia: module for de-DE-1901-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1996.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1996.ldf
new file mode 100644
index 00000000000..73ff933a11c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE-1996.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-DE-1996-Latf.ldf}[polyglossia: module for de-DE-1996-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE.ldf
new file mode 100644
index 00000000000..0ff7361cf54
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf-DE.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-DE-Latf.ldf}[polyglossia: module for de-DE-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf.ldf
new file mode 100644
index 00000000000..13e6e30fad4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de-Latf.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de-Latf.ldf}[polyglossia: module for de-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-de.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-de.ldf
new file mode 100644
index 00000000000..98462d1b878
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-de.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-de.ldf}[polyglossia: module for de (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf
index ad5dc56bd4d..188e5bae6ff 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf
@@ -7,6 +7,7 @@ and may look very wrong.}
\fi
\RequireBidi
\PolyglossiaSetup{divehi}{
+ bcp47=dv,
script=Thaana,
scripttag=thaa,
langtag=DIV,% TODO Support DHV as well?
@@ -15,6 +16,9 @@ and may look very wrong.}
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{divehi}{dv}
+
%\def\captionsdivehi{%
% \def\refname{<++>}%
% \def\abstractname{<++>}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-dsb.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-dsb.ldf
new file mode 100644
index 00000000000..cf89f6426a8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-dsb.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-dsb.ldf}[polyglossia: module for dsb (sorbian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{sorbian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf
index 5bbefc5dc85..1ec5c0e2889 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-dutch.ldf}[polyglossia: module for dutch]
\PolyglossiaSetup{dutch}{
+ bcp47=nl,
hyphennames={dutch},
hyphenmins={2,2},
langtag=NLD,
@@ -7,8 +8,14 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{dutch}{nl}
+
\define@boolkey{dutch}[dutch@]{babelshorthands}[true]{}
+% Register default options
+\xpg@initialize@gloss@options{dutch}{babelshorthands=false}
+
\ifsystem@babelshorthands
\setkeys{dutch}{babelshorthands=true}
\else
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-dv.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-dv.ldf
new file mode 100644
index 00000000000..08b2551920d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-dv.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-dv.ldf}[polyglossia: module for dv (divehi)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{divehi}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-el-monoton.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-el-monoton.ldf
new file mode 100644
index 00000000000..cfbf599f25c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-el-monoton.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-el-monoton.ldf}[polyglossia: module for el-monoton (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-el-polyton.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-el-polyton.ldf
new file mode 100644
index 00000000000..b5c1d44a75a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-el-polyton.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-el-polyton.ldf}[polyglossia: module for el-polyton (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-el.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-el.ldf
new file mode 100644
index 00000000000..6f40887f82e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-el.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-el.ldf}[polyglossia: module for el (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-en-AU.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-AU.ldf
new file mode 100644
index 00000000000..a48dbf4b521
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-AU.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-en-AU.ldf}[polyglossia: module for en-AU (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-en-CA.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-CA.ldf
new file mode 100644
index 00000000000..ba7402ebd85
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-CA.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-en-CA.ldf}[polyglossia: module for en-CA (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-en-GB.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-GB.ldf
new file mode 100644
index 00000000000..b90683b034c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-GB.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-en-GB.ldf}[polyglossia: module for en-GB (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-en-NZ.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-NZ.ldf
new file mode 100644
index 00000000000..a458157925a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-NZ.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-en-NZ.ldf}[polyglossia: module for en-NZ (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-en-US.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-US.ldf
new file mode 100644
index 00000000000..4ed4b6f30e2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-en-US.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-en-US.ldf}[polyglossia: module for en-US (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-en.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-en.ldf
new file mode 100644
index 00000000000..4884583ca8f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-en.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-en.ldf}[polyglossia: module for en (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
index 626209d8800..5e5db8a2f46 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
@@ -1,12 +1,21 @@
\ProvidesFile{gloss-english.ldf}[polyglossia: module for english]
\PolyglossiaSetup{english}{
+ bcp47=en-US,
hyphennames={english,american,usenglish,USenglish},
hyphenmins={2,3},
langtag=ENG,
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{english}{en}
+\setlanguagealias*[variant=australian]{english}{en-AU}
+\setlanguagealias*[variant=newzealand]{english}{en-NZ}
+\setlanguagealias*[variant=us]{english}{en-US}
+\setlanguagealias*[variant=british]{english}{en-GB}
+\setlanguagealias*[variant=canadian]{english}{en-CA}
+
% Babel aliases
\setlanguagealias[variant=us]{english}{american}
\setlanguagealias[variant=australian]{english}{australian}
@@ -28,41 +37,41 @@
% Option ordinalmonthday
\define@boolkey{english}[english@]{ordinalmonthday}[true]{}
-\define@choicekey*+{english}{variant}[\val\nr]{uk,british,us,american,usmax,australian,newzealand,canadian}{%
+\define@choicekey*+{english}{variant}[\val\nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
\ifcase\nr\relax
% uk:
\british@hyphentrue
\british@dateformattrue
\english@ordinalmonthdaytrue
- \SetLanguageKeys{english}{babelname=british}%
+ \SetLanguageKeys{english}{babelname=british,bcp47=en-GB}%
\xpg@info{Option: English, variant=british}%
\or
% british:
\british@hyphentrue
\british@dateformattrue
\english@ordinalmonthdaytrue
- \SetLanguageKeys{english}{babelname=british}%
+ \SetLanguageKeys{english}{babelname=british,bcp47=en-GB}%
\xpg@info{Option: english variant=british}%
\or
% us:
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
- \SetLanguageKeys{english}{babelname=american}%
+ \SetLanguageKeys{english}{babelname=american,bcp47=en-US}%
\xpg@info{Option: English, variant=american}%
\or
% american:
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
- \SetLanguageKeys{english}{babelname=american}%
+ \SetLanguageKeys{english}{babelname=american,bcp47=en-US}%
\xpg@info{Option: English, variant=american}%
\or
% usmax:
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
- \SetLanguageKeys{english}{babelname=american}%
+ \SetLanguageKeys{english}{babelname=american,bcp47=en-US}%
\xpg@info{Option: english variant=american (with additional patterns)}%
\xpg@ifdefined{usenglishmax}{}%
{\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak
@@ -77,8 +86,9 @@
\british@hyphentrue
\british@dateformattrue
\english@ordinalmonthdayfalse
- \SetLanguageKeys{english}{babelname=australian}%
+ \SetLanguageKeys{english}{babelname=australian,bcp47=en-AU}%
\xpg@info{Option: English, variant=australian}%
+ \adddialect\l@australian\l@english%
\or
% newzealand:
% These use the british hyphenation patterns
@@ -86,16 +96,18 @@
\british@hyphentrue
\british@dateformattrue
\english@ordinalmonthdayfalse
- \SetLanguageKeys{english}{babelname=newzealand}%
+ \SetLanguageKeys{english}{babelname=newzealand,bcp47=en-NZ}%
\xpg@info{Option: English, variant=newzealand}%
+ \adddialect\l@newzealand\l@english%
\or
% canadian:
% This is currently equivalent to usenglish (as in babel)
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
- \SetLanguageKeys{english}{babelname=canadian}%
+ \SetLanguageKeys{english}{babelname=canadian,bcp47=en-CA}%
\xpg@info{Option: English, variant=american}%
+ \adddialect\l@canadian\l@english%
\fi
\ifbritish@hyphen
\xpg@ifdefined{ukenglish}{}%
@@ -107,6 +119,12 @@
\fi
}{\xpg@warning{Unknown English variant `#1'}}
+% Register default options
+\xpg@initialize@gloss@options{english}{variant=us,ordinalmonthday=false}
+% Register alias options
+\xpg@set@alias@values{english}{variant}{us}{american}
+\xpg@set@alias@values{english}{variant}{uk}{british}
+
\ifxetex
% Check if \l@english is defined. If not, try to set it to some variety
% (specific order as in the csv list below), or null language if everything fails
@@ -126,7 +144,7 @@
\fi
\def\english@language{%
- \polyglossia@setup@language@patterns{\english@variant}
+ \polyglossia@setup@language@patterns{\english@variant}%
}%
\def\captionsenglish{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-eo.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-eo.ldf
new file mode 100644
index 00000000000..3d77ba69bb1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-eo.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-eo.ldf}[polyglossia: module for eo (esperanto)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{esperanto}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-es-ES.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-es-ES.ldf
new file mode 100644
index 00000000000..114160582a6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-es-ES.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-es-ES.ldf}[polyglossia: module for es-ES (spanish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{spanish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-es-MX.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-es-MX.ldf
new file mode 100644
index 00000000000..389d3bf748a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-es-MX.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-es-MX.ldf}[polyglossia: module for es-MX (spanish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{spanish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-es.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-es.ldf
new file mode 100644
index 00000000000..b00dccaaf68
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-es.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-es.ldf}[polyglossia: module for es (spanish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{spanish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf
index f3a6bf09911..f7f344dc555 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-esperanto.ldf}[polyglossia: module for esperanto]
\PolyglossiaSetup{esperanto}{
+ bcp47=eo,
hyphennames={esperanto},
hyphenmins={2,2},
langtag=NTO,
@@ -7,6 +8,9 @@
%TODO localalph={esperanto@alph,esperanto@Alph}
}
+% BCP-47 compliant aliases
+\setlanguagealias*{esperanto}{eo}
+
\def\captionsesperanto{%
\def\refname{Citaĵoj}%
\def\abstractname{Resumo}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf
index f8df426a94f..2649fb2cd47 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-estonian.ldf}[polyglossia: module for estonian]
\PolyglossiaSetup{estonian}{
+ bcp47=et,
hyphennames={estonian},
hyphenmins={2,2},
langtag=ETI,
@@ -7,6 +8,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{estonian}{et}
+
\def\captionsestonian{%
\def\refname{Viited}%
\def\abstractname{Kokkuvõte}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-et.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-et.ldf
new file mode 100644
index 00000000000..cfa8de251f6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-et.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-et.ldf}[polyglossia: module for et (estonian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{estonian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-eu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-eu.ldf
new file mode 100644
index 00000000000..7482d21a2e0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-eu.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-eu.ldf}[polyglossia: module for eu (basque)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{basque}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fa.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fa.ldf
new file mode 100644
index 00000000000..531a3a2ea49
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fa.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fa.ldf}[polyglossia: module for fa (persian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{persian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fi.ldf
new file mode 100644
index 00000000000..c9fd02b9f72
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fi.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fi.ldf}[polyglossia: module for fi (finnish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{finnish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf
index e0c884f9664..d59a7eaf52e 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-finnish.ldf}[polyglossia: module for finnish]
\PolyglossiaSetup{finnish}{
+ bcp47=fi,
hyphennames={finnish},
hyphenmins={2,2},
langtag=FIN,
@@ -7,8 +8,14 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{finnish}{fi}
+
\define@boolkey{finnish}[finnish@]{babelshorthands}[true]{}
+% Register default options
+\xpg@initialize@gloss@options{finnish}{babelshorthands=false}
+
\ifsystem@babelshorthands
\setkeys{finnish}{babelshorthands=true}
\else
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CA.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CA.ldf
new file mode 100644
index 00000000000..5e278bbedc7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CA.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fr-CA.ldf}[polyglossia: module for fr-CA (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CH.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CH.ldf
new file mode 100644
index 00000000000..763afe344be
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-CH.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fr-CH.ldf}[polyglossia: module for fr-CH (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-FR.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-FR.ldf
new file mode 100644
index 00000000000..c787a45aa4a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr-FR.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fr-FR.ldf}[polyglossia: module for fr-FR (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fr.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr.ldf
new file mode 100644
index 00000000000..2a2caa22fe0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fr.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fr.ldf}[polyglossia: module for fr (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
index 57ec25f48e5..43040b0c70b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]
\PolyglossiaSetup{french}{%
+ bcp47=fr-FR,
language=French,
script=Latin,
langtag=FRA,
@@ -10,46 +11,63 @@
hyphenmins={2,2},
fontsetup=true}
+% BCP-47 compliant aliases
+\setlanguagealias*{french}{fr}
+\setlanguagealias*[variant=french]{french}{fr-FR}
+\setlanguagealias*[variant=canadian]{french}{fr-CA}
+\setlanguagealias*[variant=swiss]{french}{fr-CH}
+
% Babel aliases
\setlanguagealias[variant=acadian]{french}{acadien}
\setlanguagealias[variant=canadian]{french}{canadien}
\def\french@variant{french}
-\define@choicekey*+{french}{variant}[\val\nr]{french,canadian,acadian}[french]{%
+\define@choicekey*+{french}{variant}[\val\nr]{french,canadian,acadian,swiss}[french]{%
\ifcase\nr\relax
% french:
\def\french@variant{french}%
+ \SetLanguageKeys{french}{babelname=french,bcp47=fr-FR}%
+ \french@thincolonspacefalse
\or
% canadian:
\def\french@variant{canadien}%
- \SetLanguageKeys{french}{babelname=canadien}%
+ \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA}%
\xpg@ifdefined{canadien}{}%
{\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak
I will use the standard patterns for French instead}%
\adddialect\l@canadien\l@french\relax}%
+ \french@thincolonspacefalse
\or
% acadian:
\def\french@variant{acadian}%
- \SetLanguageKeys{french}{babelname=canadien}%
+ \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA}%
\xpg@ifdefined{acadian}{}%
{\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak
I will use the standard patterns for French instead}%
\adddialect\l@acadian\l@french\relax}%
+ \french@thincolonspacefalse
+ \or
+ % swiss:
+ \def\french@variant{swissfrench}%
+ \SetLanguageKeys{french}{babelname=french,bcp47=fr-CH}%
+ \adddialect\l@swissfrench\l@french\relax%
+ \french@thincolonspacetrue
\fi
\xpg@info{Option: French, variant=\val}%
}{\xpg@warning{Unknown French variant `#1'}}
\def\french@language{%
- \polyglossia@setup@language@patterns{\french@variant}
+ \polyglossia@setup@language@patterns{\french@variant}%
}%
\ifluatex
\directlua{require('polyglossia-french')}%
\else
- \newXeTeXintercharclass\french@openbrackets % ( ] {
- \newXeTeXintercharclass\french@closebrackets % ( ] {
- \newXeTeXintercharclass\french@punctthin % ! ? ; et autres
+ \newXeTeXintercharclass\french@openbrackets % ( [ {
+ \newXeTeXintercharclass\french@closebrackets % ) ] }
+ \newXeTeXintercharclass\french@questionexclamation % ! ? et autres
+ \newXeTeXintercharclass\french@punctthin % ; (et :)
\newXeTeXintercharclass\french@punctthick % :
\newXeTeXintercharclass\french@punctguillstart % « ‹
\newXeTeXintercharclass\french@punctguillend % » ›
@@ -62,9 +80,9 @@
\define@boolkey{french}[french@]{frenchfootnote}[true]{%
\AfterPreamble{%
- \ifdefstring{\xpg@main@language}{french}{%
- \iffrench@frenchfootnote
- \ifx\@makefntext\undefined\else
+ \iffrench@frenchfootnote
+ \ifdefstring{\xpg@main@language}{french}{%
+ \ifx\@makefntext\undefined\else
\long\def\french@makefntext##1{%
\parindent1em \noindent\quad%
\ifx\@thefnmark\empty\else%
@@ -72,10 +90,10 @@
}
\let\@makefntext\french@makefntext
\fi
- \else
- \let\@makefntext\xpg@orig@makefntext
- \fi
- }{\xpg@warning{Option 'frenchfootnote' only supported if French is main language!}}%
+ }{\xpg@warning{Option 'frenchfootnote' only supported if French is main language!}}%
+ \else
+ \let\@makefntext\xpg@orig@makefntext
+ \fi
}%
}
@@ -147,19 +165,28 @@
\define@boolkey{french}[french@]{frenchitemlabels}[true]{%
\AfterPreamble{%
- \ifdefstring{\xpg@main@language}{french}{%
- \iffrench@frenchitemlabels
+ \iffrench@frenchitemlabels
+ \ifdefstring{\xpg@main@language}{french}{%
\renewcommand{\labelitemi}{\french@itemi}%
\renewcommand{\labelitemii}{\french@itemii}%
\renewcommand{\labelitemiii}{\french@itemiii}%
\renewcommand{\labelitemiv}{\french@itemiv}%
- \else
- \let\@makefntext\xpg@orig@makefntext
- \fi
- }{\xpg@warning{Option 'frenchitemlabels' only supported if French is main language!}}%
+ }{\xpg@warning{Option 'frenchitemlabels' only supported if French is main language!}}%
+ \else
+ \let\@makefntext\xpg@orig@makefntext
+ \fi
}%
}
+% Register default options
+\xpg@initialize@gloss@options{french}{variant=french,autospacing=true,thincolonspace=false,
+ autospaceguillemets=true,autospacetypewriter=false,
+ frenchfootnote=false,frenchitemlabels=false,
+ itemlabels=\textemdash,itemlabeli=\textemdash,itemlabelii=\textemdash,
+ itemlabeliii=\textemdash,itemlabeliv=\textemdash}
+% Register alias options
+\xpg@set@alias@values{french}{variant}{canadian}{acadian}
+
\def\french@fontsetup{%
\unless\iffrench@autospacetypewriter
@@ -192,12 +219,13 @@
\fi
\else
\XeTeXinterchartokenstate=1
- \XeTeXcharclass `\! \french@punctthin
- \XeTeXcharclass `\? \french@punctthin
- \XeTeXcharclass `\‼ \french@punctthin
- \XeTeXcharclass `\⁇ \french@punctthin
- \XeTeXcharclass `\⁈ \french@punctthin
- \XeTeXcharclass `\⁉ \french@punctthin
+ \XeTeXcharclass `\! \french@questionexclamation
+ \XeTeXcharclass `\? \french@questionexclamation
+ \XeTeXcharclass `\‼ \french@questionexclamation
+ \XeTeXcharclass `\⁇ \french@questionexclamation
+ \XeTeXcharclass `\⁈ \french@questionexclamation
+ \XeTeXcharclass `\⁉ \french@questionexclamation
+ \XeTeXcharclass `\‽ \french@questionexclamation % U+203D (interrobang)
\XeTeXcharclass `\; \french@punctthin
\iffrench@thincolonspace
\XeTeXcharclass `\: \french@punctthin
@@ -216,26 +244,35 @@
\XeTeXcharclass `\} \french@closebrackets
\XeTeXcharclass `\⟨ \french@openbrackets
\XeTeXcharclass `\⟩ \french@closebrackets
+ \XeTeXinterchartoks \z@ \french@questionexclamation = {\xpg@french@thinsp}%
\XeTeXinterchartoks \z@ \french@punctthin = {\xpg@french@thinsp}%
\XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
+ \XeTeXinterchartoks \xpg@boundaryclass \french@questionexclamation = {\xpg@unskip\xpg@french@thinsp}%
\XeTeXinterchartoks \xpg@boundaryclass \french@punctthin = {\xpg@unskip\xpg@french@thinsp}%
\XeTeXinterchartoks \xpg@boundaryclass \french@punctthick = {\xpg@unskip\nobreakspace}%
\iffrench@autospaceguillemets
\let\xpg@french@guillspace\xpg@french@thinsp%
\XeTeXinterchartoks \french@punctguillstart \z@ = {\xpg@french@guillspace}% "«a" -> "«\,a"
+ \XeTeXinterchartoks \french@punctguillstart \french@punctguillstart = {\xpg@french@guillspace}% "«‹" -> "«\,‹"
% \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
% \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
\XeTeXinterchartoks \z@ \french@punctguillend = {\xpg@french@guillspace}% "a»" -> "a\,»"
\XeTeXinterchartoks \french@punctguillstart \xpg@boundaryclass = {\xpg@french@guillspace\ignorespaces}% "« " -> "«\,"
\XeTeXinterchartoks \xpg@boundaryclass \french@punctguillend = {\xpg@unskip\xpg@french@guillspace}% " »" -> "\,»"
\XeTeXinterchartoks \french@closebrackets \french@punctguillend = {\xpg@french@guillspace}% ")»" -> ")\,»"
+ \XeTeXinterchartoks \french@questionexclamation \french@punctguillend = {\xpg@french@guillspace}% "?»" -> "?\,»"
+ \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\xpg@french@guillspace}% ";»" -> ";\,»"
+ \XeTeXinterchartoks \french@punctguillend \french@punctguillend = {\xpg@french@guillspace}% "›»" -> "›\,»"
\else
\def\xpg@french@guillspace{}%
\fi
+ \XeTeXinterchartoks \french@punctguillend \french@questionexclamation = {\xpg@french@thinsp}% "»?" -> "»\,?"
\XeTeXinterchartoks \french@punctguillend \french@punctthin = {\xpg@french@thinsp}% "»;" -> "»\,;"
\XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
- \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\xpg@french@thinsp}% "?»" -> "?\,»"
- \XeTeXinterchartoks \french@openbrackets \french@punctthin = {\xpg@unskip}% "(?" -> "(?" and not "( ?"
+ \XeTeXinterchartoks \french@questionexclamation \french@punctthin = {\xpg@french@thinsp}% "?;" -> "?\,;"
+ \XeTeXinterchartoks \french@questionexclamation \french@punctthick = {\xpg@french@thinsp}% "?:" -> "?\,:"
+ \XeTeXinterchartoks \french@openbrackets \french@questionexclamation = {\xpg@unskip}% "(?" -> "(?" and not "( ?"
+ \XeTeXinterchartoks \french@openbrackets \french@punctthin = {\xpg@unskip}% "(;" -> "(;" and not "( ;"
\XeTeXinterchartoks \french@punctthin \french@closebrackets = {\xpg@unskip}% "?)" -> "?)" (code not need, just for symetry with previous one)
\XeTeXinterchartoks \french@closebrackets \french@punctthin = {\xpg@french@thinsp}% ")?" -> ")\,?"
\XeTeXinterchartoks \french@closebrackets \french@punctthick = {\nobreakspace}% "):" -> ") :"
@@ -253,6 +290,7 @@
\XeTeXcharclass `\⁇ \z@
\XeTeXcharclass `\⁈ \z@
\XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\‽ \z@
\XeTeXcharclass `\; \z@
\XeTeXcharclass `\: \z@
\XeTeXcharclass `\« \z@
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-friulian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-friulian.ldf
index 8cabe99e69c..e68fd60813e 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-friulian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-friulian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-friulian.ldf}[polyglossia: module for friulian]
\PolyglossiaSetup{friulian}{%
+ bcp47=fur,
language=Friulian,
babelname=friulan,
hyphennames={friulan,furlan},
@@ -11,6 +12,9 @@
frenchspacing=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{friulian}{fur}
+
% Babel and backwards compat. alias
\setlanguagealias{friulian}{friulan}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-fur.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-fur.ldf
new file mode 100644
index 00000000000..d7bfff5aa1c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-fur.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-fur.ldf}[polyglossia: module for fur (friulian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{friulian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ga.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ga.ldf
new file mode 100644
index 00000000000..6f2dfe81faf
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ga.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ga.ldf}[polyglossia: module for ga (gaelic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{gaelic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf
index 91666261c57..b9cdccd0d96 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-gaelic.ldf}[polyglossia: module for gaelic]
\PolyglossiaSetup{gaelic}{
+ bcp47=ga,
language=Irish,
babelname=irish,
hyphennames={irish},
@@ -9,6 +10,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*[variant=irish]{gaelic}{ga}
+\setlanguagealias*[variant=scottish]{gaelic}{gd}
% Babel aliases
\setlanguagealias[variant=irish]{gaelic}{irish}
\setlanguagealias[variant=scottish]{gaelic}{scottish}
@@ -18,17 +22,20 @@
\ifcase\nr\relax
% irish:
\gdef\gaelic@variant{irish}%
- \SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish}%
+ \SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish,bcp47=ga}%
\xpg@fontsetup@latin{gaelic}%
\or
% scottish:
\gdef\gaelic@variant{scottish}%
- \SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish}%
+ \SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish,bcp47=gd}%
\xpg@fontsetup@latin{gaelic}%
\fi
\xpg@info{Option: gaelic, variant=\val}%
}{\xpg@warning{Unknown gaelic variant `#1'}}
+% Register default options
+\xpg@initialize@gloss@options{gaelic}{variant=irish}
+
\def\captionsgaelic@irish{%
\def\refname{Tagairtí}%
\def\abstractname{Achoimre}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf
index be4853ebbef..f9cf4ac3d23 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-galician.ldf}[polyglossia: module for galician]
\PolyglossiaSetup{galician}{
+ bcp47=gl,
hyphennames={galician},
hyphenmins={2,2},
langtag=GAL,
@@ -7,6 +8,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{galician}{gl}
+
\def\captionsgalician{%
\def\refname{Referencias}%
\def\abstractname{Resumo}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-gd.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-gd.ldf
new file mode 100644
index 00000000000..f5a4388bf58
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-gd.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-gd.ldf}[polyglossia: module for gd (gaelic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{gaelic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-georgian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-georgian.ldf
index 8d53e228a05..1fa2091b93e 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-georgian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-georgian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-georgian.ldf}[polyglossia: module for georgian]
\PolyglossiaSetup{georgian}{
+ bcp47=ka,
script=Georgian,
scripttag=geor,
langtag=KAT,
@@ -9,6 +10,9 @@
localnumeral=georgiannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{georgian}{ka}
+
\newif\ifgeorgian@numerals
\define@key{georgian}{numerals}[arabic]{%
\ifstrequal{#1}{georgian}%
@@ -20,6 +24,9 @@
\define@boolkey{georgian}[georgian@]{oldmonthnames}[true]{}
+% Register default options
+\xpg@initialize@gloss@options{georgian}{babelshorthands=false,oldmonthnames=false,numerals=arabic}
+
\ifsystem@babelshorthands
\setkeys{georgian}{babelshorthands=true}
\else
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
index 3c66f6f8367..0cf07c8c6da 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-german.ldf}[polyglossia: module for german]
\PolyglossiaSetup{german}{
+ bcp47=de-DE,
hyphenmins={2,2},
frenchspacing=true,
fontsetup=true,
@@ -8,6 +9,28 @@
babelname=ngerman
}
+% BCP-47 compliant aliases
+\setlanguagealias*{german}{de}
+\setlanguagealias*[variant=swiss,spelling=new]{german}{de-CH}
+\setlanguagealias*[variant=austrian,spelling=new]{german}{de-AT}
+\setlanguagealias*[variant=german,spelling=new]{german}{de-DE}
+\setlanguagealias*[variant=swiss,spelling=new,script=blackletter]{german}{de-Latf-CH}
+\setlanguagealias*[variant=german,spelling=new,script=blackletter]{german}{de-Latf-DE}
+\setlanguagealias*[variant=austrian,spelling=new,script=blackletter]{german}{de-Latf-AT}
+\setlanguagealias*[variant=austrian,spelling=old]{german}{de-AT-1901}
+\setlanguagealias*[variant=swiss,spelling=new]{german}{de-CH-1996}
+\setlanguagealias*[variant=austrian,spelling=new]{german}{de-AT-1996}
+\setlanguagealias*[variant=german,spelling=old]{german}{de-DE-1901}
+\setlanguagealias*[variant=swiss,spelling=old,script=blackletter]{german}{de-Latf-CH-1901}
+\setlanguagealias*[variant=swiss,spelling=old]{german}{de-CH-1901}
+\setlanguagealias*[variant=austrian,spelling=old,script=blackletter]{german}{de-Latf-AT-1901}
+\setlanguagealias*[variant=swiss,spelling=new,script=blackletter]{german}{de-Latf-CH-1996}
+\setlanguagealias*[script=blackletter]{german}{de-Latf}
+\setlanguagealias*[variant=german,spelling=new]{german}{de-DE-1996}
+\setlanguagealias*[variant=german,spelling=old,script=blackletter]{german}{de-Latf-DE-1901}
+\setlanguagealias*[variant=german,spelling=new,script=blackletter]{german}{de-Latf-DE-1996}
+\setlanguagealias*[variant=austrian,spelling=new,script=blackletter]{german}{de-Latf-AT-1996}
+
% Babel aliases
\setlanguagealias[variant=austrian,spelling=old]{german}{austrian}
\setlanguagealias[variant=austrian,spelling=new]{german}{naustrian}
@@ -18,7 +41,7 @@
\newif\if@german@oldspelling
\@german@oldspellingfalse
-\define@choicekey*+{german}{spelling}[\val\nr]{new,old,1901}[new]{%
+\define@choicekey*+{german}{spelling}[\val\nr]{new,old,1901,1996}[new]{%
\ifcase\nr\relax
% new:
\@german@oldspellingfalse
@@ -28,6 +51,9 @@
\or
% 1901:
\@german@oldspellingtrue
+ \or
+ % 1996:
+ \@german@oldspellingfalse
\fi
\german@set@babelname%
\xpg@info{Option: German, spelling=\val}%
@@ -64,21 +90,45 @@
\def\german@set@babelname{%
\if@german@oldspelling
\if@swiss@locale
- \SetLanguageKeys{german}{babelname=swissgerman}%
+ \if@german@blackletter
+ \SetLanguageKeys{german}{babelname=swissgerman,bcp47=de-Latf-CH-1901}%
+ \else
+ \SetLanguageKeys{german}{babelname=swissgerman,bcp47=de-CH-1901}%
+ \fi
\else
\if@austrian@locale
- \SetLanguageKeys{german}{babelname=austrian}%
+ \if@german@blackletter
+ \SetLanguageKeys{german}{babelname=austrian,bcp47=de-Latf-AT-1901}%
+ \else
+ \SetLanguageKeys{german}{babelname=austrian,bcp47=de-AT-1901}%
+ \fi
\else
- \SetLanguageKeys{german}{babelname=german}%
+ \if@german@blackletter
+ \SetLanguageKeys{german}{babelname=german,bcp47=de-Latf-DE-1901}%
+ \else
+ \SetLanguageKeys{german}{babelname=german,bcp47=de-DE-1901}%
+ \fi
\fi\fi
\else
\if@swiss@locale
- \SetLanguageKeys{german}{babelname=nswissgerman}%
+ \if@german@blackletter
+ \SetLanguageKeys{german}{babelname=nswissgerman,bcp47=de-Latf-CH}%
+ \else
+ \SetLanguageKeys{german}{babelname=nswissgerman,bcp47=de-CH}%
+ \fi
\else
\if@austrian@locale
- \SetLanguageKeys{german}{babelname=naustrian}%
+ \if@german@blackletter
+ \SetLanguageKeys{german}{babelname=naustrian,bcp47=de-Latf-AT}%
+ \else
+ \SetLanguageKeys{german}{babelname=naustrian,bcp47=de-AT}%
+ \fi
\else
- \SetLanguageKeys{german}{babelname=ngerman}%
+ \if@german@blackletter
+ \SetLanguageKeys{german}{babelname=ngerman,bcp47=de-Latf-DE}%
+ \else
+ \SetLanguageKeys{german}{babelname=ngerman,bcp47=de-DE}%
+ \fi
\fi\fi
\fi
}
@@ -95,14 +145,24 @@
% fraktur:
\@german@blacklettertrue%
\fi
+ \german@set@babelname%
\xpg@info{Option: German, script=\val}%
}{\xpg@warning{Unknown German script `#1'}}
-\define@boolkey{german}[german@]{latesthyphen}[false]{}
+% Option defunc'ed, as bot XeTeX and LuaTeX meanwhile
+% use the experimental German hyphenation patterns by default.
+\define@boolkey{german}[german@]{latesthyphen}[true]{}
\define@boolkey{german}[german@]{babelshorthands}[true]{}
-\setkeys{german}{spelling,latesthyphen,script,variant}
+\setkeys{german}{spelling,script,variant}
+
+% Register default options
+\xpg@initialize@gloss@options{german}{variant=german,spelling=new,script=latin,latesthyphen=false,babelshorthands=false}
+% Register alias options
+\xpg@set@alias@values{german}{spelling}{new}{1996}
+\xpg@set@alias@values{german}{spelling}{old}{1901}
+\xpg@set@alias@values{german}{script}{blackletter}{fraktur}
\ifsystem@babelshorthands
\setkeys{german}{babelshorthands=true}
@@ -229,26 +289,23 @@
}
\def\german@language{%
- \ifgerman@latesthyphen
- \if@german@oldspelling
- \if@swiss@locale
- \polyglossia@setup@language@patterns{swissgerman}%
- \else
- \polyglossia@setup@language@patterns{german-x-latest}%
- \fi
- \else
- \polyglossia@setup@language@patterns{ngerman-x-latest}%
- \fi
- \else% (latesthyphen=false)
- \if@german@oldspelling
- \if@swiss@locale
- \polyglossia@setup@language@patterns{swissgerman}%
- \else
- \polyglossia@setup@language@patterns{german}%
- \fi
- \else
- \polyglossia@setup@language@patterns{ngerman}%
- \fi
+ \if@german@oldspelling
+ \if@swiss@locale
+ \polyglossia@setup@language@patterns{swissgerman}%
+ \else
+ \polyglossia@setup@language@patterns{german}%
+ \fi
+ \if@austrian@locale
+ \adddialect\l@austrian\l@german%
+ \fi
+ \else
+ \polyglossia@setup@language@patterns{ngerman}%
+ \if@austrian@locale
+ \adddialect\l@naustrian\l@ngerman%
+ \fi
+ \if@swiss@locale
+ \adddialect\l@nswissgerman\l@ngerman%
+ \fi
\fi
}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-gl.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-gl.ldf
new file mode 100644
index 00000000000..9ef3f96da98
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-gl.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-gl.ldf}[polyglossia: module for gl (galician)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{galician}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-grc.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-grc.ldf
new file mode 100644
index 00000000000..9226621218f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-grc.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-grc.ldf}[polyglossia: module for grc (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf
index eba37b56c74..90d34f14550 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek]
\PolyglossiaSetup{greek}{
+ bcp47=el-monoton,
script=Greek,
scripttag=grek,
langtag=ELL,
@@ -12,6 +13,12 @@
%TODO localalph={greek@alph,greek@Alph}
}
+% BCP-47 compliant aliases
+\setlanguagealias*[variant=ancient]{greek}{grc}
+\setlanguagealias*[varant=polytonic]{greek}{el-polyton}
+\setlanguagealias*[variant=monotonic]{greek}{el-monoton}
+\setlanguagealias*{greek}{el}
+
% Babel aliases
\setlanguagealias[variant=polytonic]{greek}{polutonikogreek}
@@ -48,7 +55,7 @@
\def\greek@variant{polygreek}%
\def\captionsgreek{\polygreekcaptions}%
\def\dategreek{\datepolygreek}%
- \SetLanguageKeys{greek}{babelname=polutonikogreek}%
+ \SetLanguageKeys{greek}{babelname=polutonikogreek,bcp47=el-polyton}%
\xpg@info{Option: Polytonic Greek}%
\else
\ifx\@tmpa\tmp@ancient
@@ -59,6 +66,7 @@
\def\greek@variant{ancientgreek}%
\def\captionsgreek{\ancientgreekcaptions}%
\def\dategreek{\dateancientgreek}%
+ \SetLanguageKeys{greek}{babelname=greek,bcp47=grc}%
\xpg@info{Option: Ancient Greek}%
\else %monotonic
\xpg@ifdefined{monogreek}{}%
@@ -68,12 +76,13 @@
\def\greek@variant{monogreek}% monotonic
\def\captionsgreek{\monogreekcaptions}%
\def\dategreek{\datemonogreek}%
+ \SetLanguageKeys{greek}{babelname=greek,bcp47=el-monoton}%
\xpg@info{Option: Monotonic Greek}%
\fi
\fi}
\def\greek@language{%
- \polyglossia@setup@language@patterns{\greek@variant}
+ \polyglossia@setup@language@patterns{\greek@variant}%
}
@@ -84,8 +93,11 @@
\define@boolkey{greek}{attic}[true]{\xpg@warning{Greek option `attic' is no longer required.}}
-% This sets the defaults
-\setkeys{greek}{numerals,variant}
+% Register default options
+\xpg@initialize@gloss@options{greek}{variant=monotonic,numerals=greek}
+% Register alias options
+\xpg@set@alias@values{greek}{variant}{monotonic}{mono}
+\xpg@set@alias@values{greek}{variant}{polytonic}{poly}
\def\monogreekcaptions{%
\def\refname{Αναφορές}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-he.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-he.ldf
new file mode 100644
index 00000000000..9fa94cc0064
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-he.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-he.ldf}[polyglossia: module for he (hebrew)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{hebrew}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
index 1f366a0f551..a21d5909cba 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
@@ -9,6 +9,7 @@ and may look very wrong.}
\RequirePackage{hebrewcal}
\PolyglossiaSetup{hebrew}{
+ bcp47=he,
script=Hebrew,
direction=RL,
scripttag=hebr,
@@ -20,6 +21,9 @@ and may look very wrong.}
%digits = hebrewnumber
}
+% BCP-47 compliant aliases
+\setlanguagealias*{hebrew}{he}
+
\newif\if@calendar@hebrew
\def\tmp@hebrew{hebrew}
\define@key{hebrew}{calendar}[gregorian]{%
@@ -50,6 +54,9 @@ and may look very wrong.}
\setkeys{hebrew}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{hebrew}{numerals=arabic,calendar=gregorian,marcheshvan=false}
+
\def\captionshebrew{%
\def\prefacename{מבוא}%
\def\refname{מקורות}%
@@ -104,19 +111,45 @@ and may look very wrong.}
\fi
}
+% Bidi inserts an RTL mark (0x200f) before any number, forcing numbers to
+% RTL. Hebrew uses LTR numbers, though. So we insert an LTR mark to revert
+% the directionality
+\ifxetex
+ \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\if@nonlatin\char"200E \fi}
+\fi
+
+\def\hebrew@ltr@numbers{%
+ \ifxetex
+ \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks}
+ \fi%
+}
+
+\def\nohebrew@ltr@numbers{%
+ \ifxetex
+ % This is bidi's original intervention
+ \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}
+ \fi%
+}
+
\def\hebrew@numbers{%
\let\@alph\hebrewnumeral%
\let\@Alph\Hebrewnumeral%
+ % Prevent bidi from setting the numbers RTL
+ \hebrew@ltr@numbers%
}
\def\nohebrew@numbers{%
\let\@alph\latin@alph%
\let\@Alph\latin@Alph%
+ % Restore previous bidi numbers definition
+ \nohebrew@ltr@numbers
}
\def\hebrew@globalnumbers{%
\let\@arabic\hebrewnumber%
\renewcommand\thefootnote{\localnumeral*{footnote}}%
+ % Prevent bidi from setting the numbers RTL
+ \hebrew@ltr@numbers%
}
% Store original definition
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hi.ldf
new file mode 100644
index 00000000000..cfcc09f48a4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hi.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-hi.ldf}[polyglossia: module for hi (hindi)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{hindi}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf
index 56ca28f404e..3fa551dd56a 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf
@@ -6,6 +6,7 @@
\ProvidesFile{gloss-hindi.ldf}[polyglossia: module for hindi]
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{hindi}{
+ bcp47=hi,
script=Devanagari,
scripttag=deva,
langtag=HIN,
@@ -15,6 +16,9 @@
%TODO nouppercase=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{hindi}{hi}
+
\ifx\l@hindi\@undefined%
\ifx\l@sanskrit\@undefined%
\xpg@nopatterns{Hindi}%
@@ -38,7 +42,11 @@
\def\@tmpa{#1}%
\ifx\@tmpa\tmp@western
\hindi@devanagari@numeralsfalse
- \fi}
+ \fi%
+}
+
+% Register default options
+\xpg@initialize@gloss@options{hindi}{numerals=Devanagari}
\newcommand{\hindinumerals}[2]{\hindinumber{#2}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hr.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hr.ldf
new file mode 100644
index 00000000000..a3db290b7ca
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hr.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-hr.ldf}[polyglossia: module for hr (croatian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{croatian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hsb.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hsb.ldf
new file mode 100644
index 00000000000..6f6e43716c9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hsb.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-hsb.ldf}[polyglossia: module for hsb (sorbian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{sorbian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hu.ldf
new file mode 100644
index 00000000000..bb176cf1fa1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hu.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-hu.ldf}[polyglossia: module for hu (hungarian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{hungarian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
index c44c7a63ff0..78403e33d6f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-hungarian.ldf}[polyglossia: module for hungarian]
\PolyglossiaSetup{hungarian}{
+ bcp47=hu,
babelname=magyar,
hyphennames={hungarian,magyar},
langtag=HUN,
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{hungarian}{hu}
+
\frenchspacing
% Babel and backwards compat. alias
@@ -51,7 +55,13 @@
\xpg@info{Option: Hungarian, swapstrings=\val}%
}{\xpg@warning{Unknown Hungarian swapstrings value `#1'}}
-\setkeys{hungarian}{swapstrings}
+% Register default options
+\xpg@initialize@gloss@options{hungarian}{swapstrings=all}
+
+\def\hungarian@language{%
+ \polyglossia@setup@language@patterns{hungarian}%
+ \xpg@ifdefined{hungarian}{\adddialect\l@magyar\l@hungarian}{}%
+}%
\def\captionshungarian{%
\def\refname{Hivatkozások}%
@@ -122,81 +132,81 @@
% change chapter and part headings
\if@hungarian@swapheadings
% With titlesec
- \ifdefined\titleformat%
- \ifdefined\@part%
+ \ifcsdef{titleformat}{%
+ \ifcsdef{@part}{%
\let\xpg@save@part@format\@part%
\patchcmd{\@part}%
{\partname\nobreakspace\thepart}%
{\thepart.\nobreakspace\partname}%
{}%
{\xpg@warning{Failed to patch part for Hungarian}}%
- \fi%
- \ifdefined\chapter%
+ }{}%
+ \ifcsdef{chapter}{%
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
{\thechapter.\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- \fi%
- \else% (not \ifdefined\titleformat)
+ }{}%
+ }{% (not \ifdefined\titleformat)
% With KOMA
- \ifdefined\sectionformat%
- \ifdefined\partformat%
+ \ifcsdef{sectionformat}{%
+ \ifcsdef{partformat}{%
\let\xpg@save@part@format\partformat%
\renewcommand{\partformat}{\thepart.~\partname}%
- \fi%
- \ifdefined\chapterformat%
+ }{}%
+ \ifcsdef{chapterformat}{%
\let\xpg@save@chap@format\chapterformat%
\renewcommand{\chapterformat}{\mbox{\thechapter\autodot%
\IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
- \fi%
- \else% (not \ifdefined\sectionformat)
+ }{}%
+ }{% (not \ifdefined\sectionformat)
% With memoir
- \ifdefined\@memptsize%
- \ifdefined\@makechapterhead%
+ \ifcsdef{@memptsize}{%
+ \ifcsdef{@makechapterhead}{%
\let\xpg@save@chap@format\@makechapterhead%
\patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
{\printchapternum.\chapternamenum\printchaptername}%
{}%
{\xpg@warning{Failed to patch chapter for Hungarian}}%
- \fi%
- \ifdefined\@part%
+ }{}%
+ \ifcsdef{@part}{%
\let\xpg@save@part@format\@part%
\patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
{\printpartnum.\partnamenum\printpartname}%
{}%
{\xpg@warning{Failed to patch part for Hungarian}}%
- \fi%
- \else% (not \ifdefined\@memptsize)
+ }{}%
+ }{% (not \ifdefined\@memptsize)
% With standard classes
- \ifdefined\@makechapterhead%
+ \ifcsdef{@makechapterhead}{%
\let\xpg@save@chap@format\@makechapterhead%
\patchcmd{\@makechapterhead}%
{\@chapapp\space \thechapter}%
{\thechapter.\space \@chapapp}%
{}%
{\xpg@warning{Failed to patch chapter for Hungarian}}%
- \fi%
- \ifdefined\@part%
+ }{}%
+ \ifcsdef{@part}{%
\let\xpg@save@part@format\@part%
\patchcmd{\@part}%
{\partname\nobreakspace\thepart}%
{\thepart.\nobreakspace\partname}%
{}%
{\xpg@warning{Failed to patch part for Hungarian}}%
- \fi% (end \ifdefined\@part)
- \fi% (end \ifdefined\@memptsize)
- \fi% (end \ifdefined\sectionformat)
- \fi% (end \ifdefined\titleformat)
+ }{}% (end \ifdefined\@part)
+ }% (end \ifdefined\@memptsize)
+ }% (end \ifdefined\sectionformat)
+ }% (end \ifdefined\titleformat)
\fi% (end \if@hungarian@swapheadings)
%
% Change running headers
\if@hungarian@swapheaders
- \ifdefined\chapterformat%
+ \ifcsdef{chapterformat}{%
% With KOMA
\let\xpg@save@chaptermark@format\chaptermarkformat%
\renewcommand*\chaptermarkformat{%
\thechapter\autodot\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}}
- \else% (not \ifdefined\chapterformat)
- \ifdefined\@memptsize%
+ }{% (not \ifdefined\chapterformat)
+ \ifcsdef{@memptsize}{%
% With memoir
\let\xpg@save@chaptermark@format\chaptermark%
\renewcommand*\chaptermark[1]{%
@@ -207,18 +217,21 @@
\fi
\fi
##1}}{}}%
- \else% (not \ifdefined\@memptsize)
+ }{% (not \ifdefined\@memptsize)
% With standard classes
- \ifdefined\chaptermark%
- \let\xpg@save@chaptermark@format\chaptermark%
- \patchcmd{\chaptermark}%
+ \ifcsdef{chaptermark}{%
+ \ifpatchable{\chaptermark}%
+ {\@chapapp\ \thechapter.}%
+ {\let\xpg@save@chaptermark@format\chaptermark%
+ \patchcmd{\chaptermark}%
{\@chapapp\ \thechapter.}%
{\thechapter.\ \@chapapp}%
{}%
- {\xpg@warning{Failed to patch chaptermark for Hungarian}}%
- \fi% (end \ifdefined\chaptermark)
- \fi% (end \ifdefined\@memptsize)
- \fi% (end \ifdefined\chapterformat)
+ {\xpg@warning{Failed to patch chaptermark for Hungarian}}}%
+ {}%
+ }{}% (end \ifdefined\chaptermark)
+ }% (end \ifdefined\@memptsize)
+ }% (end \ifdefined\chapterformat)
\fi% (end \if@hungarian@swapheaders)
}
@@ -229,50 +242,50 @@
\let\fnum@figure\xpg@save@fnum@figure%
%
% Reset chapter and part heading
- \ifdefined\titleformat%
+ \ifcsdef{titleformat}{%
% With titlesec
- \ifdefined\xpg@save@part@format
+ \ifcsdef{xpg@save@part@format}{%
\let\@part\xpg@save@part@format
- \fi%
- \ifdefined\chapter
+ }{}%
+ \ifcsdef{chapter}{%
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
{\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- \fi%
- \else% (not \ifdefined\titleformat)
- \ifdefined\sectionformat%
+ }{}%
+ }{% (not \ifdefined\titleformat)
+ \ifcsdef{sectionformat}{%
% With KOMA
- \ifdefined\xpg@save@part@format
+ \ifcsdef{xpg@save@part@format}{%
\let\partformat\xpg@save@part@format
- \fi%
- \ifdefined\xpg@save@chap@format
+ }{}%
+ \ifcsdef{xpg@save@chap@format}{%
\let\chapterformat\xpg@save@chap@format
- \fi%
- \else%
+ }{}%
+ }{%
% With memoir and standard classes
- \ifdefined\xpg@save@part@format
+ \ifcsdef{xpg@save@part@format}{%
\let\@part\xpg@save@part@format
- \fi%
- \ifdefined\xpg@save@chap@format
+ }{}%
+ \ifcsdef{xpg@save@chap@format}{%
\let\@makechapterhead\xpg@save@chap@format
- \fi%
- \fi% (end \ifdefined\sectionformat)
- \fi% (end \ifdefined\titleformat)
+ }{}%
+ }% (end \ifdefined\sectionformat)
+ }% (end \ifdefined\titleformat)
%
% Reset headers
- \ifdefined\chaptermarkformat%
+ \ifcsdef{chaptermarkformat}{%
% With KOMA
- \ifdefined\xpg@save@chaptermark@format
+ \ifcsdef{xpg@save@chaptermark@format}{%
\let\chaptermarkformat\xpg@save@chaptermark@format%
- \fi
- \else%
- \ifdefined\chaptermark%
+ }{}%
+ }{%
+ \ifcsdef{chaptermark}{%
% With memoir and standard classes
- \ifdefined\xpg@save@chaptermark@format
+ \ifcsdef{xpg@save@chaptermark@format}{%
\let\chaptermark\xpg@save@chaptermark@format%
- \fi
- \fi% (end \ifdefined\chaptermark)
- \fi% (end \ifdefined\chapterformat)
+ }{}%
+ }{}% (end \ifdefined\chaptermark)
+ }% (end \ifdefined\chapterformat)
}
\def\blockextras@hungarian{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hy.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hy.ldf
new file mode 100644
index 00000000000..430cf90aebd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hy.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-hy.ldf}[polyglossia: module for hy (armenian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{armenian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ia.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ia.ldf
new file mode 100644
index 00000000000..e3add18ef78
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ia.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ia.ldf}[polyglossia: module for ia (interlingua)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{interlingua}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf
index 1520d58472a..1450fcc6f47 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf
@@ -1,11 +1,15 @@
\ProvidesFile{gloss-icelandic.ldf}[polyglossia: module for icelandic]
\PolyglossiaSetup{icelandic}{
+ bcp47=is,
hyphennames={icelandic},
hyphenmins={2,2},
langtag=ISL,
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{icelandic}{is}
+
\def\captionsicelandic{%
\def\refname{Heimildir}%
\def\abstractname{Útdráttur}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-id.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-id.ldf
new file mode 100644
index 00000000000..a3a7e7bda19
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-id.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-id.ldf}[polyglossia: module for id (malay)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{malay}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf
index 4708cf0320b..56ff1ef52f6 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-interlingua.ldf}[polyglossia: module for interlingua]
\PolyglossiaSetup{interlingua}{
+ bcp47=ia,
hyphennames={interlingua},
hyphenmins={2,2},
langtag=INA,
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{interlingua}{ia}
+
\def\captionsinterlingua{%
\def\refname{Referentias}%
\def\abstractname{Summario}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-is.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-is.ldf
new file mode 100644
index 00000000000..f9c084c2665
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-is.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-is.ldf}[polyglossia: module for is (icelandic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{icelandic}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-it.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-it.ldf
new file mode 100644
index 00000000000..34566d847d9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-it.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-it.ldf}[polyglossia: module for it (italian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{italian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf
index 3d7b02d8951..fb284be12c2 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf
@@ -1,6 +1,7 @@
% !TEX encoding = UTF-8 Unicode
\ProvidesFile{gloss-italian.ldf}[polyglossia: module for italian]
\PolyglossiaSetup{italian}{
+ bcp47=it,
hyphennames={italian},
hyphenmins={2,2},
langtag=ITA,
@@ -9,10 +10,16 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{italian}{it}
+
%%% CHANGES START %%% by Enrico Gregorio
\define@boolkey{italian}[italian@]{babelshorthands}[true]{}
+% Register default options
+\xpg@initialize@gloss@options{italian}{babelshorthands=false}
+
\ifsystem@babelshorthands
\setkeys{italian}{babelshorthands=true}
\else
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ja.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ja.ldf
new file mode 100644
index 00000000000..57116c35d4b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ja.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ja.ldf}[polyglossia: module for ja (japanese)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{japanese}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf
index 6c36af9f15e..d45de100e53 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf
@@ -1,19 +1,25 @@
\ProvidesFile{gloss-japanese.ldf}[polyglossia: module for japanese]
+
\PolyglossiaSetup{japanese}{
+ bcp47=ja,
script=CJK,
language=Japanese,
langtag=JAN,
hyphennames={nohyphenation},
frenchspacing=false,
- fontsetup=true
+ fontsetup=true,
+ localnumeral=japanesenumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{japanese}{ja}
+
\def\japanese@capsformat{%
\def\@seccntformat##1{%
\csname pre##1\endcsname%
\csname the##1\endcsname%
\csname post##1\endcsname%
- }
+ }%
\def\postsection{節\space}%
\def\postsubsection{節\space}%
\def\postsubsubsection{節\space}%
@@ -53,33 +59,33 @@
\newif\if@IzumoTuki \@IzumoTukifalse%
\newcount\c@TempJNum%
-\def\@JapaneseDigit#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
- 四十六\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 九十二\or 九十三\or 九十四\or 九十五\or
- 九十六\or 九十七\or 九十八\or 九十九
+\def\@JapaneseDigit#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%
+ 四十六\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 九十二\or 九十三\or 九十四\or 九十五\or%
+ 九十六\or 九十七\or 九十八\or 九十九%
\else
- \@ctrerr
- \fi\relax
+ \@ctrerr%
+ \fi\relax%
}
-\def\@JapaneseNum#1{
+\def\@JapaneseNum#1{%
\c@TempJNum=#1\divide\c@TempJNum by 1000\relax%
\ifnum\c@TempJNum=\z@\c@TempJNum=#1%
\divide\c@TempJNum by 100\relax%
@@ -89,7 +95,7 @@
六百\or 七百\or 八百\or 九百%
\fi
\c@TempJNum=#1\divide\c@TempJNum by 100\multiply\c@TempJNum by -100\advance\c@TempJNum#1\@JapaneseDigit\c@TempJNum\relax%
- \fi
+ \fi%
\else
\ifcase\c@TempJNum\or 千\or 二千\or 三千\or 四千\or 五千\or
六千\or 七千\or 八千\or 九千%
@@ -106,7 +112,7 @@
\fi
}
-\def\@japanesenumber#1{
+\def\@japanesenumber#1{%
\@tempcnta=#1%
\ifnum\@tempcnta=\z@{〇}%
\else
@@ -139,12 +145,14 @@
\fi
}
-\def\japanesenumber#1{
+\def\japanesenumber#1{%
\expandafter\@japanesenumber\csname c@#1\endcsname%
}
-\def\datejapanese{
- {
+\newcommand{\japanesenumerals}[2]{\@japanesenumber{#2}}
+
+\def\datejapanese{%
+ {%
\ifnum\year<1868%
\xdef\the@WarekiCur{}%
\else
@@ -163,14 +171,14 @@
\fi
\fi
\xdef\the@WameiTosi{\the\year}%
- }
+ }%
\def\西暦{\@WameiRekifalse \@WameiTukifalse \@WameiHifalse}%
\def\和暦{\@WameiRekitrue \@WameiTosifalse \@WameiTukifalse \@WameiHifalse}%
\def\和名暦{\@WameiTositrue \@WameiTukitrue \@WameiHitrue}%
\def\数字暦{\@WameiTosifalse \@WameiTukifalse \@WameiHifalse}%
\def\出雲月{\@IzumoTukitrue}%
\def\大和月{\@IzumoTukifalse}%
- \def\today{
+ \def\today{%
\if@WameiReki%
\the@WarekiCur%
\if@WameiTosi%
@@ -197,8 +205,8 @@
\else
\,\number\day\,%
\fi
- {日}
- }
+ {日}%
+ }%
}
\def\noextras@japanese{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ka.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ka.ldf
new file mode 100644
index 00000000000..ece3caa5e7d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ka.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ka.ldf}[polyglossia: module for ka (georgian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{georgian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf
index 0525d6289fd..0fc557bf0ba 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf
@@ -24,6 +24,7 @@ the output is not guaranteed to be correct\MessageBreak
and may look very wrong.}
\fi
\PolyglossiaSetup{kannada}{
+ bcp47=kn,
script=Kannada,
scripttag=knda,
langtag=KAN,
@@ -33,6 +34,9 @@ and may look very wrong.}
localnumeral=kannadanumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{kannada}{kn}
+
%% Defining Kannada digits equivalents to english
\def\kannadadigits#1{\expandafter\@kannada@digits #1@}
\def\@kannada@digits#1{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf
index 00c569c06b1..6b62813ed29 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
\PolyglossiaSetup{khmer}{
+ bcp47=km,
script=Khmer,%
scripttag=khmr,%
langtag=KHM,%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-km.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-km.ldf
new file mode 100644
index 00000000000..815c84b0f1d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-km.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-km.ldf}[polyglossia: module for km (khmer)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{khmer}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Arab.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Arab.ldf
new file mode 100644
index 00000000000..dae24ca1c3c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Arab.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-kmr-Arab.ldf}[polyglossia: module for kmr-Arab (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Latn.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Latn.ldf
new file mode 100644
index 00000000000..ee7734e7b86
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr-Latn.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-kmr-Latn.ldf}[polyglossia: module for kmr-Latn (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr.ldf
new file mode 100644
index 00000000000..58c6b560a65
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kmr.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-kmr.ldf}[polyglossia: module for kmr (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kn.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kn.ldf
new file mode 100644
index 00000000000..05ef8b2dc12
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kn.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-kn.ldf}[polyglossia: module for kn (kannada)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kannada}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ko.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ko.ldf
new file mode 100644
index 00000000000..bd0aa3ed805
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ko.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ko.ldf}[polyglossia: module for ko (korean)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{korean}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
index 5aefe04dfa3..5918062e7a9 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean]
\PolyglossiaSetup{korean}{
+ bcp47=ko,
script=Hangul,
scripttag=hang,
language=Korean,
@@ -10,6 +11,9 @@
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{korean}{ko}
+
% variant : plain (0), classic (1), or modern (2)
\define@choicekey{korean}{variant}[\val\nr]{plain,classic,modern}[plain]{%
\let\xpg@korean@variant\nr
@@ -18,7 +22,32 @@
\define@choicekey{korean}{captions}[\val\nr]{hangul,hanja}[hangul]{%
\let\xpg@korean@captions\nr
}
-\setkeys{korean}{variant,captions}
+% swapstrings: all (0), headings (1), headers (2), or none (3)
+\newif\if@korean@swapheadings
+\newif\if@korean@swapheaders
+\define@choicekey*+{korean}{swapstrings}[\val\nr]{all,headings,headers,none}[all]{%
+ \ifcase\nr\relax
+ % all:
+ \@korean@swapheadingstrue%
+ \@korean@swapheaderstrue%
+ \or
+ % headings:
+ \@korean@swapheadingstrue%
+ \@korean@swapheadersfalse%
+ \or
+ % headers:
+ \@korean@swapheadingsfalse%
+ \@korean@swapheaderstrue%
+ \or
+ % none:
+ \@korean@swapheadingsfalse%
+ \@korean@swapheadersfalse%
+ \fi
+ \xpg@info{Option: Korean, swapstrings=\val}%
+}{\xpg@warning{Unknown Korean swapstrings value `#1'}}
+
+% Register default options
+\xpg@initialize@gloss@options{korean}{variant=plain,swapstrings=all,captions=hangul}
\def\captionskorean{%
\ifcase\xpg@korean@captions\relax
@@ -31,7 +60,7 @@
}
\def\captions@korean@hangul{%
\def\koreanTHEname{제}%
- \def\partname##1##2{제##1##2 편}%
+ \def\partname{편}%
\def\chaptername{장}%
\def\refname{참고문헌}%
\def\abstractname{요약}%
@@ -49,10 +78,11 @@
\def\proofname{증명}%
\def\headtoname{수신:}%
\def\ccname{사본}%
+ \def\glossaryname{용어집}%
}
\def\captions@korean@hanja{%
\def\koreanTHEname{第}%
- \def\partname##1##2{第##1##2 篇}%
+ \def\partname{篇}%
\def\chaptername{章}%
\def\refname{參考文獻}%
\def\abstractname{要約}%
@@ -70,6 +100,217 @@
\def\proofname{證明}%
\def\headtoname{受信:}%
\def\ccname{寫本}%
+ \def\glossaryname{用語集}%
+}
+
+\def\korean@appendix@chapapp{\appendixname}% to exclude appendix
+
+\def\korean@headingsformat{%
+ % change chapter and part headings
+ \if@korean@swapheadings
+ % With titlesec
+ \ifdefined\titleformat
+ \ifdefined\@part
+ \let\xpg@save@part@format\@part
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Korean}}%
+ \fi
+ \ifdefined\chapter
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\space \thechapter
+ \else
+ \koreanTHEname\space \thechapter\space \@chapapp
+ \fi
+ }{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}%
+ \fi
+ \else % (not \ifdefined\titleformat)
+ % With KOMA
+ \ifdefined\sectionformat
+ \ifdefined\partformat
+ \let\xpg@save@part@format\partformat
+ \renewcommand*{\partformat}{\koreanTHEname~\thepart~\partname}%
+ \fi
+ \ifdefined\chapterformat
+ \let\xpg@save@chap@format\chapterformat
+ \renewcommand*{\chapterformat}{\mbox{%
+ \IfChapterUsesPrefixLine
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \chapappifchapterprefix\nobreakspace \thechapter\autodot
+ \else
+ \koreanTHEname\nobreakspace \thechapter\nobreakspace \chapappifchapterprefix{}%
+ \fi
+ }%
+ {\thechapter\autodot\enskip}%
+ }}%
+ \fi
+ \else % (not \ifdefined\sectionformat)
+ % With memoir
+ \ifdefined\@memptsize
+ \ifdefined\@makechapterhead
+ \let\xpg@save@chap@format\@makechapterhead
+ \patchcmd{\@makechapterhead}%
+ {\printchaptername \chapternamenum \printchapternum}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \printchaptername\relax\chapternamenum \printchapternum
+ \else
+ \printkoreanchapterthe \printchapternum\chapternamenum \printchaptername
+ \fi
+ }%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Korean}}%
+ \ifdefined\printkoreanchapterthe\else
+ \def\printkoreanchapterthe{%
+ \ifpatchable\printchaptername\@chapapp
+ {\chapnamefont\koreanTHEname\chapternamenum}{}}%
+ \fi
+ \fi
+ \ifdefined\@part
+ \let\xpg@save@part@format\@part
+ \patchcmd{\@part}%
+ {\printpartname \partnamenum \printpartnum}%
+ {\printkoreanpartthe \printpartnum\partnamenum \printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Korean}}%
+ \ifdefined\printkoreanpartthe\else
+ \def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}%
+ \fi
+ \fi
+ \else % (not \ifdefined\@memptsize)
+ % With standard classes
+ \ifdefined\@makechapterhead
+ \let\xpg@save@chap@format\@makechapterhead
+ \patchcmd{\@makechapterhead}%
+ {\@chapapp\space \thechapter}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\space \thechapter
+ \else
+ \koreanTHEname\space \thechapter\space \@chapapp
+ \fi
+ }%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Korean}}%
+ \fi
+ \ifdefined\@part
+ \let\xpg@save@part@format\@part
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Korean}}%
+ \fi % (end \ifdefined\@part)
+ \fi % (end \ifdefined\@memptsize)
+ \fi % (end \ifdefined\sectionformat)
+ \fi % (end \ifdefined\titleformat)
+ \fi % (end \if@korean@swapheadings)
+ %
+ % Change running headers
+ \if@korean@swapheaders
+ \ifdefined\chapterformat
+ % With KOMA
+ \let\xpg@save@chaptermark@format\chaptermarkformat
+ \renewcommand*\chaptermarkformat{%
+ \IfChapterUsesPrefixLine
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \chapappifchapterprefix\ \thechapter\autodot
+ \else
+ \koreanTHEname\ \thechapter\ \chapappifchapterprefix{}%
+ \fi
+ }%
+ {\thechapter\autodot}%
+ \enskip
+ }%
+ \else % (not \ifdefined\chapterformat)
+ \ifdefined\@memptsize
+ % With memoir
+ \let\xpg@save@chaptermark@format\chaptermark
+ \patchcmd{\chaptermark}%
+ {\@chapapp\ \@nameuse{thechapter}}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\ \@nameuse{thechapter}%
+ \else
+ \koreanTHEname\ \@nameuse{thechapter}\ \@chapapp
+ \fi
+ }%
+ {}%
+ {}%
+ \else % (not \ifdefined\@memptsize)
+ % With standard classes
+ \ifdefined\chaptermark
+ \let\xpg@save@chaptermark@format\chaptermark
+ \patchcmd{\chaptermark}%
+ {\@chapapp\ \thechapter}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\ \thechapter
+ \else
+ \koreanTHEname\ \thechapter\ \@chapapp
+ \fi
+ }%
+ {}%
+ {}%
+ \fi % (end \ifdefined\chaptermark)
+ \fi % (end \ifdefined\@memptsize)
+ \fi % (end \ifdefined\chapterformat)
+ \fi % (end \if@korean@swapheaders)
+}
+
+\def\nokorean@headingsformat{%
+ % Reset chapter and part heading
+ \ifdefined\titleformat
+ % With titlesec
+ \ifdefined\xpg@save@part@format
+ \let\@part\xpg@save@part@format
+ \fi
+ \ifdefined\chapter
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}%
+ {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}%
+ \fi
+ \else % (not \ifdefined\titleformat)
+ \ifdefined\sectionformat
+ % With KOMA
+ \ifdefined\xpg@save@part@format
+ \let\partformat\xpg@save@part@format
+ \fi
+ \ifdefined\xpg@save@chap@format
+ \let\chapterformat\xpg@save@chap@format
+ \fi
+ \else
+ % With memoir and standard classes
+ \ifdefined\xpg@save@part@format
+ \let\@part\xpg@save@part@format
+ \fi
+ \ifdefined\xpg@save@chap@format
+ \let\@makechapterhead\xpg@save@chap@format
+ \fi
+ \fi % (end \ifdefined\sectionformat)
+ \fi % (end \ifdefined\titleformat)
+ %
+ % Reset headers
+ \ifdefined\chaptermarkformat
+ % With KOMA
+ \ifdefined\xpg@save@chaptermark@format
+ \let\chaptermarkformat\xpg@save@chaptermark@format
+ \fi
+ \else
+ \ifdefined\chaptermark
+ % With memoir and standard classes
+ \ifdefined\xpg@save@chaptermark@format
+ \let\chaptermark\xpg@save@chaptermark@format
+ \fi
+ \fi % (end \ifdefined\chaptermark)
+ \fi % (end \ifdefined\chapterformat)
}
\def\datekorean{%
@@ -145,17 +386,11 @@
\def\blockextras@korean{%
\inlineextras@korean
- \ifdefined\@chapapp
- \long\def\@tmpa{\chaptername}\def\@tmpb{\chaptername}%
- \ifnum0\ifx\@chapapp\@tmpa1\else\ifx\@chapapp\@tmpb1\fi\fi>\z@
- \let\xpg@orig@@chapapp\@chapapp
- \def\@chapapp##1##2{\koreanTHEname ##1##2##1\chaptername}%
- \fi
- \fi
+ \korean@headingsformat
}
\def\noextras@korean@common{%
- \ifdefined\xpg@orig@@chapapp \let\@chapapp\xpg@orig@@chapapp \fi
+ \nokorean@headingsformat
}
\ifluatex % luatex
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Arab.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Arab.ldf
new file mode 100644
index 00000000000..05204d5362d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Arab.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ku-Arab.ldf}[polyglossia: module for ku-Arab (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Latn.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Latn.ldf
new file mode 100644
index 00000000000..19d7974c62b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ku-Latn.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ku-Latn.ldf}[polyglossia: module for ku-Latn (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ku.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ku.ldf
new file mode 100644
index 00000000000..6d2dc88b947
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ku.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ku.ldf}[polyglossia: module for ku (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf
index 3f118de9b4c..8072041b3e6 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf
@@ -8,6 +8,7 @@
\RequirePackage{hijrical}
\PolyglossiaSetup{kurdish}{
+ bcp47=ckb,
script=Arabic,
direction=RL,
scripttag=arab,
@@ -17,6 +18,17 @@
localnumeral=kurdishnumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{kurdish}{ku}
+\setlanguagealias*[variant=kurmanji,script=Latin]{kurdish}{kmr-Latn}
+\setlanguagealias*[variant=sorani]{kurdish}{ckb}
+\setlanguagealias*[variant=kurmanji,script=Arabic]{kurdish}{kmr-Arab}
+\setlanguagealias*[script=Latin]{kurdish}{ku-Latn}
+\setlanguagealias*[variant=sorani,script=Arabic]{kurdish}{ckb-Arab}
+\setlanguagealias*[variant=sorani,script=Latin]{kurdish}{ckb-Latn}
+\setlanguagealias*[script=Arabic]{kurdish}{ku-Arab}
+\setlanguagealias*[variant=kurmanji]{kurdish}{kmr}
+
% Babel aliases
\setlanguagealias[variant=kurmanji]{kurdish}{kurmanji}
@@ -63,9 +75,9 @@
\@western@numeralstrue%
\if@kurdish@kurmanji
\def\kurdish@pattern{kurmanji}%
- \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji}%
+ \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji,bcp47=kmr-Latn}%
\else
- \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurdish}%
+ \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurdish,bcp47=ckb-Arab}%
\fi
\def\kurdish@script{latin}
\xpg@fontsetup@latin{kurdish}%
@@ -73,20 +85,20 @@
\if@kurdish@arabic% Arabic explicitly set
\if@kurdish@kurmanji
\if@force@western@numerals\else\@western@numeralsfalse\fi%
- \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurmanji}%
+ \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurmanji,bcp47=kmr-Arab}%
\def\kurdish@script{arabic}%
\else
- \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish}%
+ \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish,bcp47=ckb-Arab}%
\fi
\xpg@fontsetup@nonlatin{kurdish}%
\else% sorani=Arabic, kurmanji=Latin
\if@kurdish@kurmanji
\@western@numeralstrue%
- \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji}%
+ \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji,bcp47=kmr-Latn}%
\xpg@fontsetup@latin{kurdish}%
\def\kurdish@script{latin}
\else
- \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish}%
+ \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish,bcp47=ckb-Arab}%
\xpg@fontsetup@nonlatin{kurdish}%
\fi
\fi
@@ -118,7 +130,8 @@
%TODO add option for CALENDAR
-\setkeys{kurdish}{variant,locale}
+% Register default options
+\xpg@initialize@gloss@options{kurdish}{variant=sorani,locale=default,script=Arabic,abjadjimnotail=false,numerals=eastern}
\def\kurdish@language{%
\polyglossia@setup@language@patterns{\kurdish@pattern}%
@@ -325,19 +338,9 @@
\if@western@numerals
\number#1%
\else
- \ifxetex
- \ifnum\XeTeXcharglyph"06F0 > 0\relax
- \farsidigits{\number#1}%
- \else%
- \arabicdigits{\number#1}%
- \fi
- \else\ifluatex
- \expandafter\ifnum\directlua{polyglossia.check_char(0x6F0)} > 0\relax
- \farsidigits{\number#1}%
- \else%
- \arabicdigits{\number#1}%
- \fi
- \fi\fi
+ \xpg@if@char@available{06F0}%
+ {\farsidigits{\number#1}}%
+ {\arabicdigits{\number#1}}%
\fi
}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kurmanji.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kurmanji.ldf
new file mode 100644
index 00000000000..fae13a23273
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kurmanji.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-kurmanji.ldf}[polyglossia: module for kurmanji kurdish]
+
+% We provide this gloss for babel compatibility.
+
+\xpg@load@master@language{kurdish}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-classic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-classic.ldf
new file mode 100644
index 00000000000..e165370d7d5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-classic.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-la-xclassic.ldf}[polyglossia: module for la-xclassic (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-ecclesia.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-ecclesia.ldf
new file mode 100644
index 00000000000..20449f71137
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-ecclesia.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-la-xecclesiastic.ldf}[polyglossia: module for la-xecclesiastic (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-medieval.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-medieval.ldf
new file mode 100644
index 00000000000..dcb2c010302
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-la-x-medieval.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-la-xmedieval.ldf}[polyglossia: module for la-xmedieval (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-la.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-la.ldf
new file mode 100644
index 00000000000..565c5545581
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-la.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-la.ldf}[polyglossia: module for la (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf
index 96b5c436cf7..5786584703d 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf
@@ -6,6 +6,7 @@ the output is not guaranteed to be correct\MessageBreak
and may look very wrong.}
\fi
\PolyglossiaSetup{lao}{
+ bcp47=lo,
script=Lao,
scripttag=lao,
langtag=LAO,
@@ -17,6 +18,9 @@ and may look very wrong.}
%TODO localdigits=laonumber
}
+% BCP-47 compliant aliases
+\setlanguagealias*{lao}{lo}
+
\newif\if@lao@numerals
\def\tmp@lao{lao}
\define@key{lao}{numerals}[arabic]{%
@@ -25,7 +29,8 @@ and may look very wrong.}
\@lao@numeralsfalse\fi
}
-\setkeys{lao}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{lao}{numerals=arabic}
% Translations provided by Brian Wilson <bountonw at gmail.com>
\def\captionslao{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
index 08c4883f748..085f1939bc0 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
@@ -1,20 +1,26 @@
-\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.0 2019-10-28]
+\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.2 2020-01-03]
\ExplSyntaxOn
\PolyglossiaSetup {latin}
{
- hyphennames = {latin},
+ bcp47 = la,
hyphenmins = {2,2},
frenchspacing = true,
fontsetup = true,
langtag = LAT
}
+% BCP-47 compliant aliases
+\setlanguagealias*{latin}{la}
+\setlanguagealias*[variant=classic]{latin}{la-x-classic}
+\setlanguagealias*[variant=ecclesiastic]{latin}{la-x-ecclesia}
+\setlanguagealias*[variant=medieval]{latin}{la-x-medieval}
+
% Babel aliases
-\setlanguagealias[variant=classic]{latin}{latinclassic}
-\setlanguagealias[variant=ecclesiastic]{latin}{latinecclesiastic}
-\setlanguagealias[variant=medieval]{latin}{latinmedieval}
+\setlanguagealias[variant=classic]{latin}{classiclatin}
+\setlanguagealias[variant=ecclesiastic]{latin}{ecclesiasticlatin}
+\setlanguagealias[variant=medieval]{latin}{medievallatin}
%%%%% Variables and commands concerning spelling
@@ -47,8 +53,7 @@
\msg_new:nnn {polyglossia} {latin / missing modern patterns}
{
- No~hyphenation~patterns~were~found~for~Latin~\msg_line_context:.~
- I~will~not~hyphenate~Latin~words.
+ The~hyphenation~patterns~for~modern~Latin~were~not~found~\msg_line_context:.
}
\msg_new:nnn {polyglossia} {latin / missing patterns}
@@ -64,11 +69,23 @@
\def \latin@language
{
\polyglossia@setup@language@patterns {latin}
+ \str_case:Vn \l_polyglossia_latin_variant_str
+ {
+ {classic} { \adddialect \l@classiclatin \l@latin }
+ {medieval} { \adddialect \l@medievallatin \l@latin }
+ {ecclesiastic} { \adddialect \l@ecclesiasticlatin \l@latin }
+ }
}
}
{
\msg_warning:nn {polyglossia} {latin / missing modern patterns}
- \adddialect \l@latin \l@nohyphenation
+ \str_case:Vn \l_polyglossia_latin_variant_str
+ {
+ {classic} { \adddialect \l@classiclatin \l@nohyphenation }
+ {medieval} { \adddialect \l@medievallatin \l@nohyphenation }
+ {modern} { \adddialect \l@latin \l@nohyphenation }
+ {ecclesiastic} { \adddialect \l@ecclesiasticlatin \l@nohyphenation }
+ }
}
}
@@ -80,19 +97,22 @@
\def \latin@language
{
\polyglossia@setup@language@patterns {#1}
+ \str_case:Vn \l_polyglossia_latin_variant_str
+ {
+ {classic} {
+ \str_if_eq:nnTF{#1}{liturgicallatin}
+ { \adddialect \l@classiclatin { \use:c {l@#1} } }
+ {}
+ }
+ {medieval} { \adddialect \l@medievallatin { \use:c {l@#1} } }
+ {modern} { \adddialect \l@latin { \use:c {l@#1} } }
+ {ecclesiastic} { \adddialect \l@ecclesiasticlatin { \use:c {l@#1} } }
+ }
}
}
{
- \xpg@ifdefined {latin}
- {
- \msg_warning:nnn {polyglossia} {latin / missing patterns} {#1}
- \adddialect \l@ #1 \l@latin
- \polyglossia_latin_use_modern_patterns:
- }
- {
- \msg_warning:nn {polyglossia} {latin / missing modern patterns}
- \adddialect \l@ #1 \l@nohyphenation
- }
+ \msg_warning:nnn {polyglossia} {latin / missing patterns} {#1}
+ \polyglossia_latin_use_modern_patterns:
}
}
@@ -106,7 +126,8 @@
\directlua { require('polyglossia-latin') }
}
{
- \newXeTeXintercharclass \g_polyglossia_latin_punctuation_class
+ \newXeTeXintercharclass \g_polyglossia_latin_question_exclamation_class
+ \newXeTeXintercharclass \g_polyglossia_latin_colon_semicolon_class
\newXeTeXintercharclass \g_polyglossia_latin_opening_guillemet_class
\newXeTeXintercharclass \g_polyglossia_latin_closing_guillemet_class
\newXeTeXintercharclass \g_polyglossia_latin_opening_bracket_class
@@ -137,14 +158,15 @@
}
{
\XeTeXinterchartokenstate = 1
- \XeTeXcharclass `\! \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\? \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\‼ \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\⁇ \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\⁈ \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\⁉ \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\; \g_polyglossia_latin_punctuation_class
- \XeTeXcharclass `\: \g_polyglossia_latin_punctuation_class
+ \XeTeXcharclass `\! \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\? \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\‼ \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\⁇ \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\⁈ \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\⁉ \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\‽ \g_polyglossia_latin_question_exclamation_class
+ \XeTeXcharclass `\; \g_polyglossia_latin_colon_semicolon_class
+ \XeTeXcharclass `\: \g_polyglossia_latin_colon_semicolon_class
\XeTeXcharclass `\« \g_polyglossia_latin_opening_guillemet_class
\XeTeXcharclass `\» \g_polyglossia_latin_closing_guillemet_class
\XeTeXcharclass `\‹ \g_polyglossia_latin_opening_guillemet_class
@@ -158,13 +180,28 @@
\XeTeXcharclass `\⟨ \g_polyglossia_latin_opening_bracket_class
\XeTeXcharclass `\⟩ \g_polyglossia_latin_closing_bracket_class
- % punctuation followed by a closing guillemet
- \XeTeXinterchartoks \g_polyglossia_latin_punctuation_class \g_polyglossia_latin_closing_guillemet_class =
+ % question or exclamation mark followed by a closing guillemet
+ \XeTeXinterchartoks \g_polyglossia_latin_question_exclamation_class \g_polyglossia_latin_closing_guillemet_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
+ % question or exclamation mark followed by a colon or semicolon
+ \XeTeXinterchartoks \g_polyglossia_latin_question_exclamation_class \g_polyglossia_latin_colon_semicolon_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
+ % colon or semicolon followed by a closing guillemet
+ \XeTeXinterchartoks \g_polyglossia_latin_colon_semicolon_class \g_polyglossia_latin_closing_guillemet_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
+ % closing bracket followed by a question or exclamation mark
+ \XeTeXinterchartoks \g_polyglossia_latin_closing_bracket_class \g_polyglossia_latin_question_exclamation_class =
{
\polyglossia_latin_insert_punctuation_space:
}
- % closing bracket followed by punctuation
- \XeTeXinterchartoks \g_polyglossia_latin_closing_bracket_class \g_polyglossia_latin_punctuation_class =
+ % closing bracket followed by a colon or semicolon
+ \XeTeXinterchartoks \g_polyglossia_latin_closing_bracket_class \g_polyglossia_latin_colon_semicolon_class =
{
\polyglossia_latin_insert_punctuation_space:
}
@@ -178,18 +215,38 @@
{
\polyglossia_latin_replace_following_space:
}
+ % opening guillemet followed by an opening guillemet
+ \XeTeXinterchartoks \g_polyglossia_latin_opening_guillemet_class \g_polyglossia_latin_opening_guillemet_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
% opening guillemet followed by an ordinary character
\XeTeXinterchartoks \g_polyglossia_latin_opening_guillemet_class \z@ =
{
\polyglossia_latin_insert_punctuation_space:
}
- % closing guillemet followed by punctuation
- \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_punctuation_class =
+ % closing guillemet followed by a closing guillemet
+ \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_closing_guillemet_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
+ % closing guillemet followed by a question or exclamation mark
+ \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_question_exclamation_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
+ % closing guillemet followed by a colon or semicolon
+ \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_colon_semicolon_class =
{
\polyglossia_latin_insert_punctuation_space:
}
- % space followed by punctuation
- \XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_punctuation_class =
+ % space followed by a question or exclamation mark
+ \XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_question_exclamation_class =
+ {
+ \polyglossia_latin_replace_preceding_space:
+ }
+ % space followed by a colon or semicolon
+ \XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_colon_semicolon_class =
{
\polyglossia_latin_replace_preceding_space:
}
@@ -198,8 +255,13 @@
{
\polyglossia_latin_replace_preceding_space:
}
- % ordinary character followed by punctuation
- \XeTeXinterchartoks \z@ \g_polyglossia_latin_punctuation_class =
+ % ordinary character followed by a question or exclamation mark
+ \XeTeXinterchartoks \z@ \g_polyglossia_latin_question_exclamation_class =
+ {
+ \polyglossia_latin_insert_punctuation_space:
+ }
+ % ordinary character followed by a colon or semicolon
+ \XeTeXinterchartoks \z@ \g_polyglossia_latin_colon_semicolon_class =
{
\polyglossia_latin_insert_punctuation_space:
}
@@ -224,6 +286,7 @@
\XeTeXcharclass `\⁇ \z@
\XeTeXcharclass `\⁈ \z@
\XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\‽ \z@
\XeTeXcharclass `\; \z@
\XeTeXcharclass `\: \z@
\XeTeXcharclass `\« \z@
@@ -279,7 +342,9 @@
}
}
{
- \msg_warning:nn {polyglossia} {latin / ineffective footnote option}
+ \iflatin@ecclesiasticfootnotes
+ \msg_warning:nn {polyglossia} {latin / ineffective footnote option}
+ \fi
}
}
@@ -301,6 +366,8 @@
%%%%% Language variants: classic, medieval, modern, and ecclesiastic
+\str_new:N \l_polyglossia_latin_variant_str
+
\msg_new:nnn {polyglossia} {latin / language variant}
{
Activating~Latin~language~variant~"#1"~\msg_line_context:.
@@ -318,7 +385,8 @@
\bool_set_false:N \l_polyglossia_latin_use_digraphs_bool
\bool_set_true:N \l_polyglossia_latin_capitalize_month_bool
\bool_set_false:N \l_polyglossia_latin_punctuation_spacing_bool
- \SetLanguageKeys {latin} { babelname = latin.classic }
+ \str_set:Nn \l_polyglossia_latin_variant_str {classic}
+ \SetLanguageKeys {latin} { babelname = classiclatin, bcp47 = la-x-classic }
\polyglossia_latin_set_patterns:n {classiclatin}
}
@@ -329,7 +397,8 @@
\bool_set_true:N \l_polyglossia_latin_use_digraphs_bool
\bool_set_true:N \l_polyglossia_latin_capitalize_month_bool
\bool_set_false:N \l_polyglossia_latin_punctuation_spacing_bool
- \SetLanguageKeys {latin} { babelname = latin.medieval }
+ \str_set:Nn \l_polyglossia_latin_variant_str {medieval}
+ \SetLanguageKeys {latin} { babelname = medievallatin, bcp47 = la-x-medieval }
\polyglossia_latin_use_modern_patterns:
}
@@ -340,7 +409,8 @@
\bool_set_false:N \l_polyglossia_latin_use_digraphs_bool
\bool_set_true:N \l_polyglossia_latin_capitalize_month_bool
\bool_set_false:N \l_polyglossia_latin_punctuation_spacing_bool
- \SetLanguageKeys {latin} { babelname = latin }
+ \str_set:Nn \l_polyglossia_latin_variant_str {modern}
+ \SetLanguageKeys {latin} { babelname = latin, bcp47 = la }
\polyglossia_latin_use_modern_patterns:
}
@@ -351,7 +421,8 @@
\bool_set_true:N \l_polyglossia_latin_use_digraphs_bool
\bool_set_false:N \l_polyglossia_latin_capitalize_month_bool
\bool_set_true:N \l_polyglossia_latin_punctuation_spacing_bool
- \SetLanguageKeys {latin} { babelname = latin.ecclesiastic }
+ \str_set:Nn \l_polyglossia_latin_variant_str {ecclesiastic}
+ \SetLanguageKeys {latin} { babelname = ecclesiasticlatin, bcp47 = la-x-ecclesia }
\polyglossia_latin_use_modern_patterns:
}
@@ -419,7 +490,7 @@
The~Latin~hyphenation~variant~"#1"~is~undefined~\msg_line_context:.
}
-\define@key{latin}{hyphenation}
+\define@key {latin} {hyphenation}
{
\str_case:nnTF {#1}
{
@@ -518,6 +589,11 @@
{
}
+% Register default options
+\xpg@initialize@gloss@options{latin}{variant=modern,hyphenation=modern,babelshorthands=false,
+ prosodicshorthands=false,ecclesiasticfootnotes=false,
+ usej=false,capitalizemonth=true}
+
\ifsystem@babelshorthands
\setkeys{latin}{babelshorthands=true}
\else
@@ -900,7 +976,7 @@
%% Copyright (C) Claudio Beccari 2013-2016
%% Copyright (C) Élie Roux 2016-2019
-%% Copyright (C) Keno Wehr 2019
+%% Copyright (C) Keno Wehr 2019-2020
%%
%% Permission is hereby granted, free of charge, to any person obtaining
%% a copy of this software and associated documentation files
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf
index 067ee3a921b..4fd0814c0f9 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf
@@ -1,11 +1,15 @@
\ProvidesFile{gloss-latvian.ldf}[polyglossia: module for latvian]
\PolyglossiaSetup{latvian}{
+ bcp47=lv,
hyphennames={latvian},
hyphenmins={2,2},
langtag=LVI,
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{latvian}{lv}
+
\def\captionslatvian{%
\def\prefacename{Priekšvārds}%
\def\refname{Literatūras saraksts}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
index 3d8ead44857..208fcad25ed 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
@@ -2,6 +2,7 @@
\ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian]
\PolyglossiaSetup{lithuanian}{
+ bcp47=lt,
hyphennames={lithuanian},
hyphenmins={2,2},
langtag=LTH,
@@ -9,6 +10,9 @@
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{lithuanian}{lt}
+
\def\captionslithuanian{%
\def\prefacename{Pratarmė}%
\def\refname{Literatūra}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-lo.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lo.ldf
new file mode 100644
index 00000000000..8f8769538d1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lo.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-lo.ldf}[polyglossia: module for lo (lao)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{lao}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-lt.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lt.ldf
new file mode 100644
index 00000000000..cf51eee41a6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lt.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-lt.ldf}[polyglossia: module for lt (lithuanian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{lithuanian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-lv.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lv.ldf
new file mode 100644
index 00000000000..bd85f60c176
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lv.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-lv.ldf}[polyglossia: module for lv (latvian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latvian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-macedonian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-macedonian.ldf
index 95924c51c5b..4475b92a973 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-macedonian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-macedonian.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-macedonian.ldf}[polyglossia: module for macedonian]
\PolyglossiaSetup{macedonian}{
+ bcp47=mk,
script=Cyrillic,
scripttag=cyrl,
langtag=MKD,
@@ -9,6 +10,9 @@
fontsetup
}
+% BCP-47 compliant aliases
+\setlanguagealias*{macedonian}{mk}
+
\def\macedonian@Alph#1{%
\ifcase#1\or
А\or Б\or В\or Г\or Д\or Ѓ\or Е\or
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf
index 819dbf31469..be81a5829fd 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf
@@ -3,11 +3,17 @@
\RequirePackage{hijrical}
\PolyglossiaSetup{malay}{%
+ bcp47=id,
language=Malay,
langtag=MLY,
hyphennames={malay,melayu,bahasam,bahasai,indonesian,indon,bahasa},
hyphenmins={2,2},
- fontsetup=true}
+ fontsetup=true
+}
+
+% BCP-47 compliant aliases
+\setlanguagealias*[variant=malaysian]{malay}{zsm}
+\setlanguagealias*[variant=indonesian]{malay}{id}
% Babel aliases
\setlanguagealias[variant=indonesian]{malay}{bahasai}
@@ -30,7 +36,7 @@
\malay@melayutrue
\fi
\ifmalay@melayu
- \SetLanguageKeys{malay}{language=Malay,langtag=MLY,babelname=bahasam}%
+ \SetLanguageKeys{malay}{language=Malay,langtag=MLY,babelname=bahasam,bcp47=zsm}%
\xpg@fontsetup@latin{malay}%
% Check if \l@malay is defined. If not, try to set it to some variety
% (specific order as in the csv list below), or null language if everything fails
@@ -48,7 +54,7 @@
}%
}%
\else
- \SetLanguageKeys{malay}{language=Indonesian,langtag=IND,babelname=bahasa}%
+ \SetLanguageKeys{malay}{language=Indonesian,langtag=IND,babelname=bahasa,bcp47=id}%
\xpg@fontsetup@latin{malay}%
% Check if \l@indonesian is defined. If not, try to set it to some variety
% (specific order as in the csv list below), or null language if everything fails
@@ -69,6 +75,9 @@
\xpg@info{Option: malay, variant=\val}%
}{\xpg@warning{Unknown malay variant `#1'}}
+% Register default options
+\xpg@initialize@gloss@options{malay}{variant=malaysian}
+
\def\malay@language{%
\polyglossia@setup@language@patterns{\malay@variant}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf
index bb5dcffbdec..c8ed7780207 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf
@@ -8,6 +8,7 @@ and may look very wrong.}
% Translations provided by Kevin & Siji, 01-11-2009
\PolyglossiaSetup{malayalam}{
+ bcp47=ml,
script=Malayalam,
scripttag=mlym,
langtag=MAL, %FIXME there is also MLR for "Malayalam Reformed"
@@ -16,6 +17,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{malayalam}{ml}
+
\def\captionsmalayalam{%
\def\abstractname{സാരാംശം}%
\def\appendixname{ശിഷ്ടം}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
index 645e7275a58..b644a43d5de 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
@@ -1,4 +1,5 @@
% Translations provided by Abhijit Navale <abhi_navale@live.in>
+% Ordinals (1-100) added by Niranjan Tambe <niranjanvikastambe@gmail.com> on 14th December, 2019
% TODO implement Hindu calendar (not used in day-to-day practice)
\ProvidesFile{gloss-marathi.ldf}[polyglossia: module for marathi]
@@ -11,6 +12,7 @@ and may look very wrong.}
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{marathi}{
+ bcp47=mr,
script=Devanagari,
scripttag=deva,
langtag=MAR,
@@ -21,15 +23,25 @@ and may look very wrong.}
%TODO nouppercase=true,
}
-\def\tmp@western{Western}
+% BCP-47 compliant aliases
+\setlanguagealias*{marathi}{mr}
+
\newif\ifmarathi@devanagari@numerals
\marathi@devanagari@numeralstrue
-\define@key{marathi}{numerals}[Devanagari]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@western
- \marathi@devanagari@numeralsfalse
- \fi}
+\define@choicekey*+{marathi}{numerals}[\val\nr]{Western,Devanagari}[Devanagari]{%
+ \ifcase\nr\relax
+ % Western:
+ \marathi@devanagari@numeralsfalse%
+ \or
+ % Devanagari:
+ \marathi@devanagari@numeralstrue%
+ \fi
+ \xpg@info{Option: Marathi, numerals=\val}%
+}{\xpg@warning{Unknown Marathi numerals value `#1'}}
+
+% Register default options
+\xpg@initialize@gloss@options{marathi}{numerals=Devanagari}
\newcommand{\marathinumerals}[2]{\marathinumber{#2}}
@@ -38,50 +50,105 @@ and may look very wrong.}
\devanagaridigits{\number#1}%
\else
\number#1%
- \fi}
+ \fi%
+}
\def\captionsmarathi{%
\def\refname{संदर्भ}%
\def\abstractname{सारांश}%
- \def\bibname{संदर्भ ग्रंथांची यादी}%
+ \def\bibname{संदर्भसूची}%
\def\prefacename{प्रस्तावना}%
\def\chaptername{प्रकरण}%
\def\appendixname{परिशिष्ट}%
\def\contentsname{अनुक्रमणिका}%
- \def\listfigurename{आकृत्यांची यादी}%
- \def\listtablename{कोष्टकांची यादी}%
+ \def\listfigurename{आकृत्यांची सूची}%
+ \def\listtablename{कोष्टक सूची}%
\def\indexname{सूची}%
\def\figurename{आकृती}%
\def\tablename{कोष्टक}%
- %\def\thepart{}% TODO
- \def\partname{भाग}%
- \def\pagename{पान}%
- \def\seename{पहा}%
- \def\alsoname{हे सुध्दा पहा}%
+ \def\partname{खंड}%
+ \def\pagename{पृष्ठ}%
+ \def\seename{पाहा}%
+ \def\alsoname{हेदेखील पाहा}%
\def\enclname{समाविष्ट}%
- \def\ccname{सि.सि.}%
+ \def\ccname{सी.सी.}%
\def\headtoname{प्रति}%
\def\proofname{सिद्धता}%
- \def\glossaryname{स्पष्टीकरणांची यादी}%
+ \def\glossaryname{संक्षेपसूची}%
\def\authorsand{आणि}%
}
+
\def\datemarathi{%
\def\marathimonth{%
\ifcase\month\or
- जानेवारी\or
- फेब्रुवारी\or
- मार्च\or
- एप्रिल\or
- मे\or
- जून\or
- जुलै\or
- ऑगस्ट\or
- सप्टेंबर\or
- ऑक्टोबर\or
- नोव्हेंबर\or
- डिसेंबर\fi
+ जानेवारी\or
+ फेब्रुवारी\or
+ मार्च\or
+ एप्रिल\or
+ मे\or
+ जून\or
+ जुलै\or
+ ऑगस्ट\or
+ सप्टेंबर\or
+ ऑक्टोबर\or
+ नोव्हेंबर\or
+ डिसेंबर%
+ \fi%
+ }%
+ \def\today{%
+ \marathinumber\day\space\marathimonth\space\marathinumber\year%
}%
- \def\today{\marathinumber\day\space\marathimonth\space\marathinumber\year}%
+}
+
+\def\devanagari@akshar#1{\ifcase#1\or अ\or आ\or इ\or ई\or उ\or ऊ\or ए\or ऐ\or ओ\or औ\or अं\or अः\else\@ctrerr\fi}
+
+\def\devanagari@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 ष\or स\or ह\or ळ\else\@ctrerr%
+ \fi%
+}
+
+\def\devanagari@letter#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 सत्तेचाळीस \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 त्र्याण्णव \or चौऱ्याण्णव \or पंच्याण्णव \or शहाण्णव \or सत्याण्णव \or अठ्याण्णव %
+ \or नव्याण्णव \or शंभर\else\@ctrerr%
+ \fi%
+}
+
+\let\xpg@save@roman\@roman
+\let\xpg@save@Roman\@Roman
+
+\def\marathi@numbers{%
+ \let\@alph\devanagari@akshar
+ \let\@Alph\devanagari@letter
+ \let\@roman\devanagari@alph
+ \let\@Roman\devanagari@letter
+}
+
+\def\nomarathi@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+ \let\@roman\xpg@save@roman
+ \let\@Roman\xpg@save@Roman
+}
+
+\def\blockextras@marathi{%
+ \let\xpg@orig@baselinestretch\baselinestrech%
+ \renewcommand{\baselinestretch}{1.2}%
+ \renewcommand{\labelitemii}{$\rightarrow$}%
+}
+
+\let\xpg@orig@labelitemii\labelitemii
+
+\def\noextras@marathi{%
+ \let\baselinestrech\xpg@orig@baselinestretch%
+ \let\labelitemii\xpg@orig@labelitemii%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-mk.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-mk.ldf
new file mode 100644
index 00000000000..c6caa3ac116
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-mk.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-mk.ldf}[polyglossia: module for mk (macedonian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{macedonian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ml.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ml.ldf
new file mode 100644
index 00000000000..ed151363ec3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ml.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-ml.ldf}[polyglossia: module for ml (malayalam)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{malayalam}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-mn.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-mn.ldf
new file mode 100644
index 00000000000..9350dd8660d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-mn.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-mn.ldf}[polyglossia: module for mn (mongolian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{mongolian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf
index 0d6f896fb35..dd113a2fabc 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf
@@ -3,6 +3,7 @@
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{mongolian}{
+ bcp47=mn,
script=Cyrillic,
scripttag=cyrl,
langtag=MNG,
@@ -14,6 +15,9 @@
Localnumeral=Mongoliannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{mongolian}{mn}
+
% This file is derived from mongolian-babel. which
% provides support for Mongolian (Khalkha variety)
% with Cyrillic script
@@ -21,15 +25,32 @@
% variants of Mongolian
\newif\ifcyrillic@numerals
-\define@key{mongolian}{numerals}[arabic]{%
- \ifstrequal{#1}{cyrillic}%
- {\cyrillic@numeralstrue}%
- {\cyrillic@numeralsfalse}%
-}
+\newif\ifcyrillic@asbuk@numerals
+\define@choicekey*+{mongolian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\nr\relax
+ % arabic:
+ \cyrillic@numeralsfalse%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-trad:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-alph:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralstrue%
+ \fi
+ \xpg@info{Option: Mongolian, numerals=\val}%
+}{\xpg@warning{Unknown Mongolian numerals value `#1'}}
-\define@boolkey{mongolian}[mongolian@]{babelshorthands}[false]{}
+\define@boolkey{mongolian}[mongolian@]{babelshorthands}[true]{}
-\setkeys{mongolian}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{mongolian}{babelshorthands=false,numerals=arabic}
\ifsystem@babelshorthands
\setkeys{mongolian}{babelshorthands=true}
@@ -124,7 +145,11 @@
\def\mongoliannumber#1{%
\ifcyrillic@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \mongolian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -132,7 +157,11 @@
\def\Mongoliannumber#1{%
\ifcyrillic@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \mongolian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -141,24 +170,29 @@
\let\mongoliannumeral=\mongoliannumber
\let\Mongoliannumeral=\Mongoliannumber
-\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\Asbuk#1{\expandafter\mongolian@asbuk@Alph\csname c@#1\endcsname}
+\def\asbuk#1{\expandafter\mongolian@asbuk@alph\csname c@#1\endcsname}
-\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname}
+\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname}
% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
-% thus ends at 30. We now use proper cyrillic numbering.
-
-%\def\mongolian@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}{mongolian@Alph}\fi}
-
-%\def\mongolian@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}{mongolian@alph}\fi}
+% thus ends at 30.
+\def\mongolian@asbuk@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}{mongolian@asbuk@Alph}\fi%
+}
+
+\def\mongolian@asbuk@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}{mongolian@asbuk@alph}\fi%
+}
\def\mongolian@numbers{%
\let\latin@alph\@alph
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-mr.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-mr.ldf
new file mode 100644
index 00000000000..f127d254d19
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-mr.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-mr.ldf}[polyglossia: module for mr (marathi)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{marathi}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-nb.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-nb.ldf
new file mode 100644
index 00000000000..645e092d734
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-nb.ldf
@@ -0,0 +1,7 @@
+\ProvidesFile{gloss-nb.ldf}[polyglossia: module for nb (norwegian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{norwegian}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-nko.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-nko.ldf
index f69b4e138d3..d432a7b5bfd 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-nko.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-nko.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-nko.ldf}[Polyglossia: module for N’Ko v0.1 2013/05/19]
\PolyglossiaSetup{nko}{%
+ bcp47=nko,
script=N'ko,
scripttag=nko~,
langtag=NKO,
@@ -8,6 +9,7 @@
direction=RL,
localnumeral=nkonumerals
}
+
\RequirePackage{nkonumbers}%
\newcommand{\nkonumerals}[2]{\nkonumber{#2}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf
index f06119053d0..a8d7a857847 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-norwegian.ldf}[polyglossia: module for norwegian]
\PolyglossiaSetup{norwegian}{
+ bcp47=nn,
hyphennames={nynorsk},
langtag=NYN,
hyphenmins={2,2},
@@ -7,6 +8,9 @@
fontsetup=false,
}
+% BCP-47 compliant aliases
+\setlanguagealias*[variant=bokmal]{norwegian}{nb}
+\setlanguagealias*[variant=nynorsk]{norwegian}{nn}
% Babel and backwards compat. aliases
\setlanguagealias[variant=bokmal]{norwegian}{norsk}
\setlanguagealias[variant=nynorsk]{norwegian}{nynorsk}
@@ -16,20 +20,24 @@
\ifcase\nr\relax
% nynorsk:
\def\norwegian@variant{nynorsk}%
- \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk}%
+ \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn}%
\xpg@fontsetup@latin{norwegian}%
\or
% bokmal:
\def\norwegian@variant{norsk}%
- \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk}%
+ \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb}%
\xpg@fontsetup@latin{norwegian}%
\fi
\xpg@info{Option: norwegian, variant=\val}%
}{\xpg@warning{Unknown norwegian variant `#1'}}
+% Register default options
+\xpg@initialize@gloss@options{norwegian}{variant=nynorsk}
+
+
\def\norwegian@language{%
- \polyglossia@setup@language@patterns{\norwegian@variant}
+ \polyglossia@setup@language@patterns{\norwegian@variant}%
}%
\def\captionsnorwegian@nynorsk{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf
index 9b505b7010b..b494272b0d8 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf
@@ -18,6 +18,7 @@
\ProvidesFile{gloss-occitan.ldf}[2016/02/04 v0.3 polyglossia:
module for Occitan]
\PolyglossiaSetup{occitan}{
+ bcp47=oc,
hyphennames={occitan},
langtag=OCI,
hyphenmins={2,2},
@@ -25,6 +26,10 @@
indentfirst=true,
fontsetup=true,
}
+
+% BCP-47 compliant aliases
+\setlanguagealias*{occitan}{oc}
+
\define@boolkey{occitan}[occitan@]{babelshorthands}[true]{}
\ifsystem@babelshorthands
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-persian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-persian.ldf
index 6dc2c72a0b6..6d6f60c2e6f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-persian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-persian.ldf
@@ -10,6 +10,7 @@ and may look very wrong.}
\RequirePackage{farsical}
\RequirePackage{hijrical}
\PolyglossiaSetup{persian}{
+ bcp47=fa,
babelname=farsi,
script=Arabic,
direction=RL,
@@ -20,6 +21,9 @@ and may look very wrong.}
localnumeral=farsinumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{persian}{fa}
+
% Babel and backwards compat. alias
\setlanguagealias{persian}{farsi}
@@ -46,7 +50,8 @@ and may look very wrong.}
%TODO add option for CALENDAR
-\setkeys{persian}{locale,numerals}
+% Register default options
+\xpg@initialize@gloss@options{persian}{locale=default,numerals=eastern,abjadjimnotail=false}
\def\farsigregmonth#1{\ifcase#1%
\or ژانویه\or فوریه\or مارس\or آوریل\or مه\or ژوئن\or ژوئیه\or اوت\or سپتامبر\or اکتبر\or نوامبر\or دسامبر\fi}
@@ -87,28 +92,13 @@ and may look very wrong.}
\newcommand{\farsinumerals}[2]{\farsinumber{#2}}
-\newif\ifpersiandigits
-
\def\farsinumber#1{%
\if@western@numerals
\number#1%
\else
- \ifxetex
- \ifnum\XeTeXcharglyph"06F0 > 0\relax
- \persiandigitstrue
- \fi
- \else\ifluatex
- \expandafter\ifnum\directlua{polyglossia.check_char(0x6F0)} > 0\relax
- \persiandigitstrue
- \fi
- \fi\fi
- \ifpersiandigits
- \farsidigits{\number#1}%
- %%{\protect\addfontfeature{Mapping=farsidigits}\number#1}%
- \else%
- \arabicdigits{\number#1}%
- %%{\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
- \fi
+ \xpg@if@char@available{06F0}%
+ {\farsidigits{\number#1}}%
+ {\arabicdigits{\number#1}}%
\fi
}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf
index 4474c8a99e2..536ff648efb 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf
@@ -2,6 +2,7 @@
\ProvidesFile{gloss-piedmontese.ldf}[2013/02/12 v1.0 polyglossia: module for piedmontese]
\makeatletter
\PolyglossiaSetup{piedmontese}{
+ bcp47=pms,
hyphennames={piedmontese},
hyphenmins={2,2},
langtag=PMS,
@@ -9,6 +10,8 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{piedmontese}{pms}
\define@boolkey{piedmontese}[piedmontese@]{babelshorthands}[true]{}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
index ef773026692..0649d087a92 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
@@ -1,5 +1,6 @@
\ProvidesFile{gloss-polish.ldf}[polyglossia: module for polish]
\PolyglossiaSetup{polish}{
+ bcp47=pl,
hyphennames={polish},
hyphenmins={2,2},
langtag=PLK,
@@ -7,6 +8,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{polish}{pl}
+
\def\captionspolish{%
\def\prefacename{Przedmowa}%
\def\refname{Literatura}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf
index 2463006cc67..1196bc4075f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-portuguese.ldf}[polyglossia: module for portuguese]
\PolyglossiaSetup{portuguese}{
+ bcp47=pt-PT,
babelname=portuges,
hyphennames={portuges,portuguese},
hyphenmins={2,3},
@@ -8,6 +9,11 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*[variant=portuguese]{portuguese}{pt-PT}
+\setlanguagealias*[variant=brazilian]{portuguese}{pt-BR}
+\setlanguagealias*{portuguese}{pt}
+
% Babel aliases
\setlanguagealias[variant=portuguese]{portuguese}{portuges}
\setlanguagealias[variant=brazilian]{portuguese}{brazil}
@@ -17,11 +23,11 @@
\ifcase\nr\relax
% portuguese:
\def\portuguese@variant{portuges}%
- \SetLanguageKeys{portuguese}{babelname=portuges}%
+ \SetLanguageKeys{portuguese}{babelname=portuges,bcp47=pt-PT}%
\or
% brazilian:
\def\portuguese@variant{brazil}%
- \SetLanguageKeys{portuguese}{babelname=brazil}%
+ \SetLanguageKeys{portuguese}{babelname=brazil,bcp47=pt-BR}%
\xpg@ifdefined{brazil}{}%
{\xpg@warning{No hyphenation patterns were loaded for "Portuguese (Brazil)"\MessageBreak
I will use the standard patterns for Portuguese instead}%
@@ -31,8 +37,12 @@
}{\xpg@warning{Unknown portuguese variant `#1'}}
+% Register default options
+\xpg@initialize@gloss@options{portuguese}{variant=portuguese}
+
+
\def\portuguese@language{%
- \polyglossia@setup@language@patterns{\portuguese@variant}
+ \polyglossia@setup@language@patterns{\portuguese@variant}%
}%
\def\captionsportuguese@portuges{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf
index 32077a02e11..8ec2dc7f1f2 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf
@@ -1,12 +1,16 @@
\ProvidesFile{gloss-romanian.ldf}[polyglossia: module for romanian]
\PolyglossiaSetup{romanian}{
+ bcp47=ro,
hyphennames={romanian},
hyphenmins={2,2},
langtag=ROM,
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{romanian}{ro}
+
\def\captionsromanian{%
\def\refname{Bibliografie}%
\def\abstractname{Rezumat}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf
index 8557016adef..c0505706b40 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-romansh.ldf}[polyglossia: module for romansh]
\makeatletter
\PolyglossiaSetup{romansh}{%
+ bcp47=rm,
hyphennames={romansh},
hyphenmins={2,2},
langtag=RMS,
@@ -8,6 +9,8 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{romansh}{rm}
\def\captionsromansh{%
\def\prefacename{Prefaziun}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
index f638bdbf7d8..0088a6438df 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
@@ -3,6 +3,7 @@
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{russian}{
+ bcp47=ru,
script=Cyrillic,
scripttag=cyrl,
langtag=RUS,
@@ -15,11 +16,16 @@
Localnumeral=Russiannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{russian}{ru}
+\setlanguagealias*[spelling=modern]{russian}{ru-luna1918}
+\setlanguagealias*[spelling=old]{russian}{ru-petr1708}
+
\newif\if@russian@modern
\define@key{russian}{spelling}[modern]{%
\ifstrequal{#1}{old}%
- {\@russian@modernfalse}%
- {\@russian@moderntrue}%
+ {\@russian@modernfalse\SetLanguageKeys{russian}{bcp47=ru-petr1708}}%
+ {\@russian@moderntrue\SetLanguageKeys{russian}{bcp47=ru}}%
}
\def\captionsrussian{%
@@ -31,13 +37,29 @@
}%
\newif\ifcyrillic@numerals
-\define@key{russian}{numerals}[arabic]{%
- \ifstrequal{#1}{cyrillic}%
- {\cyrillic@numeralstrue}%
- {\cyrillic@numeralsfalse}%
-}
+\newif\ifcyrillic@asbuk@numerals
+\define@choicekey*+{russian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\nr\relax
+ % arabic:
+ \cyrillic@numeralsfalse%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-trad:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-alph:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralstrue%
+ \fi
+ \xpg@info{Option: Russian, numerals=\val}%
+}{\xpg@warning{Unknown Russian numerals value `#1'}}
-\define@boolkey{russian}[russian@]{indentfirst}{
+\define@boolkey{russian}[russian@]{indentfirst}[true]{
\ifrussian@indentfirst
\SetLanguageKeys{russian}{indentfirst=true}
\else
@@ -45,9 +67,12 @@
\fi
}
-\define@boolkey{russian}[russian@]{babelshorthands}[false]{}
+\define@boolkey{russian}[russian@]{babelshorthands}[true]{}
+
+
+% Register default options
+\xpg@initialize@gloss@options{russian}{babelshorthands=false,spelling=modern,numerals=arabic,indentfirst=false}
-\setkeys{russian}{spelling,numerals}
\ifsystem@babelshorthands
\setkeys{russian}{babelshorthands=true}
@@ -231,7 +256,11 @@
\def\russiannumber#1{%
\ifcyrillic@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \russian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -239,7 +268,11 @@
\def\Russiannumber#1{%
\ifcyrillic@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \russian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -248,24 +281,30 @@
\let\russiannumeral=\russiannumber
\let\Russiannumeral=\Russiannumber
-\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\Asbuk#1{\expandafter\russian@asbuk@Alph\csname c@#1\endcsname}
+\def\asbuk#1{\expandafter\russian@asbuk@alph\csname c@#1\endcsname}
-\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname}
+\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname}
-% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
-% thus ends at 30. We now use proper cyrillic numbering.
-%\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}
+% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
+% thus ends at 30.
+\def\russian@asbuk@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@asbuk@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@asbuk@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@asbuk@alph}\fi%
+}
\def\russian@numbers{%
\let\latin@alph\@alph
@@ -273,8 +312,8 @@
\ifcyrillic@numerals%
\def\russian@alph##1{\expandafter\russiannumeral\expandafter{\the##1}}%
\def\russian@Alph##1{\expandafter\Russiannumeral\expandafter{\the##1}}%
- \let\@alph\russian@alph%
- \let\@Alph\russian@Alph%
+ \let\@alph\russian@alph%
+ \let\@Alph\russian@Alph%
\fi
}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf
index 991755d309d..2e30cd953ed 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-sami.ldf}[polyglossia: module for sami]
\PolyglossiaSetup{sami}{
+ bcp47=se,
babelname=samin,
hyphennames={samin},
hyphenmins={2,2},
@@ -9,6 +10,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{sami}{se}
+
% Babel and backwards compat. alias
\setlanguagealias{sami}{samin}
%\setlanguagealias[variant=northern]{sami}{samin}
@@ -32,7 +36,7 @@
%\def\sami@language{%
-% \polyglossia@setup@language@patterns{\sami@variant}
+% \polyglossia@setup@language@patterns{\sami@variant}%
%}%
\def\captionssami@northern{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
index 7d38e3b0b7d..daa34b398d2 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
@@ -9,6 +9,7 @@ and may look very wrong.}
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{sanskrit}{
+ bcp47=sa-Deva,
langtag=SAN,
hyphennames={sanskrit,prakrit},
hyphenmins={1,3},
@@ -17,6 +18,16 @@ and may look very wrong.}
localnumeral=sanskritnumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{sanskrit}{sa}
+\setlanguagealias*[script=Devanagari]{sanskrit}{sa-Deva}
+\setlanguagealias*[script=Malayalam]{sanskrit}{sa-Mlym}
+\setlanguagealias*[script=Telugu]{sanskrit}{sa-Telu}
+\setlanguagealias*[script=Bengali]{sanskrit}{sa-Beng}
+\setlanguagealias*[script=Kannada]{sanskrit}{sa-Knda}
+\setlanguagealias*[script=Gujarati]{sanskrit}{sa-Gujr}
+\setlanguagealias*[script=Latin]{sanskrit}{sa-Latn}
+
\define@key{sanskrit}{Script}[Devanagari]{%
\ifcsdef{fontsetup@sanskrit@#1}%
{\csname fontsetup@sanskrit@#1\endcsname}%
@@ -27,29 +38,27 @@ and may look very wrong.}
\define@key{sanskrit}{script}[Devanagari]{\setkeys{sanskrit}{Script=#1}}
\def\fontsetup@sanskrit@Devanagari{%
- \SetLanguageKeys{sanskrit}{scripttag=deva,script=Devanagari}
+ \SetLanguageKeys{sanskrit}{scripttag=deva,script=Devanagari,bcp47=sa-Deva}
\xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Gujarati{%
- \SetLanguageKeys{sanskrit}{scripttag=gujr,script=Gujarati}
+ \SetLanguageKeys{sanskrit}{scripttag=gujr,script=Gujarati,bcp47=sa-Gujr}
\xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Malayalam{%
- \SetLanguageKeys{sanskrit}{scripttag=mlym,script=Malayalam}
+ \SetLanguageKeys{sanskrit}{scripttag=mlym,script=Malayalam,bcp47=sa-Mlym}
\xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Bengali{%
- \SetLanguageKeys{sanskrit}{scripttag=beng,script=Bengali}
+ \SetLanguageKeys{sanskrit}{scripttag=beng,script=Bengali,bcp47=sa-Beng}
\xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Kannada{%
- \SetLanguageKeys{sanskrit}{scripttag=knda,script=Kannada}
+ \SetLanguageKeys{sanskrit}{scripttag=knda,script=Kannada,bcp47=sa-Knda}
\xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Telugu{%
- \SetLanguageKeys{sanskrit}{scripttag=telu,script=Telugu}
+ \SetLanguageKeys{sanskrit}{scripttag=telu,script=Telugu,bcp47=sa-Relu}
\xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Latin{%
- \SetLanguageKeys{sanskrit}{scripttag=latn,script=Latin}
+ \SetLanguageKeys{sanskrit}{scripttag=latn,script=Latin,bcp47=sa-Latn}
\xpg@fontsetup@latin{sanskrit}}
-\setkeys{sanskrit}{Script} %sets the default for Devanagari
-
\newif\ifsanskrit@devanagari@numerals
\sanskrit@devanagari@numeralstrue
@@ -65,6 +74,10 @@ and may look very wrong.}
}{\xpg@warning{Unknown Sanskrit numeral `#1'}}
+% Register default options
+\xpg@initialize@gloss@options{sanskrit}{script=Devanagari,numerals=Devanagari}
+
+
\newcommand{\sanskritnumerals}[2]{\sanskritnumber{#2}}
\def\sanskritnumber#1{%
@@ -78,7 +91,8 @@ and may look very wrong.}
\ifluatex
\directlua{require('polyglossia-sanskrit')}%
\else
- \newXeTeXintercharclass\sanskrit@punctthin % ! ? ‼ ⁇ ⁈ ⁉ : ; danda double_danda
+ \newXeTeXintercharclass\sanskrit@questionexclamation % ! ? ‼ ⁇ ⁈ ⁉ ‽
+ \newXeTeXintercharclass\sanskrit@punctthin % : ; danda double_danda
\fi
\def\sanskrit@punctthinspace{{\unskip\thinspace}}
@@ -88,17 +102,20 @@ and may look very wrong.}
\directlua{polyglossia.activate_sanskrit_punct()}%
\else
\XeTeXinterchartokenstate=1%
- \XeTeXcharclass `\! \sanskrit@punctthin
- \XeTeXcharclass `\? \sanskrit@punctthin
- \XeTeXcharclass `\‼ \sanskrit@punctthin
- \XeTeXcharclass `\⁇ \sanskrit@punctthin
- \XeTeXcharclass `\⁈ \sanskrit@punctthin
- \XeTeXcharclass `\⁉ \sanskrit@punctthin
+ \XeTeXcharclass `\! \sanskrit@questionexclamation
+ \XeTeXcharclass `\? \sanskrit@questionexclamation
+ \XeTeXcharclass `\‼ \sanskrit@questionexclamation
+ \XeTeXcharclass `\⁇ \sanskrit@questionexclamation
+ \XeTeXcharclass `\⁈ \sanskrit@questionexclamation
+ \XeTeXcharclass `\⁉ \sanskrit@questionexclamation
+ \XeTeXcharclass `\‽ \sanskrit@questionexclamation % interrobang, U+203D
\XeTeXcharclass `\: \sanskrit@punctthin
\XeTeXcharclass `\; \sanskrit@punctthin
\XeTeXcharclass `\। \sanskrit@punctthin % danda, U+0964
\XeTeXcharclass `\॥ \sanskrit@punctthin % double danda, U+0965
+ \XeTeXinterchartoks \z@ \sanskrit@questionexclamation = \sanskrit@punctthinspace
\XeTeXinterchartoks \z@ \sanskrit@punctthin = \sanskrit@punctthinspace
+ \XeTeXinterchartoks \sanskrit@questionexclamation \sanskrit@punctthin = \sanskrit@punctthinspace
\fi
}
@@ -112,6 +129,7 @@ and may look very wrong.}
\XeTeXcharclass `\⁇ \z@
\XeTeXcharclass `\⁈ \z@
\XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\‽ \z@
\XeTeXcharclass `\: \z@
\XeTeXcharclass `\; \z@
\XeTeXcharclass `\। \z@
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
index b06adb1f46d..11c774e5fe1 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
@@ -7,6 +7,7 @@
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{serbian}{
+ bcp47=sr-Latn,
langtag=SRB,
hyphennames={serbian},
hyphenmins={2,2},
@@ -17,6 +18,11 @@
%TODO localalph
}
+% BCP-47 compliant aliases
+\setlanguagealias*{serbian}{sr}
+\setlanguagealias*[script=Cyrillic]{serbian}{sr-Cyrl}
+\setlanguagealias*[script=Latin]{serbian}{sr-Latn}
+
% Babel aliases
\setlanguagealias[script=Cyrillic]{serbian}{serbianc}
@@ -25,12 +31,12 @@
\ifcase\nr\relax
% cyrillic:
\@serbian@cyrtrue
- \SetLanguageKeys{serbian}{scripttag=cyrl,script=Cyrillic,babelname=serbianc}
+ \SetLanguageKeys{serbian}{scripttag=cyrl,script=Cyrillic,babelname=serbianc,bcp47=sr-Cyrl}
\xpg@fontsetup@nonlatin{serbian}%
\or
% latin:
\@serbian@cyrfalse
- \SetLanguageKeys{serbian}{scripttag=latn,script=Latin}
+ \SetLanguageKeys{serbian}{scripttag=latn,script=Latin,bcp47=sr-Latn}
\xpg@fontsetup@latin{serbian}%
%TODO \def\serbian@language{\language=\l@serbianlat}%
% or should we use Croatian patterns as a fallback for the time being???
@@ -40,17 +46,34 @@
\define@key{serbian}{script}[Cyrillic]{\setkeys{serbian}{Script=#1}}
-\newif\ifserbian@numerals
-\define@key{serbian}{numerals}[arabic]{%
- \ifstrequal{#1}{latin}{\serbian@numeralsfalse}{%
- \ifstrequal{#1}{cyrillic}%
- {\serbian@numeralstrue}
- {\serbian@numeralsfalse}%
- }%
-}
+\newif\ifcyrillic@numerals
+\newif\ifcyrillic@asbuk@numerals
+\define@choicekey*+{serbian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\nr\relax
+ % arabic:
+ \cyrillic@numeralsfalse%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-trad:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-alph:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralstrue%
+ \fi
+ \xpg@info{Option: Serbian, numerals=\val}%
+}{\xpg@warning{Unknown Serbian numerals value `#1'}}
\setkeys{serbian}{Script,numerals}
+% Register default options
+\xpg@initialize@gloss@options{serbian}{script=Cyrillic,numerals=arabic}
+
\def\captionsserbian{%
\if@serbian@cyr\captionsserbian@cyr\else\captionsserbian@lat\fi
}
@@ -135,19 +158,27 @@
\newcommand{\Serbiannumerals}[2]{\Serbiannumber{#2}}
\def\serbiannumber#1{%
- \ifserbian@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@numerals
+ \ifcyrillic@asbuk@numerals
+ \serbian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
- \fi
+ \fi%
}
\def\Serbiannumber#1{%
- \ifserbian@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@numerals
+ \ifcyrillic@asbuk@numerals
+ \serbian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
- \fi
+ \fi%
}
\let\serbiannumeral=\serbiannumber
@@ -177,24 +208,29 @@
\ifserbian@numerals\noserbian@numbers\fi
}
-\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\Asbuk#1{\expandafter\serbian@asbuk@Alph\csname c@#1\endcsname}
+\def\asbuk#1{\expandafter\serbian@asbuk@alph\csname c@#1\endcsname}
-\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname}
+\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname}
% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
-% thus ends at 30. We now use proper cyrillic numbering.
-
-%\def\cyr@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 Ш\else\xpg@ill@value{#1}{cyr@Alph}\fi}
-
-%\def\cyr@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 ш\else\xpg@ill@value{#1}{cyr@alph}\fi}
+% thus ends at 30.
+\def\serbian@asbuk@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}{serbian@asbuk@Alph}\fi%
+}
+
+\def\serbian@asbuk@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}{serbian@asbuk@alph}\fi%
+}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
index 417e43ba52b..51ca090ff0d 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
@@ -1,12 +1,16 @@
\ProvidesFile{gloss-slovak.ldf}[polyglossia: module for slovak]
\PolyglossiaSetup{slovak}{
+ bcp47=sk,
hyphennames={slovak},
hyphenmins={2,2},
langtag=SKY,
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{slovak}{sk}
+
\ifluatex
\RequirePackage{luavlna}
\fi
@@ -17,7 +21,8 @@
\define@boolkey{slovak}[slovak@]{vlna}[true]{}
-\setkeys{slovak}{splithyphens,vlna}
+% Register default options
+\xpg@initialize@gloss@options{slovak}{babelshorthands=false,splithyphens=true,vlna=true}
\ifsystem@babelshorthands
\setkeys{slovak}{babelshorthands=true}
@@ -32,8 +37,12 @@
}{}
\def\slovak@@splhyphen#1{%
- \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
- \nobreak\hskip\z@%
+ \ifnum\hyphenchar \font>0%
+ \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
+ \nobreak\hskip\z@%
+ \else%
+ #1%
+ \fi%
}
\def\slovak@splhyphen{%
@@ -220,13 +229,13 @@
\def\blockextras@slovak{%
\ifslovak@babelshorthands\slovak@shorthands\fi%
\ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
- \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyhens\fi%
+ \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi%
}
\def\inlineextras@slovak{%
\ifslovak@babelshorthands\slovak@shorthands\fi%
\ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
- \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyhens\fi%
+ \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
index 16874a82c37..69be79667b4 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for slovenian]
\PolyglossiaSetup{slovenian}{
+ bcp47=sl,
hyphennames={slovenian,slovene},
babelname=slovene,
hyphenmins={2,2},
@@ -8,18 +9,16 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{slovenian}{sl}
+
% Babel aliases
\setlanguagealias{slovenian}{slovene}
-\providebool{slovenian@localalph}
-\define@boolkey{slovenian}[slovenian@]{localalph}[false]{%
- \def\@tmpa{#1}%
- \def\@tmptrue{true}%
- \ifx\@tmpa\@tmptrue
- \slovenian@localalphtrue
- \fi
- \setlocalalph
-}
+\define@boolkey{slovenian}[slovenian@]{localalph}[true]{}
+
+% Register default options
+\xpg@initialize@gloss@options{slovenian}{localalph=false}
\def\captionsslovenian{%
@@ -45,14 +44,14 @@
\def\headtoname{Prejme}%
\def\proofname{Dokaz}%
\def\glossaryname{Slovar}%
- }
+}
\def\dateslovenian{%
\def\today{\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@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
@@ -60,15 +59,20 @@
}
\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}
+ 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\alph\abeceda\let\Alph\Abeceda}
- \def\blockextras@slovenian{\extras@slovenian}
- \def\inlineextras@slovenian{\extras@slovenian}
- \def\noextras@slovenian{\let\alph\latinalph\let\Alph\latinAlph}
+\def\extras@slovenian{%
+ \ifslovenian@localalph\let\alph\abeceda\let\Alph\Abeceda\fi%
}
+\def\blockextras@slovenian{\extras@slovenian}
+
+\def\inlineextras@slovenian{\extras@slovenian}
+
+\def\noextras@slovenian{\let\alph\latinalph\let\Alph\latinAlph}
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf
index 0310cf77e32..be24daa2bbf 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-sorbian.ldf}[polyglossia: module for sorbian]
\PolyglossiaSetup{sorbian}{
+ bcp47=hsb,
language=Upper Sorbian,
babelname=uppersorbian,
hyphennames={usorbian,uppersorbian},
@@ -9,6 +10,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*[variant=upper]{sorbian}{hsb}
+\setlanguagealias*[variant=lower]{sorbian}{dsb}
% Backwards compat. aliases
\setlanguagealias[variant=lower]{sorbian}{lsorbian}
\setlanguagealias[variant=upper]{sorbian}{usorbian}
@@ -22,7 +26,7 @@
\ifcase\nr\relax
% upper:
\def\sorbian@variant{usorbian}%
- \SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian}%
+ \SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian,bcp47=hsb}%
\xpg@fontsetup@latin{sorbian}%
% Check if \l@usorbian is defined. If not, try to set it to some variety
% (specific order as in the csv list below), or null language if everything fails
@@ -42,7 +46,7 @@
\or
% lower:
\def\sorbian@variant{lsorbian}%
- \SetLanguageKeys{sorbian}{language=Lower Sorbian,langtag=LSB,babelname=lowersorbian}%
+ \SetLanguageKeys{sorbian}{language=Lower Sorbian,langtag=LSB,babelname=lowersorbian,bcp47=dsb}%
\xpg@fontsetup@latin{sorbian}%
% Check if \l@lsorbian is defined. If not, try to set it to some variety
% (specific order as in the csv list below), or null language if everything fails
@@ -66,7 +70,8 @@
\define@boolkey{sorbian}[sorbian@]{olddate}[true]{}
-\setkeys{sorbian}{variant}
+% Register default options
+\xpg@initialize@gloss@options{sorbian}{variant=upper,olddate=false}
\def\sorbian@language{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
index 951ad3d7a31..d11286be63a 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
@@ -1,8 +1,10 @@
\ProvidesFile{gloss-spanish.ldf}[polyglossia: module for spanish]
\PolyglossiaSetup{spanish}{
+ bcp47=es-ES,
hyphennames={spanish},
hyphenmins={2,2},
+ totalhyphenmin=5,
langtag=ESP,
frenchspacing=true,
indentfirst=true,
@@ -10,6 +12,11 @@
babelname=spanish
}
+% BCP-47 compliant aliases
+\setlanguagealias*{spanish}{es}
+\setlanguagealias*[variant=mexican]{spanish}{es-MX}
+\setlanguagealias*[variant=spanish]{spanish}{es-ES}
+
% Babel aliases
\setlanguagealias[variant=mexican]{spanish}{spanishmx}
@@ -19,11 +26,11 @@
\ifcase\nr\relax
% spanish:
\@spanish@mexicofalse%
- \SetLanguageKeys{spanish}{babelname=spanish}%
+ \SetLanguageKeys{spanish}{babelname=spanish,bcp47=es-ES}%
\or
% mexican:
\@spanish@mexicotrue%
- \SetLanguageKeys{spanish}{babelname=spanishmx}%
+ \SetLanguageKeys{spanish}{babelname=spanishmx,bcp47=es-MX}%
\fi
\xpg@info{Option: spanish, variant=\val}%
}{\xpg@warning{Unknown spanish variant `#1'}}
@@ -58,6 +65,10 @@
\xpg@info{Option: Spanish, spanishoperators=\val}%
}{\xpg@warning{Unknown spanishoperators value `#1'}}
+
+% Register default options
+\xpg@initialize@gloss@options{spanish}{variant=spanish,spanishoperators=none}
+
\let\xpg@save@lim\lim
\let\xpg@save@limsup\limsup
\let\xpg@save@liminf\liminf
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf
index f39e65fba81..9ae170904d3 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-swedish.ldf}[polyglossia: module for swedish]
\PolyglossiaSetup{swedish}{
+ bcp47=sv,
hyphennames={swedish},
hyphenmins={2,2},
langtag=SVE,
@@ -8,6 +9,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{swedish}{sv}
+
\def\captionsswedish{%
\def\refname{Referenser}%
\def\abstractname{Sammanfattning}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
index a977c75f7c5..3347e8f55a0 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
@@ -9,6 +9,7 @@ and may look very wrong.}
\RequirePackage{arabicnumbers}
\PolyglossiaSetup{syriac}{
+ bcp47=syr,
script=Syriac,
scripttag=syrc,
langtag=SYR,
@@ -19,6 +20,9 @@ and may look very wrong.}
%TODO localalph
}
+% BCP-47 compliant aliases
+\setlanguagealias*{syriac}{syr}
+
\def\syriacnumber#1{\@syriacnumber{#1}}%
\newif\if@eastern@numerals
@@ -36,7 +40,8 @@ and may look very wrong.}
\fi
\fi}
-\setkeys{syriac}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{syriac}{numerals=western}
%\define@key{polyglossia}{syriaclocale}[default]{%
% \def\@syriac@locale{#1}}
@@ -120,33 +125,22 @@ and may look very wrong.}
%%% 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.
- \ifxetex
- \ifnum\XeTeXcharglyph"0661 > 0%
- %%\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
- \protect\arabicdigits{\number#1}%
- \else%
+ \xpg@if@char@available{0661}%
+ {\protect\arabicdigits{\number#1}}%
+ {\arabicdigits{\number#1}
\ifcsdef{arabicfont}%
{\protect\arabicdigits{\number#1}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: I am using \string\arabicfont instead}}%
+ \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}}%
{\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: since \string\arabicfont is not defined, we'll use Western numerals instead}}%
- \fi
- \else% LuaTeX
- \expandafter\ifnum\directlua{polyglossia.check_char(0x661)} > 0\relax
- %%\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
- \protect\arabicdigits{\number#1}%
- \else%
- \ifcsdef{arabicfont}%
- {\protect\arabicdigits{\number#1}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: I am using \string\arabicfont instead}}%
- {\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: since \string\arabicfont is not defined, we'll use Western numerals instead}}%
- \fi
- \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}}%
+ }%
\else
%%\RL{\protect\reset@font\number#1}%
\number#1%
- \fi}
+ \fi%
+}
\def\syriac@numbers{%
\let\@alph\abjadsyriac%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf
index 779d27f773a..5ddb42b0b72 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf
@@ -8,6 +8,7 @@ and may look very wrong.}
% Translations provided by Kevin & Siji, 01-11-2009
\PolyglossiaSetup{tamil}{
+ bcp47=ta,
script=Tamil,
scripttag=taml,
langtag=TAM,
@@ -16,6 +17,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{tamil}{ta}
+
\def\captionstamil{%
\def\abstractname{சாராம்சம்}%
\def\appendixname{பிற்சேர்க்கை}%பின்னிணைப்பு
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf
index ec7975da48f..4f382fb3b17 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf
@@ -8,6 +8,7 @@ and may look very wrong.}
% Translations provided by Anmol Sharma <unmole.in@gmail.com>
\PolyglossiaSetup{telugu}{
+ bcp47=te,
script=Telugu,
scripttag=telu,
langtag=TEL,
@@ -16,6 +17,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{telugu}{te}
+
\def\captionstelugu{%
\def\refname{ఆధారాలు}%
\def\abstractname{సారాంశం}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
index 73cbfc47e5b..b5657a20370 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
@@ -15,6 +15,7 @@ the output is not guaranteed to be correct\MessageBreak
and may look very wrong.}
\fi
\PolyglossiaSetup{thai}{
+ bcp47=th,
script=Thai,
scripttag=thai,
langtag=THA,
@@ -25,6 +26,9 @@ and may look very wrong.}
%TODO localdigits=thainumber
}
+% BCP-47 compliant aliases
+\setlanguagealias*{thai}{th}
+
\newif\if@thai@numerals
\def\tmp@thai{thai}
\define@key{thai}{numerals}[arabic]{%
@@ -33,7 +37,8 @@ and may look very wrong.}
\@thai@numeralsfalse\fi
}
-\setkeys{thai}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{thai}{numerals=arabic}
\def\captionsthai{%
\def\refname{หนังสืออ้างอิง}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf
index 19d2bf486a1..a33c829ab3f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf
@@ -6,6 +6,7 @@
%%
\PolyglossiaSetup{tibetan}{
+ bcp47=bo,
script=Tibetan,
scripttag=tibt,
langtag=TIB,
@@ -15,6 +16,9 @@
%TODO localalph={xxx@alph,xxx@Alph}
}
+% BCP-47 compliant aliases
+\setlanguagealias*{tibetan}{bo}
+
\newif\if@tibetan@numerals
\def\tmp@tibetan{tibetan}
\define@key{tibetan}{numerals}[tibetan]{%
@@ -48,7 +52,8 @@
\fi %
}
-\setkeys{tibetan}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{tibetan}{numerals=tibetan}
% some are known, but very few
% a few come from "Standardizing Tibetan Terms of Information Technology"
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf
index e937e7bf009..cb021c14fa0 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-turkish.ldf}[polyglossia: module for turkish]
\RequirePackage{hijrical}
\PolyglossiaSetup{turkish}{
+ bcp47=tr,
hyphennames={turkish},
hyphenmins={2,2},
langtag=TRK,
@@ -28,6 +29,9 @@
\fi
}
+% BCP-47 compliant aliases
+\setlanguagealias*{turkish}{tr}
+
\def\noturkish@punctuation{%
\ifxetex
\XeTeXcharclass `\! \z@
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf
index 19b257272aa..633c84e4cd7 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf
@@ -1,6 +1,7 @@
\ProvidesFile{gloss-turkmen.ldf}[polyglossia: module for turkmen]
%% Translations provided by Nazar Annagurban <nazartm at gmail dot com>
\PolyglossiaSetup{turkmen}{
+ bcp47=tk,
hyphennames={turkmen},
hyphenmins={2,2},
langtag=TKM,
@@ -8,6 +9,9 @@
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{turkmen}{tk}
+
\def\captionsturkmen{%
\def\prefacename{Sözbaşy}%
\def\refname{Çeşmeler}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
index a0d1d3c3fc0..d63569b3021 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
@@ -2,32 +2,57 @@
% Strings taken from Babel
% and revised by Roman Kyrylych
-\PolyglossiaSetup{ukrainian}{
+\RequirePackage{xpg-cyrillicnumbers}
+
+\PolyglossiaSetup{ukrainian}{%
+ bcp47=uk,
script=Cyrillic,
scripttag=cyrl,
langtag=UKR,
hyphennames={ukrainian},
hyphenmins={2,2},
frenchspacing=true,
- fontsetup=true
- %TODO localalph
+ fontsetup=true,
+ localnumeral=ukrainiannumerals,
+ Localnumeral=Ukrainiannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{ukrainian}{uk}
+
\newif\ifcyrillic@numerals
-\define@key{ukrainian}{numerals}[latin]{%
-\ifstrequal{#1}{cyrillic}%
-{\cyrillic@numeralstrue}
-{\cyrillic@numeralsfalse}%
-}
+\newif\ifcyrillic@asbuk@numerals
+\define@choicekey*+{ukrainian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\nr\relax
+ % arabic:
+ \cyrillic@numeralsfalse%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-trad:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralsfalse%
+ \or
+ % cyrillic-alph:
+ \cyrillic@numeralstrue%
+ \cyrillic@asbuk@numeralstrue%
+ \fi
+ \xpg@info{Option: Ukrainian, numerals=\val}%
+}{\xpg@warning{Unknown Ukrainian numerals value `#1'}}
-\define@boolkey{ukrainian}[ukrainian@]{babelshorthands}[false]{}
-\setkeys{ukrainian}{numerals}
+% Register default options
+\xpg@initialize@gloss@options{ukrainian}{numerals=arabic}
+
+\define@boolkey{ukrainian}[ukrainian@]{babelshorthands}[true]{}
\ifsystem@babelshorthands
-\setkeys{ukrainian}{babelshorthands=true}
+ \setkeys{ukrainian}{babelshorthands=true}
\else
-\setkeys{ukrainian}{babelshorthands=false}
+ \setkeys{ukrainian}{babelshorthands=false}
\fi
\ifcsundef{initiate@active@char}{%
@@ -37,45 +62,47 @@
}{}
\def\ukrainian@shorthands{%
-\bbl@activate{"}%
-\def\language@group{ukrainian}%
+ \bbl@activate{"}%
+ \def\language@group{ukrainian}%
% \declare@shorthand{ukrainian}{"`}{„}%
% \declare@shorthand{ukrainian}{"'}{“}%
% \declare@shorthand{ukrainian}{"<}{«}%
% \declare@shorthand{ukrainian}{">}{»}%
-\declare@shorthand{ukrainian}{""}{\hskip\z@skip}%
-\declare@shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
-\declare@shorthand{ukrainian}{"=}{\nobreak-\hskip\z@skip}%
-\declare@shorthand{ukrainian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
-\declare@shorthand{ukrainian}{"-}{%
-\def\ukrainian@sh@tmp{%
-\if\ukrainian@sh@next-\expandafter\ukrainian@sh@emdash
-\else\expandafter\ukrainian@sh@hyphen\fi
-}%
-\futurelet\ukrainian@sh@next\ukrainian@sh@tmp}%
-\def\ukrainian@sh@hyphen{%
-\nobreak\-\bbl@allowhyphens}%
-\def\ukrainian@sh@emdash##1##2{\cdash-##1##2}%
-\def\cdash##1##2##3{\def\tempx@{##3}%
-\def\tempa@{-}\def\tempb@{~}\def\tempc@{*}%
-\ifx\tempx@\tempa@\@Acdash\else
-\ifx\tempx@\tempb@\@Bcdash\else
-\ifx\tempx@\tempc@\@Ccdash\else
-\errmessage{Wrong usage of cdash}\fi\fi\fi}%
-\def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi
-\cyrdash\hskip.2em\ignorespaces}%
-\def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi
-\nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}%
-\def\@Ccdash{\leavevmode
-\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
-\ifx\cyrdash\undefined
-\def\cyrdash{\hbox to.8em{--\hss--}}
-\fi
-\declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}%
+ \declare@shorthand{ukrainian}{""}{\hskip\z@skip}%
+ \declare@shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{ukrainian}{"=}{\nobreak-\hskip\z@skip}%
+ \declare@shorthand{ukrainian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+ \declare@shorthand{ukrainian}{"-}{%
+ \def\ukrainian@sh@tmp{%
+ \if\ukrainian@sh@next-\expandafter\ukrainian@sh@emdash
+ \else\expandafter\ukrainian@sh@hyphen\fi
+ }%
+ \futurelet\ukrainian@sh@next\ukrainian@sh@tmp}%
+ \def\ukrainian@sh@hyphen{%
+ \nobreak\-\bbl@allowhyphens}%
+ \def\ukrainian@sh@emdash##1##2{\cdash-##1##2}%
+ \def\cdash##1##2##3{%
+ \def\tempx@{##3}%
+ \def\tempa@{-}\def\tempb@{~}\def\tempc@{*}%
+ \ifx\tempx@\tempa@\@Acdash\else
+ \ifx\tempx@\tempb@\@Bcdash\else
+ \ifx\tempx@\tempc@\@Ccdash\else
+ \errmessage{Wrong usage of cdash}\fi\fi\fi%
+ }%
+ \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi
+ \cyrdash\hskip.2em\ignorespaces}%
+ \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi
+ \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}%
+ \def\@Ccdash{\leavevmode
+ \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+ \ifx\cyrdash\undefined
+ \def\cyrdash{\hbox to.8em{--\hss--}}
+ \fi
+ \declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
\def\noukrainian@shorthands{%
-\@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
}
\def\captionsukrainian{%
@@ -102,7 +129,8 @@
\def\headtoname{До}%
\def\proofname{Доведення}%
\def\glossaryname{Словник термінів}%
- }
+}
+
\def\dateukrainian{%
\def\today{\number\day~\ifcase\month\or
січня\or
@@ -117,39 +145,82 @@
жовтня\or
листопада\or
грудня\fi%
- \space\number\year~р.}}
+ \space\number\year~р.}%
+}
% The following is based on some ideas from ruscor.sty
\def\ukrainian@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\Asbuk#1{\expandafter\ukrainian@Alph\csname c@#1\endcsname}
-\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
+ \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{}%
+}
+
+\newcommand{\ukrainiannumerals}[2]{\ukrainiannumber{#2}}
+\newcommand{\Ukrainiannumerals}[2]{\Ukrainiannumber{#2}}
+
+\def\ukrainiannumber#1{%
+ \ifcyrillic@numerals
+ \ifcyrillic@asbuk@numerals
+ \serbian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
+ \else
+ \number#1%
+ \fi%
+}
+
+\def\Ukrainiannumber#1{%
+ \ifcyrillic@numerals
+ \ifcyrillic@asbuk@numerals
+ \serbian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
+ \else
+ \number#1%
+ \fi%
+}
+
+\let\ukrainiannumeral=\ukrainiannumber
+\let\Ukrainiannumeral=\Ukrainiannumber
+
+\def\Asbuk#1{\expandafter\ukranian@asbuk@Alph\csname c@#1\endcsname}
+\def\asbuk#1{\expandafter\ukranian@asbuk@alph\csname c@#1\endcsname}
+
+\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname}
+\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname}
+
+% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
+% thus ends at 30.
+\def\ukranian@asbuk@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}{ukrainian@Alph}\fi}
-\def\asbuk#1{\expandafter\ukrainian@alph\csname c@#1\endcsname}
-\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 Я%
+ \else\xpg@ill@value{#1}{ukranian@asbuk@Alph}\fi%
+}
+
+\def\ukranian@asbuk@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}{ukrainian@alph}\fi}
+ ц\or ч\or ш\or щ\or э\or ю\or я%
+ \else\xpg@ill@value{#1}{ukranian@asbuk@alph}\fi%
+}
\def\ukrainian@numbers{%
\let\@Alph\ukrainian@Alph%
@@ -162,19 +233,19 @@
}
\def\noextras@ukrainian{%
-\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
-\ifcyrillic@numerals\noukrainian@numbers\fi
-\noukrainian@shorthands%
+ \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+ \ifcyrillic@numerals\noukrainian@numbers\fi
+ \noukrainian@shorthands%
}
\def\blockextras@ukrainian{%
-\ukrainian@capsformat%
-\ifcyrillic@numerals\ukrainian@numbers\fi
-\ifukrainian@babelshorthands\ukrainian@shorthands\fi
+ \ukrainian@capsformat%
+ \ifcyrillic@numerals\ukrainian@numbers\fi
+ \ifukrainian@babelshorthands\ukrainian@shorthands\fi
}
\def\inlineextras@ukrainian{%
-\ifukrainian@babelshorthands\ukrainian@shorthands\fi%
+ \ifukrainian@babelshorthands\ukrainian@shorthands\fi%
}
%%% stuff from Babel
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
index aa54226134a..9bb37148fc1 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
@@ -11,6 +11,7 @@ and may look very wrong.}
\RequirePackage{hijrical}
\PolyglossiaSetup{urdu}{
+ bcp47=ur,
script=Arabic,
direction=RL,
scripttag=arab,
@@ -21,6 +22,9 @@ and may look very wrong.}
%TODO localalph={abjad,abjad}
}
+% BCP-47 compliant aliases
+\setlanguagealias*{urdu}{ur}
+
\newif\if@western@numerals
\def\tmp@western{western}
\define@key{urdu}{numerals}[eastern]{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
index a0b6176fed2..d69fbc9f6fb 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
@@ -2,6 +2,7 @@
%% Strings contributed by Daniel Owens < dhowens . pmbx . net >
\PolyglossiaSetup{vietnamese}{
+ bcp47=vi,
hyphennames={nohyphenation},
hyphenmins={2,2},
langtag=VIT,
@@ -9,6 +10,9 @@
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{vietnamese}{vi}
+
\def\captionsvietnamese{%
\def\refname{Tài liệu}%
\def\abstractname{Tóm tắt nội dung}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
index 686ea18e7ac..bb2c9e87cca 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
@@ -1,20 +1,31 @@
\ProvidesFile{gloss-welsh.ldf}[polyglossia: module for welsh]
\PolyglossiaSetup{welsh}{
+ bcp47=cy,
hyphennames={welsh},
hyphenmins={2,3},
langtag=WEL,
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{welsh}{cy}
+
\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
-}
+\define@choicekey*+{welsh}{date}[\val\nr]{long,short}[short]{%
+ \ifcase\nr\relax
+ % long:
+ \welsh@formaldatetrue
+ \or
+ % accented:
+ \welsh@formaldatefalse
+ \fi
+ \xpg@info{Option: Welsh, date=\val}%
+}{\xpg@warning{Unknown date value `#1'}}
+
+% Register default options
+\xpg@initialize@gloss@options{welsh}{date=short}
\def\captionswelsh{%
\def\refname{Cyfeiriadau}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty b/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty
index c56480b3727..60f41491147 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty
@@ -1,5 +1,5 @@
\ProvidesPackage{hebrewcal}
- [2015/04/17 v2.6 %
+ [2019/12/03 v2.7 %
Hebrew calendar for polyglossia (adapted from hebcal.sty in Babel)]
\RequirePackage{xkeyval}
\ifluatex\RequirePackage{luabidi}\else\RequirePackage{bidi}\fi
@@ -20,8 +20,8 @@
\@ifundefined{@Remainder}{\input{cal-util.def}}{}
-\define@boolkey{hebrew}[@hebrew@]{fullyear}[false]{}
-\setkeys{hebrew}{fullyear}
+\define@boolkey{hebrew}[@hebrew@]{fullyear}[true]{}
+\setkeys{hebrew}{fullyear=false}
\newcount\hebrewday \newcount\hebrewmonth \newcount\hebrewyear
\def\hebrewdate#1#2#3{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-french.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-french.lua
index 42396073eee..f0235a0d69e 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-french.lua
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-french.lua
@@ -35,6 +35,7 @@ local function activate_french_punct(thincolonspace, autospaceguillemets)
set_left_space(lang, '⁇', 0.5)
set_left_space(lang, '⁈', 0.5)
set_left_space(lang, '⁉', 0.5)
+ set_left_space(lang, '‽', 0.5) -- U+203D (interrobang)
if autospaceguillemets then
set_left_space(lang, '»', 0.5)
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-korean.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-korean.lua
index c09ae6d5b74..056c8e41d8f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-korean.lua
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-korean.lua
@@ -420,14 +420,19 @@ local function reorder_tm (head)
local curr, tone = node.slide(head)
while curr do
if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then
- local c, wd = curr.char or 0, curr.width or 0
- if (c == 0x302E or c == 0x302F) and wd > 0 then
- tone = curr
- elseif tone and not nobr_before[c] then
- head = node.remove(head, tone)
- tone.next, tone.prev = nil, nil
- head, curr = node.insert_before(head, curr, tone)
+ local f = font.getfont(curr.font) or font.fonts[curr.font]
+ if f and f.hb then -- harfbuzz do the right thing
tone = nil
+ else
+ local c, wd = curr.char or 0, curr.width or 0
+ if (c == 0x302E or c == 0x302F) and wd > 0 then
+ tone = curr
+ elseif tone and not nobr_before[c] then
+ head = node.remove(head, tone)
+ tone.next, tone.prev = nil, nil
+ head, curr = node.insert_before(head, curr, tone)
+ tone = nil
+ end
end
end
curr = curr.prev
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-latin.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-latin.lua
index 05c65ffe8bb..4d9b17fea08 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-latin.lua
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-latin.lua
@@ -6,21 +6,31 @@ require('polyglossia-punct')
-- between 1/4 and 1/3 of a quad. We choose a half of a \thinspace here.
local hairspace = 0.08333 -- 1/12
+local function space_left(char)
+ polyglossia.add_left_spaced_character('latin', char, hairspace, 'quad')
+end
+
+local function space_right(char)
+ polyglossia.add_right_spaced_character('latin', char, hairspace, 'quad')
+end
+
+polyglossia.clear_spaced_characters('latin')
+space_left('!')
+space_left('?')
+space_left('‼')
+space_left('⁇')
+space_left('⁈')
+space_left('⁉')
+space_left('‽') -- U+203D (interrobang)
+space_left(':')
+space_left(';')
+space_left('»')
+space_left('›')
+space_right('«')
+space_right('‹')
+
local function activate_latin_punct()
polyglossia.activate_punct('latin')
- polyglossia.clear_spaced_characters('latin')
- polyglossia.add_left_spaced_character('latin',':',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','!',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','?',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin',';',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','‼',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','⁇',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','⁈',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','⁉',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','»',hairspace,'quad')
- polyglossia.add_left_spaced_character('latin','›',hairspace,'quad')
- polyglossia.add_right_spaced_character('latin','«',hairspace,'quad')
- polyglossia.add_right_spaced_character('latin','‹',hairspace,'quad')
end
local function deactivate_latin_punct()
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-punct.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-punct.lua
index 6af13714f00..98367dd016c 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-punct.lua
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-punct.lua
@@ -61,12 +61,54 @@ local function get_penalty_node()
return node_copy(penalty_node)
end
--- we have here all possible space characters, referenced by their unicode slot
--- number, taken from char-def.lua
-local space_chars = {[32] = true, [160] = true, [5760] = true, [6158] = true,
- [8192] = true, [8193] = true, [8194] = true, [8195] = true, [8196] = true,
- [8197] = true, [8198] = true, [8199] = true, [8200] = true, [8201] = true,
- [8202] = true, [8239] = true, [8287] = true, [12288] = true}
+-- all possible space characters according to section 6.2 of the Unicode Standard
+-- https://www.unicode.org/versions/Unicode12.0.0/ch06.pdf
+local space_chars = {
+ [0x20] = true, -- space
+ [0xA0] = true, -- no-break space
+ [0x1680] = true, -- ogham space mark
+ [0x2000] = true, -- en quad
+ [0x2001] = true, -- em quad
+ [0x2002] = true, -- en space
+ [0x2003] = true, -- em space
+ [0x2004] = true, -- three-per-em-space
+ [0x2005] = true, -- four-per-em space
+ [0x2006] = true, -- six-per-em space
+ [0x2007] = true, -- figure space
+ [0x2008] = true, -- punctuation space
+ [0x2009] = true, -- thin space
+ [0x200A] = true, -- hair space
+ [0x202F] = true, -- narrow no-break space
+ [0x205F] = true, -- medium mathematical space
+ [0x3000] = true -- ideographic space
+}
+
+-- all left bracket characters, referenced by their Unicode slot
+local left_bracket_chars = {
+ [0x28] = true, -- left parenthesis
+ [0x5B] = true, -- left square bracket
+ [0x7B] = true, -- left curly bracket
+ [0x27E8] = true -- mathematical left angle bracket
+}
+
+-- all right bracket characters, referenced by their Unicode slot
+local right_bracket_chars = {
+ [0x29] = true, -- right parenthesis
+ [0x5D] = true, -- right square bracket
+ [0x7D] = true, -- right curly bracket
+ [0x27E9] = true -- mathematical right angle bracket
+}
+
+-- question and exclamation marks, referenced by their Unicode slot
+local question_exclamation_chars = {
+ [0x21] = true, -- exclamation mark !
+ [0x3F] = true, -- question mark ?
+ [0x203C] = true, -- double exclamation mark ‼
+ [0x203D] = true, -- interrobang ‽
+ [0x2047] = true, -- double question mark ⁇
+ [0x2048] = true, -- question exclamation mark ⁈
+ [0x2049] = true, -- exclamation question mark ⁉
+}
-- from nodes-tst.lua, adapted
local function somespace(n)
@@ -84,9 +126,6 @@ local function somespace(n)
end
end
--- we have here all left bracket characters, referenced by their unicode slot
-local left_bracket_chars = {[40] = true, [123] = true, [91] = true, [10216] = true}
-
local function someleftbracket(n)
if n then
local id = n.id
@@ -96,9 +135,6 @@ local function someleftbracket(n)
end
end
--- we have here all right bracket characters, referenced by their unicode slot
-local right_bracket_chars = {[41] = true, [125] = true, [93] = true, [10217] = true}
-
local function somerightbracket(n)
if n then
local id = n.id
@@ -108,6 +144,16 @@ local function somerightbracket(n)
end
end
+local function question_exclamation_sequence(n1, n2)
+ if n1 and n2 then
+ local id1 = n1.id
+ local id2 = n2.id
+ if id1 == glyph_code and id2 == glyph_code then
+ return question_exclamation_chars[n1.char] and question_exclamation_chars[n2.char]
+ end
+ end
+end
+
-- idem
local function somepenalty(n, value)
if n then
@@ -193,13 +239,13 @@ local function process(head)
if leftspace or rightspace then
local fontparameters = fonts.hashes.parameters[current.font]
local unit, stretch, shrink, spacing_node
- if leftspace then
+ if leftspace and fontparameters then
local prev = getprev(current)
local space_exception = false
if prev then
local prevprev = getprev(prev)
- -- do not add space after left (opening) bracket
- space_exception = someleftbracket(prev)
+ -- do not add space after left (opening) bracket and between question/exclamation marks
+ space_exception = someleftbracket(prev) or question_exclamation_sequence(prev, current)
if somespace(prev) then
-- TODO: there is a question here: do we override a preceding space or not?...
if somepenalty(prevprev, 10000) then
@@ -226,7 +272,7 @@ local function process(head)
head = insert_node_before(head, current, spacing_node)
end
end
- if rightspace then
+ if rightspace and fontparameters then
local next = getnext(current)
local space_exception = false
if next then
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-sanskrit.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-sanskrit.lua
index b2546dcad2a..3d5a44774cf 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-sanskrit.lua
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-sanskrit.lua
@@ -7,19 +7,25 @@ require('polyglossia-punct')
-- value.
local thinspace = 0.16667 -- 1/6
+local function space_left(char)
+ polyglossia.add_left_spaced_character('sanskrit', char, thinspace, 'quad')
+end
+
+polyglossia.clear_spaced_characters('sanskrit')
+space_left('!')
+space_left('?')
+space_left('‼')
+space_left('⁇')
+space_left('⁈')
+space_left('⁉')
+space_left('‽') -- U+203D (interrobang)
+space_left(':')
+space_left(';')
+space_left('।') -- danda, U+0964
+space_left('॥') -- double danda, U+0965
+
local function activate_sanskrit_punct()
polyglossia.activate_punct('sanskrit')
- polyglossia.clear_spaced_characters('sanskrit')
- polyglossia.add_left_spaced_character('sanskrit','!',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit','?',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit','‼',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit','⁇',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit','⁈',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit','⁉',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit',':',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit',';',thinspace,'quad')
- polyglossia.add_left_spaced_character('sanskrit','।',thinspace,'quad') -- danda, U+0964
- polyglossia.add_left_spaced_character('sanskrit','॥',thinspace,'quad') -- double danda, U+0965
end
local function deactivate_sanskrit_punct()
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 9cdb503c1ab..118017d1f4f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2019/11/15 v1.46
- Alternative to Babel for XeLaTeX and LuaLaTeX]
+\ProvidesPackage{polyglossia}[2020/01/29 v1.47
+ Modern multilingual typesetting with XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}
\RequirePackage{xkeyval}[2008/08/13]
@@ -46,6 +46,7 @@
\let\xpg@loaded\@empty% list of loaded languages (polyglossia name)
\let\xpg@vloaded\@empty% list of loaded variants
\let\xpg@bloaded\@empty% list of loaded languages (babel name)
+\let\xpg@bcp@loaded\@empty% list of loaded languages (bcp-47 id)
% counter in latin
\def\latinalph#1{\expandafter\latin@alph\csname c@#1\endcsname}
@@ -68,14 +69,20 @@
\xpg@initial@setup
% apply \familydefault changes
\xpg@set@familydefault
+}
+
+\AtBeginDocument{
+ \polyglossia@AtBeginDocument:
+}
+
+% The following needs to go after any \AtBeginDocument (also of packages
+% loaded after \set[main|other]language
+\AfterEndPreamble{
% now we have the C locale definition: select the language
\polyglossia@AtBeginDocument@selectlanguage:
% If hyphenation disabling has been requested in preamble, do it now
\polyglossia@AtBeginDocument@hyphenation:
}
-\AtBeginDocument{
- \polyglossia@AtBeginDocument:
-}
%% custom message macros
\providecommand*{\xpg@error}[1]{%
@@ -346,7 +353,7 @@
.code:n = {
\prop_gput:Nnn{\polyglossia@langsetup}{#1/script}{##1}
\prop_gput:Nnx{\polyglossia@langsetup}{#1/lcscript}
- {\tl_if_empty:nF{##1}{\str_lower_case:n##1}}
+ {\tl_if_empty:nF{##1}{\str_lowercase:n##1}}
},
#1 / script
.value_required:n = true,
@@ -373,6 +380,13 @@
.value_required:n = true,
#1 / langtag
.initial:n = {},
+ % the BCP-47 tag
+ #1 / bcp47
+ .code:n = {\prop_gput:Nnn{\polyglossia@langsetup}{#1/bcp47}{##1}},
+ #1 / bcp47
+ .value_required:n = true,
+ #1 / bcp47
+ .initial:n = {},
% hyphennames
#1 / hyphennames
.code:n = {
@@ -410,6 +424,17 @@
.value_required:n = true,
#1 / hyphenmins
.initial:n = {2,3},
+ % minimal length for hyphenation (LuaTeX only)
+ #1 / totalhyphenmin
+ .code:n = {
+ % check syntax
+ \int_compare:nNnF { \clist_count:n {##1} } = {1}
+ {\xpg@error{totalhyphenhypenmin~should~be~a~single~entry,~got~"##1"}}
+ % set prop
+ \prop_gput:Nnn \polyglossia@langsetup {#1/totalhyphenmin} {##1}
+ },
+ #1 / totalhyphenmin
+ .value_required:n = false,
% frenchspacing
#1 / frenchspacing
.code:n = {
@@ -828,7 +853,7 @@
{\addfontfeature{Script=#2}}
{\xpg@error{
The~ current~ latin ~ font~ \l_fontspec_family_tl\space does~ not~ contain~ the~"#2"~ script!\MessageBreak
- Please~ define~\csname\tl_if_empty:nF{#2}{\str_lower_case:n#2}font\endcsname~
+ Please~ define~\csname\tl_if_empty:nF{#2}{\str_lowercase:n#2}font\endcsname~
with~ \string\newfontfamily\space command
}
}
@@ -1013,6 +1038,10 @@
% load a master language from an alias file
\newcommand*\xpg@load@master@language[1] {
\xpg@input{gloss-#1.ldf}
+ \ifcsundef{#1@loaded}%
+ {
+ \exp_args:Nx\polyglossia@define@language@cmd:n{#1}%
+ }{}
\csgdef{#1@loaded}{}
\global\edef\xpg@loaded{#1\ifx\xpg@loaded\@empty\else,\xpg@loaded\fi}%
}
@@ -1040,40 +1069,36 @@
% \setlanguagealias[<options>]{<language>}{<alias>}
\DeclareDocumentCommand \setlanguagealias {s O{} m m}
{
- \ifcsundef{#4@alias@lang}{%
- \exp_args:Ne
- \newenvironment {#4}
- {
- \begin{otherlanguage}[#2]{#3}
- }%
- {
- \end{otherlanguage}
- }%
- % The starred version does not define \text<alias>
- \IfBooleanF {#1}
- {
- \exp_args:Nc \newcommand {text#4} [2][]
- {%
- \xpg@textlanguage[#2,##1]{#3}{##2}%
- }%
- }%
- }{%
- \exp_args:Ne
- \renewenvironment {#4}
- {
- \begin{otherlanguage}[#2]{#3}
- }%
+ % The starred version does not define commands and environments
+ \IfBooleanF {#1}
{
- \end{otherlanguage}
- }%
- % The starred version does not (re)define \text<alias>
- \IfBooleanF {#1}
- {
- \exp_args:Nc \renewcommand {text#4} [2][]
- {%
- \xpg@textlanguage[#2,##1]{#3}{##2}%
- }%
- }%
+ \ifcsundef{#4@alias@lang}{%
+ \exp_args:Ne
+ \newenvironment {#4}
+ {
+ \begin{otherlanguage}[#2]{#3}
+ }%
+ {
+ \end{otherlanguage}
+ }%
+ \exp_args:Nc \newcommand {text#4} [2][]
+ {%
+ \xpg@textlanguage[#2,##1]{#3}{##2}%
+ }%
+ }{%
+ \exp_args:Ne
+ \renewenvironment {#4}
+ {
+ \begin{otherlanguage}[#2]{#3}
+ }%
+ {
+ \end{otherlanguage}
+ }%
+ \exp_args:Nc \renewcommand {text#4} [2][]
+ {%
+ \xpg@textlanguage[#2,##1]{#3}{##2}%
+ }%
+ }%
}%
\csgdef{#4@alias@lang}{#3}%
\tl_if_blank:nF {#2} {\csgdef{#4@alias@opts}{#2}}%
@@ -1087,6 +1112,8 @@
\global\edef\xpg@loaded{#2\ifx\xpg@loaded\@empty\else,\xpg@loaded\fi}%
\global\edef\xpg@bloaded{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}%
\ifx\xpg@bloaded\@empty\else,\xpg@bloaded\fi}%
+ \global\edef\xpg@bcp@loaded{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}%
+ \ifx\xpg@bcp@loaded\@empty\else,\xpg@bcp@loaded\fi}%
}%
\polyglossia_load_lang_definition:nn{#1}{#2}
% define environment and command (except for internal latex language)
@@ -1119,16 +1146,15 @@
\global\edef\xpg@loaded{#2\ifx\xpg@loaded\@empty\else,\xpg@loaded\fi}%
\global\edef\xpg@bloaded{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}%
\ifx\xpg@bloaded\@empty\else,\xpg@bloaded\fi}%
+ \global\edef\xpg@bcp@loaded{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}%
+ \ifx\xpg@bcp@loaded\@empty\else,\xpg@bcp@loaded\fi}%
}%
\csgdef{#2@loaded}{}%
}{}
\gdef\xpg@main@language{#2}%
\tl_if_blank:nTF {#1}{\gdef\mainlanguagevariant{}}{%
- % If the optional argument sets a value for the key “variant”,
- % store it in \xpg@main@langvariant
- \clist_map_inline:nn { #1 } {%
- \xpg@parsevariantkeyvalue##1=@xpg@main@langvariant\relax
- }%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
}%
\csgdef{#2@gvar}{\mainlanguagevariant}%
%% The following settings are for the default language and script
@@ -1152,7 +1178,15 @@
% Store babelname of current language (for external packages such as biblatex)
\prop_get:NxNT \polyglossia@langsetup {#2/babelname} \l_tmpa_tl
{ \edef\babelname{\l_tmpa_tl}%
- \csgdef{#2@gbabelname}{\babelname}%
+ \cs_gset_eq:cc{#2@gbabelname}{babelname}%
+ }
+ % Store BCP-47 id of main language
+ \prop_get:NxNT \polyglossia@langsetup {#2/bcp47} \l_tmpa_tl
+ { \csedef{mainbcp47id}{\l_tmpa_tl} }
+ % Store BCP-47 id of current language
+ \prop_get:NxNT \polyglossia@langsetup {#2/bcp47} \l_tmpa_tl
+ { \csedef{bcp47id}{\l_tmpa_tl}%
+ \cs_gset_eq:cc{#2@gbcp47id}{bcp47id}%
}
\ifluatex %
\directlua{polyglossia.set_default_language('\luatexluaescapestring{\string#2}')}%
@@ -1161,6 +1195,36 @@
\let\setmainlanguage=\setdefaultlanguage
+% Returns the language ID of the current language
+% Currently supported: bcp-47
+\DeclareDocumentCommand \languageid {m}
+{
+ \str_case:nnTF {#1}
+ {
+ {bcp-47} { \csuse{bcp47id} }
+ {bcp47} { \csuse{bcp47id} }
+ }
+ {}
+ {
+ \xpg@error{Invalid~ \string\languageid\space argument:~ #1}
+ }
+}
+
+% Returns the language ID of the main language
+% Currently supported: bcp-47
+\DeclareDocumentCommand \mainlanguageid {m}
+{
+ \str_case:nnTF {#1}
+ {
+ {bcp-47} { \csuse{mainbcp47id} }
+ {bcp47} { \csuse{mainbcp47id} }
+ }
+ {}
+ {
+ \xpg@error{Invalid~ \string\mainlanguageid\space argument:~ #1}
+ }
+}
+
\def\mainbabelname{}%
\def\mainlanguagevariant{}%
% Store main language variant for external packages
@@ -1180,16 +1244,26 @@
\tl_if_blank:nTF {#1}{%
\ifcsundef{#2@gvar}{\def\languagevariant{}}{\def\languagevariant{\csuse{#2@gvar}}}
}{%
- % If the argument sets a value for the key “variant”,
- % store it in \xpg@set@langvariant
- \clist_map_inline:nn { #1 } {%
- \xpg@parsevariantkeyvalue##1=@xpg@set@langvariant\relax
- }%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
}%
}
-\newcommand{\resetdefaultlanguage}[2][]{%
+\newcommand*{\resetdefaultlanguage}[2][]{%
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \polyglossia@reset@default@language:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ }{%
+ polyglossia@reset@default@language:nn {#1} {\csuse{#2@alias@lang}}%
+ }%
+ }{%
+ polyglossia@reset@default@language:nn {#1} {#2}%
+ }%
+}
+
+\cs_new:Nn \polyglossia@reset@default@language:nn
+{
\polyglossia@error@iflangnotloaded:n{#2}
% disable globalnumbers of previously defined default language
\csuse{no\xpg@main@language @globalnumbers}
@@ -1212,6 +1286,16 @@
}{%
\edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
}%
+ % Store BCP-47 id of current language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csedef{bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
}
% This saves the normalfont for the latin script since we may change normalfont in other scripts
@@ -1235,6 +1319,14 @@
\selectfont%
}
+\def\xpg@patch@fontfamilies{%
+ % This robustifies the redefinitions of \<xx>family (suggestion by Enrico Gregorio)
+ % e.g. to prevent expansion of the \familytype redefinition in auxiliary files
+ \csgappto{rmfamily~}{\def\familytype{rm}}
+ \csgappto{sffamily~}{\def\familytype{sf}}
+ \csgappto{ttfamily~}{\def\familytype{tt}}
+}
+
% These switches activate the default fonts
% Note that a simple \let\rmfamilylatin=\rmfamily
% does not work reliably (see #24)
@@ -1254,11 +1346,7 @@
\ifcsequal{tempa}{tempb}%
{\def\familytype{tt}}
{\def\familytype{rm}}}
- % This robustifies the redefinitions of \<xx>family (suggestion by Enrico Gregorio)
- % e.g. to prevent expansion of the \familytype redefinition in auxiliary files
- \csgappto{rmfamily~}{\def\familytype{rm}}
- \csgappto{sffamily~}{\def\familytype{sf}}
- \csgappto{ttfamily~}{\def\familytype{tt}}
+ \xpg@patch@fontfamilies%
% This (re-)saves the normalfont for the latin script since we may
% change normalfont in other scripts
\let\normalfontlatin=\normalfont%
@@ -1269,10 +1357,12 @@
}
\def\resetfontlatin{%
- \cs_gset_eq:cc{rmfamily}{xpg@defaultfont@rm}%
- \cs_gset_eq:cc{sffamily}{xpg@defaultfont@sf}%
- \cs_gset_eq:cc{ttfamily}{xpg@defaultfont@tt}%
- \global\let\normalfont=\normalfontlatin}
+ \DeclareRobustCommand\rmfamily{\xpg@defaultfont@rm}%
+ \DeclareRobustCommand\sffamily{\xpg@defaultfont@sf}%
+ \DeclareRobustCommand\ttfamily{\xpg@defaultfont@tt}%
+ \xpg@patch@fontfamilies%
+ \global\let\normalfont=\normalfontlatin%
+}
\def\selectfontfamilylatin{%
\def\tmp@tt{tt}\def\tmp@sf{sf}%
@@ -1301,12 +1391,28 @@
}
\let\@@fterindentfalse\@afterindentfalse
-\def\french@indent{\let\@afterindentfalse\@afterindenttrue
- \@afterindenttrue}
-\def\nofrench@indent{\let\@afterindentfalse\@@fterindentfalse
- \@afterindentfalse}
-\newcommand{\selectbackgroundlanguage}[1]{%
- \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript}}{latin}{}{\xpg@set@normalfont{#1}}%
+\def\french@indent{%
+ \let\@afterindentfalse\@afterindenttrue
+ \@afterindenttrue%
+}
+\def\nofrench@indent{%
+ \let\@afterindentfalse\@@fterindentfalse
+ \@afterindentfalse%
+}
+
+\newcommand*{\selectbackgroundlanguage}[1]{%
+ \ifcsdef{#1@alias@lang}{%
+ \polyglossia@select@background@language:n {\csuse{#1@alias@lang}}%
+ }{%
+ \polyglossia@select@background@language:n {#1}%
+ }%
+}
+
+\cs_new:Nn \polyglossia@select@background@language:n
+{
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript}}{latin}
+ {}
+ {\xpg@set@normalfont{#1}}%
\csuse{#1@globalnumbers}%
}
@@ -1342,16 +1448,13 @@
% If a variant is set, store it.
\gdef\otherlanguagevariant{}
\tl_if_blank:nTF {#1}{}{%
- % If the optional argument sets a value for the key “variant”,
- % store it in \xpg@other@langvariant
- \clist_map_inline:nn { #1 } {%
- \xpg@parsevariantkeyvalue##1=@xpg@other@langvariant\relax
- }%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
}%
\csgdef{#2@gvar}{\otherlanguagevariant}%
\prop_get:NxNT \polyglossia@langsetup {#2/babelname} \l_tmpa_tl
{ \xdef\otherlanguagebabelname{\l_tmpa_tl} }
- \csgdef{#2@gbabelname}{\otherlanguagebabelname}%
+ \cs_gset_eq:cc{#2@gbabelname}{otherlanguagebabelname}%
}
% Store main language variant for external packages
@@ -1384,7 +1487,7 @@
\newcommand\textlang[3][]{%
\ifcsdef{#2@alias@lang}{%
\ifcsdef{#2@alias@opts}{%
- \xpg@textlanguage[\csuse{#2@alias@opts},#1]{\csuse{#2@alias@lang}}{#3}%
+ \exp_args:Nxx \xpg@textlanguage[\csuse{#2@alias@opts},#1]{\csuse{#2@alias@lang}}{#3}%
}{%
\xpg@textlanguage[#1]{\csuse{#2@alias@lang}}{#3}%
}%
@@ -1393,6 +1496,16 @@
}%
}%
+% Alias to {<lang>}, but more suitable
+% for specific (esp. tag-based) aliases
+% where {<alias>} would cause clashes
+% (e.g., \fi)
+\newenvironment{lang}[2][]{%
+ \begin{otherlanguage}[#1]{#2}%
+}{%
+ \end{otherlanguage}
+}%
+
\providecommand{\foreignlanguage}{}
% wrapper for foreignlanguage and otherlanguage*
@@ -1408,6 +1521,16 @@
}{%
\edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
}%
+ % Store BCP-47 id of current language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csedef{bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
}
% joint code of \foreignlanguage, otherlanguage*
@@ -1428,7 +1551,7 @@
{%
\ifcsdef{#2@alias@lang}{%
\ifcsdef{#2@alias@opts}{%
- \polyglossia@foreignlanguage:nnn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}} {#3}%
+ \exp_args:Nxx \polyglossia@foreignlanguage:nnn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}} {#3}%
}{%
\polyglossia@foreignlanguage:nnn {#1} {\csuse{#2@alias@lang}} {#3}%
}%
@@ -1453,7 +1576,7 @@
{%
\ifcsdef{#2@alias@lang}{%
\ifcsdef{#2@alias@opts}{%
- \polyglossia@otherlanguage:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ \exp_args:Nxx \polyglossia@otherlanguage:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
}{%
\polyglossia@otherlanguage:nn {#1} {\csuse{#2@alias@lang}}%
}%
@@ -1471,7 +1594,7 @@
% use by \text<lang> and \textlang. Equivalent to \foreignlanguage,
% except that dates are localized.
-\newcommand*\xpg@textlanguage[3][]{%
+\newcommand\xpg@textlanguage[3][]{%
\polyglossia@error@iflangnotloaded:n{#2}
\bgroup
\xpg@otherlanguage[#1]{#2}%
@@ -1510,7 +1633,7 @@
{%
\ifcsdef{#3@alias@lang}{%
\ifcsdef{#3@alias@opts}{%
- \polyglossia@select@language:nnn {#1} {\csuse{#3@alias@opts},#2} {\csuse{#3@alias@lang}}%
+ \exp_args:Nxx \polyglossia@select@language:nnn {#1} {\csuse{#3@alias@opts},#2} {\csuse{#3@alias@lang}}%
}{%
\polyglossia@select@language:nnn {#1} {#2} {\csuse{#3@alias@lang}}%
}%
@@ -1528,11 +1651,8 @@
\group_insert_after:N \xpg@pop@language
}
\tl_if_blank:nTF {#2}{}{%
- % If the optional argument sets a value for the key “variant”, copy it to xpg@langvariant
- \clist_map_inline:nn { #2 } {%
- \xpg@parsevariantkeyvalue##1=@xpg@langvariant\relax
- }%
- \exp_args:Nne \setkeys{#3}{#2}%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#3} {#2}%
}%
% The starred variant does not write to the aux
\IfBooleanTF#1{%
@@ -1554,13 +1674,99 @@
}{}
}
-% Helper to get and register "variant" keyval
-\def\xpg@parsevariantkeyvalue#1=#2@#3\relax{%
+
+\cs_new:Nn \polyglossia@set@lang@options:nn
+{
+ % If the optional argument sets a value for the key “variant”, copy it to xpg@langvariant
+ \clist_map_inline:nn { #2 } {%
+ \xpg@parsevariantkeyvalue##1=@xpg@langvariant:#1\relax
+ }%
+ \exp_args:Nne \setkeys{#1}{#2}%
+}
+
+% Initialize default language options, so that
+% \iflanguageoption has the info it needs also
+% for default settings
+\newcommand*\xpg@initialize@gloss@options[2]{%
+ \polyglossia@set@lang@options:nn {#1} {#2}%
+}
+
+% Record synonymous keyvals such as variant=us and variant=american
+% Syntax: \xpg@set@alias@values{<lang>}{<key>}{<val>}{<alias vals, comma-separated>}
+\newcommand*\xpg@set@alias@values[4]{%
+ \prop_if_exist:cF { xpg@alias@keyvals@#1@#3 }
+ { \prop_new:c {xpg@alias@keyvals@#1@#3} }
+ \prop_put:cnn { xpg@alias@keyvals@#1@#3 }
+ {#2}{#4}
+ \prop_put:cnn { xpg@alias@keyvals@#1@#4 }
+ {#2}{#3}
+}
+
+% Patch xkeyval to record default values of keys
+\pretocmd{\XKV@define@default}{%
+ \csgdef{xpg@default@opt@\XKV@header #1}{#2}%
+}{}{\xpg@warning{Patching xkeyval failed!}}
+
+% Helper to get and register option keyvals
+\def\xpg@parsevariantkeyvalue#1=#2@#3:#4\relax{%
\def\@tmpa{#1}
\def\@tmpb{variant}
+ % variant values are stored in specific macros
+ % (\xpg@main@langvariant, \xpg@other@langvariant
+ % and \xpg@set@langvariant)
\ifx\@tmpa\@tmpb\setkeys{#3}{#1=#2}\fi
+ \tl_if_empty:nTF{#2}
+ {
+ \ifcsdef{xpg@default@opt@KV@#4@#1}%
+ {\xpg@store@opt@keyval#1:\csuse{xpg@default@opt@KV@#4@#1}=:#4\relax}%
+ {}%
+ }
+ { \xpg@store@opt@keyval#1:#2:#4\relax }
}%
+% Store option keys and values
+% This strips trailing '=' from values.
+\def\xpg@store@opt@keyval#1:#2=:#3\relax{%
+ \prop_if_exist:cF { xpg@current@options@#3 }
+ { \prop_new:c {xpg@current@options@#3} }
+ \prop_put:cnn { xpg@current@options@#3 }
+ {#1}{#2}
+}
+
+
+\prg_set_conditional:Npnn \polyglossia@check@option@value:NNN #1#2#3 { p , T , F , TF }
+{
+ \prop_get:cnNTF {xpg@current@options@#1} {#2} \l_tmpa_tl
+ {
+ \exp_args:Nee \str_if_eq:NNTF{\l_tmpa_tl}{#3}
+ {\prg_return_true:}
+ {
+ \prop_get:cnNTF {xpg@alias@keyvals@#1@#3} {#2} \l_tmpb_tl
+ {
+ \exp_args:Nne \clist_set:Nn{\l_tmpa_clist}{\l_tmpb_tl}
+ \providetoggle{xpgvalfound}
+ \togglefalse{xpgvalfound}
+ \clist_map_inline:Nn \l_tmpa_clist {
+ \exp_args:Nee \str_if_eq:NNT{##1}{\l_tmpa_tl}
+ { \toggletrue{xpgvalfound} }
+ }
+ \iftoggle{xpgvalfound}{\prg_return_true:}{\prg_return_false:}
+ }
+ {
+ \prg_return_false:
+ }
+ }
+ }
+ {
+ \prg_return_false:
+ }
+}
+
+% Test if option value is set
+\newcommand*\iflanguageoption[5]{%
+ \polyglossia@check@option@value:NNNTF{#1}{#2}{#3}{#4}{#5}%
+}
+
% Append any variant to csv list of variants
\define@key{xpg@langvariant}{variant}{%
@@ -1585,6 +1791,51 @@
\polyglossia@check@if@lang@loaded:NTF{#1@bbl@loaded}{#2}{#3}%
}
+% Same for languageid
+\DeclareDocumentCommand \iflanguageidloaded {mmmm}
+{
+ \str_case:nnTF {#1}
+ {
+ {bcp-47} { \polyglossia@check@if@lang@loaded:NTF{#2@bcp@loaded}{#3}{#4} }
+ {bcp47} { \polyglossia@check@if@lang@loaded:NTF{#2@bcp@loaded}{#3}{#4} }
+ }
+ {}
+ {
+ \xpg@error{Invalid~ \string\iflanguageidloaded\space argument:~ #1}
+ }
+}
+
+% Check if the current font has a given glyph
+\prg_set_conditional:Npnn \polyglossia@check@if@char@available:N #1 { p , T , F , TF }
+{
+ \str_case_e:nnF{\c_sys_engine_str}{
+ {luatex}{
+ \int_compare:nNnTF { \directlua{polyglossia.check_char(0x#1)} } > { 0 }
+ {\prg_return_true:}
+ {\prg_return_false:}
+ }
+ {xetex}{
+ \int_compare:nNnTF { \the\XeTeXcharglyph"#1 } > { 0 }
+ {\prg_return_true:}
+ {\prg_return_false:}
+ }
+ }
+ {
+ \xpg@warning{You’re running a TeX engine that is not LuaTeX or XeTeX.\MessageBreak
+ That is almost guaranteed to cause problems.}
+ }
+}
+
+% Test if a char (by char code) is available in the current font
+\newcommand*\xpg@if@char@available[3]{%
+ \polyglossia@check@if@char@available:NTF{#1}{#2}{#3}%
+}
+
+\newcommand*\charifavailable[2]{%
+ \xpg@if@char@available{#1}{\char"#1}{#2}%
+}
+
+
\newcommand*{\xpg@set@language@nonaux}[2][]{%
\@select@language[#1]{#2}%
}
@@ -1601,6 +1852,24 @@
}{%
\edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
}%
+ % Store BCP-47 id of current language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csedef{bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
+ % Store bcp47 in \xpg@bcp@loaded csv list
+ \def\xpg@tmp@bcpname{\csuse{bcp47id}}%
+ \ifcsundef{\csname xpg@tmp@bcpname\endcsname @bcp@loaded}
+ {
+ \global\edef\xpg@bcp@loaded{\xpg@tmp@bcpname%
+ \ifx\xpg@bcp@loaded\@empty\else,\xpg@bcp@loaded\fi}%
+ \csgdef{\csname xpg@tmp@bcpname\endcsname @bcp@loaded}{}%
+ }{}
\@select@language[#1]{#2}%
% Write to the aux
\if@filesw%
@@ -1618,24 +1887,57 @@
\fi
}
+% The bidi package swaps the output stream within RTL tables
+% (to get the column order right). This also swaps group
+% delimiters inserted to the aux files via otherlanguage (see #354).
+% We therefore patch bidi and insert a bool that tells us
+% whether we are in such a table.
+\newbool{xpg@inbiditable}
+\AtBeginDocument{%
+ \@ifpackageloaded{bidi}{%
+ \patchcmd{\@tabular}%
+ {\if@RTLtab}%
+ {\if@RTLtab\booltrue{xpg@inbiditable}}%
+ {}% success
+ {\xpg@warning{Patching bidi table failed!}}%
+ }{}%
+}
+
% Open a group in the aux file. This is to keep
-% nested language options local (see #320)
+% nested language options local (see #320).
+% In bidi tables, the opening/closing needs to be swapped (see #354)
\newcommand*{\xpg@set@group@aux}{%
\if@filesw%
- \protected@write\@auxout{}{\bgroup}%
- \addtocontents{toc}{\bgroup}%
- \addtocontents{lof}{\bgroup}%
- \addtocontents{lot}{\bgroup}%
+ \ifbool{xpg@inbiditable}{%
+ \protected@write\@auxout{}{\egroup}%
+ \addtocontents{toc}{\egroup}%
+ \addtocontents{lof}{\egroup}%
+ \addtocontents{lot}{\egroup}%
+ }{%
+ \protected@write\@auxout{}{\bgroup}%
+ \addtocontents{toc}{\bgroup}%
+ \addtocontents{lof}{\bgroup}%
+ \addtocontents{lot}{\bgroup}%
+ }%
\fi
}
-% Close the group in the aux file
+% Close the group in the aux file.
+% In bidi RTL tables, the opening/closing needs
+% to be swapped (see #354).
\newcommand*{\xpg@unset@group@aux}{%
\if@filesw%
- \protected@write\@auxout{}{\egroup}%
- \addtocontents{toc}{\egroup}%
- \addtocontents{lof}{\egroup}%
- \addtocontents{lot}{\egroup}%
+ \ifbool{xpg@inbiditable}{%
+ \protected@write\@auxout{}{\bgroup}%
+ \addtocontents{toc}{\bgroup}%
+ \addtocontents{lof}{\bgroup}%
+ \addtocontents{lot}{\bgroup}%
+ }{%
+ \protected@write\@auxout{}{\egroup}%
+ \addtocontents{toc}{\egroup}%
+ \addtocontents{lof}{\egroup}%
+ \addtocontents{lot}{\egroup}%
+ }%
\fi
}
@@ -1745,7 +2047,7 @@
\noextrascurrent{\languagename}%
\csuse{no\languagename @numbers}%
\ifxetex
- \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{\languagename/direction}}{RL}%
+ \str_if_eq:eeTF{\exp_args:Nne\prop_item:Nn{\polyglossia@langsetup}{\languagename/direction}}{RL}%
{%
\str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/direction}}{RL}%
{}% RTL -> RTL
@@ -1772,12 +2074,24 @@
\provideenvironment{otherlanguage}{}{}
+\newbool{xpg@noset@groups}
\renewenvironment{otherlanguage}[2][]
{%
- \xpg@set@group@aux%
+ % We usually embrace the switch in groups to keep the changes local.
+ % We cannot do this if an LTR environmet starts in an RTL paragraph,
+ % as bidi interferes here badly with its directionality smartness.
+ \ifxetex
+ \str_if_eq:eeT{\exp_args:Nne\prop_item:Nn{\polyglossia@langsetup}{\languagename/direction}}{RL}%
+ {%
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/direction}}{RL}%
+ {}% RTL -> RTL
+ {\ifvmode\else\booltrue{xpg@noset@groups}\fi}% RTL -> LTR
+ }%
+ \fi%
+ \ifbool{xpg@noset@groups}{}{\xpg@set@group@aux}%
\selectlanguage[#1]{#2}%
}
-{\xpg@unset@group@aux}
+{\ifbool{xpg@noset@groups}{}{\xpg@unset@group@aux}}
\newcommand{\setlocalhyphenmins}[3]{%
\xpg@ifdefined{#1}{%
@@ -1792,7 +2106,17 @@
\def\use@localhyphenmins#1{%
\ifcsundef{#1hyphenmins}{}%
- {\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}}
+ {\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}
+ \ifluatex
+ % Set \totalhyphenmin if specified
+ \prop_get:NxNTF \polyglossia@langsetup {#1/totalhyphenmin} \l_tmpa_tl
+ {
+ \xpg@warning{totalhyphenmin: '\l_tmpa_tl'}
+ \expandafter\hyphenationmin \l_tmpa_tl%
+ }%
+ {}%
+ \fi
+}
\AtEndPreamble{%
\@ifpackageloaded{bidi}{%