summaryrefslogtreecommitdiff
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
parente9549ffe43d42fda4e5d3778e1d26fbd95e4ae9f (diff)
polyglossia (29jan20)
git-svn-id: svn://tug.org/texlive/trunk@53592 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/README6
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdfbin63924 -> 70425 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-korean.pdfbin17275 -> 17083 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-thai.pdfbin23876 -> 23443 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/examples.pdfbin151775 -> 151269 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdfbin224709 -> 267795 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex1302
-rw-r--r--Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx6225
-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
214 files changed, 9030 insertions, 2538 deletions
diff --git a/Master/texmf-dist/doc/latex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README
index 18b2c4746ae..b2864ae1d11 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/README
+++ b/Master/texmf-dist/doc/latex/polyglossia/README
@@ -1,7 +1,7 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.46 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -34,8 +34,8 @@ Polyglossia makes it possible to automate the following tasks:
LICENSE
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2019 Arthur Reutenauer,
-Copyright (c) 2019 Bastien Roucariès, 2019 Jürgen Spitzmüller
+Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer,
+Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller
Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence
(https://opensource.org/licenses/MIT).
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
index b25a8459f61..f214903dd4c 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
index 5cbffe37ef6..ac3be5e42c9 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
index ee1dea23f29..2d7abc7300b 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
index 9b28e4e3f30..bbe78342e23 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
index 0698550579e..94b595acc66 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
index fd7d8722ec0..e4ca9770215 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
@@ -2,19 +2,19 @@
% !TeX TS-program = xelatex
\documentclass[11pt]{ltxdoc}
\usepackage{color}
-\usepackage{xspace,fancyvrb,booktabs}
+\usepackage{xspace,fancyvrb,longtable,booktabs}
\usepackage[neverdecrease]{paralist}
\usepackage[format=hang,labelfont=bf,labelsep=period]{caption}
-\definecolor{myblue}{rgb}{0.02,0.04,0.48}
+\definecolor{xpgblue}{rgb}{0.02,0.04,0.48}
\definecolor{lightblue}{rgb}{0.61,.8,.8}
-\definecolor{myred}{rgb}{0.65,0.04,0.07}
+\definecolor{xpgred}{rgb}{0.65,0.04,0.07}
\usepackage[
unicode=true,
bookmarks=true,
colorlinks=true,
- linkcolor=myblue,
- urlcolor=myblue,
- citecolor=myblue,
+ linkcolor=xpgblue,
+ urlcolor=xpgblue,
+ citecolor=xpgblue,
hyperindex=false,
hyperfootnotes=false,
pdftitle={Polyglossia: Modern multilingual typesetting with XeLaTeX and LuaLaTeX},
@@ -30,13 +30,13 @@
\setotherlanguages{arabic,armenian,hebrew,syriac,greek,russian,serbian,catalan,georgian}
\usepackage[protrusion]{microtype}
\newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace}
-\newcommand*\pkg[1]{\textsf{\color{myblue}#1}}
-\newcommand*\file[1]{\texttt{\color{myblue}#1}}
-\newcommand*\TR[1]{\textcolor{myred}{#1}}
-\newcommand*\TX[1]{\hyperref[#1]{\textcolor{myred}{#1}}}
-\newcommand*\TB[1]{\textcolor{myblue}{\bf #1}}
-\newcommand*\TA[1]{\textsc{\color{myblue}#1}}
+\newcommand*\pkg[1]{\textsf{\color{xpgblue}#1}}
+\newcommand*\file[1]{\texttt{\color{xpgblue}#1}}
+\newcommand*\TR[1]{\textcolor{xpgred}{#1}}
+\newcommand*\TX[1]{\hyperref[#1]{\textcolor{xpgred}{#1}}}
+\newcommand*\TA[1]{\textsc{\color{xpgblue}#1}}
\newcommand*\link[1]{\href{#1}{#1}}
+\renewcommand*\meta[1]{\texttt{⟨#1⟩}}
\def\eg{\textit{e.g.,}\xspace}
\def\ie{\textit{i.e.,}\xspace}
\def\ca{\textit{ca.}\@\xspace}
@@ -44,14 +44,37 @@
\def\Ie{\textit{I.e.,}\xspace}
\def\etc{\@ifnextchar.{\textit{etc}}{\textit{etc.}\@\xspace}}
+%% Commands for documenting options
+\newcommand*\xpgoption[1]{\textcolor{xpgblue}{\ttfamily\bfseries #1}}
+\newcommand*\xpgvalue[1]{\texttt{#1}}
+\newcommand*\xpgpresetvalue[1]{\texttt{\textit{#1}}}
+\newcommand*\xpgdefaultvalue[1]{\texttt{*#1}}
+
+% arguments: #1 version number, #2 key name, #3 footnote, #4 possible values
+\NewDocumentCommand\xpgchoicekey{omom}{%
+ \xpgoption{#2}\IfValueT{#3}{\footnote{#3}}%
+ \IfValueT{#1}{\new{#1}} \xpgvalue{=} #4\par%
+}
+
+% arguments: #1 version number, #2 key name, #3 footnote
+\NewDocumentCommand\xpgboolkey{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{true} or \xpgvalue{false}}}
+\NewDocumentCommand\xpgboolkeytrue{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{\xpgpresetvalue{true}} or \xpgvalue{false}}}
+\NewDocumentCommand\xpgboolkeyfalse{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{true} or \xpgpresetvalue{false}}}
+
+% arguments: #1 version number, #2 key name, #3 default code
+\NewDocumentCommand\xpgcodekey{omv}{%
+ \xpgoption{#2}\IfValueT{#1}{\new{#1}}
+ \xpgvalue{=} \meta{code} (default value: \texttt{#3})\par%
+}
+
%% Sidenotes << copied from fontspec.dtx
\newcommand\new[1]{%
- \edef\thisversion{#1}%
+ \edef\thisversion{v#1}%
\ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
$\leftarrow$}%
\marginpar{\centering
\small\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
- \textsf{#1}}}
+ \textsf{v#1}}}
\newcommand\displaycmd[2]{%
\\\DescribeMacro{#2}\centerline{\cmd{#1}}}
\renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}%
@@ -71,7 +94,7 @@
\pretocmd{\subsection}{\condbreak{2\baselineskip}}{}{}
%% fontspec declarations:
-\setmainfont{Linux Libertine O}
+\setmainfont{Linux Libertine O}[Numbers=OldStyle]
\setsansfont{Linux Biolinum O}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
@@ -90,12 +113,12 @@
\begin{document}
-\hyphenation{Kha-li-ghi Reu-ten-auer}
+\hyphenation{Kha-li-ghi Reu-ten-auer new-zea-land}
\GetFileInfo{polyglossia.sty}
\title{\textcolor{lightblue}{\Huge\fontspec[LetterSpace=40]{GFS Ambrosia} Πολυγλωσσια}
\\[16pt]
-\color{myblue}Polyglossia: Modern multilingual typesetting with \XeLaTeX\ and \LuaLaTeX}
+\color{xpgblue}Polyglossia: Modern multilingual typesetting with \XeLaTeX\ and \LuaLaTeX}
\author{\TA{François Charette} \and \TA{Arthur Reutenauer}\thanks{Current maintainer}
\and \TA{Bastien Roucariès} \and \TA{Jürgen Spitzmüller}}
\date{\filedate \qquad \fileversion\\
@@ -118,7 +141,7 @@
\section{Introduction}
\pkg{Polyglossia} is a package for facilitating multilingual typesetting with
-\XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it
+\XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it
can be used as an alternative to \pkg{babel} for performing the following
tasks automatically:
@@ -142,7 +165,7 @@ tasks automatically:
that are written from right to left (via the package \pkg{bidi},
available separately).
\end{enumerate}
-
+%
Several features of \pkg{babel} that do not make sense in the \XeTeX\ world (like font
encodings, shorthands, etc.) are not supported.
Generally speaking, \pkg{polyglossia} aims to remain as compatible as possible
@@ -154,7 +177,7 @@ reach this objective.
macros defined in the \pkg{etoolbox} package by \TA{Philipp Lehmann} and \TA{Joseph Wright}.
Being designed for \XeLaTeX\ and \LuaLaTeX, it obviously also relies on \pkg{fontspec} by
\TA{Will Robertson}. For languages written from right to left, it needs the package \pkg{bidi}
-(for \XeTeX) or \pkg{luabidi} (for \LuaTeX) by \TA{Vafa Khalighi} (\textarabic{وفا خليقي}) and
+(for \XeTeX) or \pkg{luabidi} (for \LuaTeX) by \TA{Vafa Khalighi} (\textarabic{وفا خليقي}) and
the \pkg{bidi-tex GitHub Organisation}.
Polyglossia also bundles three packages for calendaric computations (\pkg{hebrewcal},
\pkg{hijrical}, and \pkg{farsical}).
@@ -165,16 +188,16 @@ Polyglossia also bundles three packages for calendaric computations (\pkg{hebrew
\subsection{Activating languages}
The default language of a document is specified by means of the command
- \displaycmd{\setdefaultlanguage[⟨options⟩]\{⟨lang⟩\}}{\setdefaultlanguage}
+ \displaycmd{\setdefaultlanguage\oarg{options}\marg{lang}}{\setdefaultlanguage}
(or, equivalently, \Cmd\setmainlanguage).
Secondary languages are specified with
- \displaycmd{\setotherlanguage[⟨options⟩]\{⟨lang⟩\}.}{\setotherlanguage}
+ \displaycmd{\setotherlanguage\oarg{options}\marg{lang}.}{\setotherlanguage}
All these commands allow you to set language-specific options.\footnote{%
Section~\ref{specific} documents these options for the respective languages.}
It is also possible to load a series of secondary languages at once (but without options)
using
- \displaycmd{\setotherlanguages\{⟨lang1⟩,⟨lang2⟩,⟨lang3⟩,…\}.}{\setotherlanguages}
-
+ \displaycmd{\setotherlanguages\marg{lang1⟩,⟨lang2⟩,⟨lang3⟩,⟨…}.}{\setotherlanguages}
+%
All language-specific options can be modified locally by means of the
language-switching commands described in section \ref{languageswitching}.
@@ -195,7 +218,7 @@ that are explained in section \ref{specific} below.
% Edited by hand -- JS, 2019-11-01
\begin{tabular}{lllll}
\toprule
-\TX{afrikaans} & danish & \TX{hungarian} & marathi & \TX{slovenian} \\
+\TX{afrikaans} & danish & \TX{hungarian} & \TX{marathi} & \TX{slovenian} \\
albanian & divehi & icelandic & \TX{mongolian} & \TX{sorbian} \\
amharic & \TX{dutch} & interlingua & nko & \TX{spanish} \\
\TX{arabic} & \TX{english} & \TX{italian} & \TX{norwegian} & swedish \\
@@ -209,26 +232,26 @@ breton & galician & \TX{latin} & romansh & turkmen
bulgarian & \TX{georgian} & latvian & \TX{russian} & \TX{ukrainian} \\
\TX{catalan} & \TX{german} & lithuanian & \TX{sami} & urdu \\
coptic & \TX{greek} & macedonian & \TX{sanskrit} & vietnamese \\
-croatian & \TX{hebrew} & \TX{malay} & \TX{serbian} & \TX{welsh} \\
+\TX{croatian} & \TX{hebrew} & \TX{malay} & \TX{serbian} & \TX{welsh} \\
\TX{czech} & \TX{hindi} & malayalam & \TX{slovak} & \\
\bottomrule
\end{tabular}
\end{table}
-\paragraph{Version Notes} The support for Amharic\new{v1.0.1} should be considered an experimental attempt to
+\paragraph{Version Notes} The support for Amharic\new{1.0.1} should be considered an experimental attempt to
port the package \pkg{ethiop}; feedback is welcome.
-Version 1.1.1\new{v1.1.1} added support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.},
+Version 1.1.1\new{1.1.1} added support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.},
Lithuanian, %\footnote{ Provided by Kevin Godby and Paulius Sladkevičius.},
and Urdu. %\footnote{ Provided by Kamal Abdali.}
%
-Version 1.2\new{v1.2.0} introduced Armenian, Occitan, Bengali,
+Version 1.2\new{1.2.0} introduced Armenian, Occitan, Bengali,
Lao, Malayalam, Marathi, Tamil, Telugu, and Turkmen.\footnote{%
See acknowledgements at the end for due credit to the various contributors.}
-Version 1.43\new{v1.43} brought basic support for Japanese (this
+Version 1.43\new{1.43} brought basic support for Japanese (this
is considered experimental, feedback is appreciated).
-In version 1.45\new{v1.45}, support for Kurdish and Mongolian as well as some new
-variants (Canadian French and English) have been added. Furthermore, for consistency reasons, some language have
+In version 1.45\new{1.45}, support for Kurdish and Mongolian as well as some new
+variants (Canadian French and English) have been added. Furthermore, for consistency reasons, some language have
been renamed (\emph{farsi}\textrightarrow\emph{persian}, \emph{friulan}\textrightarrow\emph{friulian},
\emph{magyar}\textrightarrow\emph{hungarian}, \emph{portuges}\textrightarrow\emph{portuguese},
\emph{samin}\textrightarrow\emph{sami}) or merged (\emph{bahasai}\slash\emph{bahasam}\textrightarrow\emph{malay},
@@ -237,10 +260,10 @@ been renamed (\emph{farsi}\textrightarrow\emph{persian}, \emph{friulan}\textrigh
\emph{irish}\slash\emph{scottish}\textrightarrow\emph{gaelic},
\emph{norsk}\slash\emph{nynorsk}\textrightarrow\emph{norwegian}). The old names are still supported for backwards
compatibility reasons.
-Version 1.46\new{v1.46} introduces support for Afrikaans, Belarusian, Bosnian and Georgian.
+Version 1.46\new{1.46} introduces support for Afrikaans, Belarusian, Bosnian and Georgian.
-\subsection{Relation to and use of Babel language names}
+\subsection{Relation to and use of Babel language names}\label{sec:babelnames}
If you are familiar with the \pkg{babel} package, you will note that \pkg{polyglossia}'s language naming
slightly differs. Whereas \pkg{babel} has a unique name for each language variety (\eg\emph{american} and \emph{british}),
@@ -249,7 +272,7 @@ slightly differs. Whereas \pkg{babel} has a unique name for each language variet
Furthermore, \pkg{babel} sometimes uses abbreviated language names (\eg\emph{bahasam} for Bahasa Malayu) as well
as endonyms, \ie language names coming from the designated languages (such as \emph{bahasa}, \emph{canadien} or \emph{magyar}).
As opposed to this, \pkg{polyglossia} always uses spelled-out (lower-cased) English language names.
-Please refer to table~\ref{tab:bbllang} for the differing language names in both packages.
+Please refer to table~\ref{tab:bbllang} for the differing language names in both packages.
\begin{table}
\caption{\label{tab:bbllang}Babel-polyglossia language name matching}
@@ -257,7 +280,7 @@ Please refer to table~\ref{tab:bbllang} for the differing language names in both
\begin{minipage}[t]{1\columnwidth}
\small\centering
\begin{tabular}{lll}
-\toprule
+\toprule
\textbf{Babel name} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\tabularnewline
\midrule
acadien & french & variant=acadian \\
@@ -270,20 +293,20 @@ brazil & portuguese & variant=brazilian \\
british & english & variant=british \\
canadian & english & variant=canadian \\
canadien & french & variant=canadian \\
+classiclatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.classic}).}
+ & latin & variant=classic \\
farsi & persian & \\
+ecclesiasticlatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.ecclesiastic}).}
+ & latin & variant=ecclesiastic \\
friulan & friulian & \\
german\footnote{Due to the name conflict only available in \pkg{polyglossia} as \emph{germanb} (which is a \pkg{babel} synonym).}
& german & spelling=old \\
irish & gaelic & variant=irish [\emph{default}] \\
kurmanji & kurdish & variant=kurmanji \\
-latin.classic\footnote{Available in \pkg{polyglossia} as \emph{latinclassic} (as dots are invalid in command names).}
- & latin & variant=classic \\
-latin.ecclesiastic\footnote{Available in \pkg{polyglossia} as \emph{latinecclesiastic} (as dots are invalid in command names).}
- & latin & variant=ecclesiastic \\
-latin.medieval\footnote{Available in \pkg{polyglossia} as \emph{latinmedieval} (as dots are invalid in command names).}
- & latin & variant=medieval \\
lowersorbian & sorbian & variant=lower \\
magyar & hungarian & \\
+medievallatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.medieval}).}
+ & latin & variant=medieval \\
naustrian & german & variant=austrian \\
newzealand & english & variant=newzealand \\
ngerman & german & variant=german [\emph{default}] \\
@@ -298,62 +321,247 @@ serbianc & serbian & script=Cyrillic \\
slovene & slovenian & \\
spanishmx & spanish & variant=mexican \\
swissgerman & german & variant=swiss, spelling=old \\
-uppersorbian & sorbian & variant=upper \\
+uppersorbian & sorbian & variant=upper [\emph{default}] \\
\bottomrule
\end{tabular}
\end{minipage}
\end{table}
-For convenience reasons, \pkg{polyglossia} also supports the use of babel names\new{v1.46} (for the few justified
+For convenience reasons, \pkg{polyglossia} also supports the use of babel names\new{1.46} (for the few justified
exceptions, please refer to the notes in table~\ref{tab:bbllang}).
The babel names listed in table~\ref{tab:bbllang} can be used instead of the corresponding polyglossia
name\slash options in \cmd\setdefaultlanguage\ and \cmd\setotherlanguage\ as well as in the \pkg{polyglossia} and
\pkg{babel} language switching commands\slash environments documented in section~\ref{sec:langcmds} and
-\ref{sec:babelcmds} (\eg \cmd\textaustrian\ is synonymous to \cmd{\textgerman[variant=austrian,spelling=old]}).
+\ref{sec:babelcmds} (\eg \cmd\textaustrian\ is synonymous to ¦\textgerman[variant=austrian,spelling=old]¦).
However, unless you have special reasons, we strongly encourage you to use the \pkg{polyglossia} names.
+\subsection{Using IETF language tags}\label{sec:langtags}
+
+\pkg{Polyglossia}\new{1.47} also supports the use of language tags that conform to the IETF BCP-47
+\emph{Best Current Practice}.\footnote{Please refer to \url{https://tools.ietf.org/html/bcp47} and
+ \url{https://en.wikipedia.org/wiki/IETF_language_tag} for details.}
+Thus, you can use tags such as ¦en-GB¦ (for British English) or ¦de-AT-1901¦ (for Austrian German, old spelling)
+in \cmd\setdefaultlanguage\ and \cmd\setotherlanguage\ as well as in the language switching command
+\cmd{\textlang\marg{tag}}, the environment \cmd{\begin\{lang\}\marg{tag}} \ldots\ \cmd{\end\{lang\}} and the \pkg{babel}
+language switching commands\slash environments documented in section~\ref{sec:babelcmds}.
+Table~\ref{tab:BCP47-polyglossia} lists the currently supported tags.
+
+\bgroup\small\addfontfeatures{Numbers={Monospaced,Lining}}
+\begin{longtable}[c]{lll}
+ \caption{\label{tab:BCP47-polyglossia}BCP47-polyglossia language name matching}\\
+ \toprule
+ \textbf{BCP-47 tag} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\\
+ \midrule
+ \endfirsthead
+ \caption[]{BCP47-polyglossia language name matching (\emph{continued})}\\
+ \toprule
+ \textbf{BCP-47 tag} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\\
+ \midrule
+ \endhead
+ aeb & arabic & locale=tunisia \\
+ af & afrikaans & \\
+ afb & arabic & locale=default \\
+ am & amharic & \\
+ apd & arabic & locale=default \\
+ ar & arabic & \\
+ ar-IQ & arabic & locale=mashriq \\
+ ar-JO & arabic & locale=mashriq \\
+ ar-LB & arabic & locale=mashriq \\
+ ar-MR & arabic & locale=mauritania \\
+ ar-PS & arabic & locale=mashriq \\
+ ar-SY & arabic & locale=mashriq \\
+ ar-YE & arabic & locale=default \\
+ arq & arabic & locale=algeria \\
+ ary & arabic & locale=morocco \\
+ arz & arabic & locale=default \\
+ ast & asturian & \\
+ ayl & arabic & locale=libya \\
+ be & belarusian & \\
+ be-tarask & belarusian & spelling=classic \\
+ bg & bulgarian & \\
+ bn & bengali & \\
+ bo & tibetan & \\
+ br & breton & \\
+ bs & bosnian & \\
+ ca & catalan & \\
+ ckb & kurdish & variant=sorani [\emph{default}] \\
+ ckb-Arab & kurdish & variant=sorani, script=Arabic [\emph{default}] \\
+ ckb-Latn & kurdish & variant=sorani, script=Latin \\
+ cop & coptic & \\
+ cy & welsh & \\
+ cz & czech & \\
+ da & danish & \\
+ de & german & \\
+ de-AT & german & variant=austrian, spelling=new \\
+ de-AT-1901 & german & variant=austrian, spelling=old \\
+ de-AT-1996 & german & variant=austrian, spelling=new \\
+ de-CH & german & variant=swiss, spelling=new \\
+ de-CH-1901 & german & variant=swiss, spelling=old \\
+ de-CH-1996 & german & variant=swiss, spelling=new \\
+ de-DE & german & variant=german, spelling=new \\
+ de-DE-1901 & german & variant=german, spelling=old \\
+ de-DE-1996 & german & variant=german, spelling=new [\emph{default}] \\
+ de-Latf & german & script=blackletter \\
+ de-Latf-AT & german & variant=austrian, spelling=new, script=blackletter \\
+ de-Latf-AT-1901 & german & variant=austrian, spelling=old, script=blackletter \\
+ de-Latf-AT-1996 & german & variant=austrian, spelling=new, script=blackletter \\
+ de-Latf-CH & german & variant=swiss, spelling=new, script=blackletter \\
+ de-Latf-CH-1901 & german & variant=swiss, spelling=old, script=blackletter \\
+ de-Latf-CH-1996 & german & variant=swiss, spelling=new, script=blackletter \\
+ de-Latf-DE & german & variant=german, spelling=new, script=blackletter \\
+ de-Latf-DE-1901 & german & variant=german, spelling=old, script=blackletter \\
+ de-Latf-DE-1996 & german & variant=german, spelling=new, script=blackletter \\
+ dsb & sorbian & variant=lower \\
+ dv & divehi & \\
+ el & greek & \\
+ el-monoton & greek & variant=monotonic [\emph{default}] \\
+ el-polyton & greek & varant=polytonic \\
+ en & english & \\
+ en-AU & english & variant=australian \\
+ en-CA & english & variant=canadian \\
+ en-GB & english & variant=british \\
+ en-NZ & english & variant=newzealand \\
+ en-US & english & variant=us [\emph{default}] \\
+ eo & esperanto & \\
+ es & spanish & \\
+ es-ES & spanish & variant=spanish [\emph{default}] \\
+ es-MX & spanish & variant=mexican \\
+ et & estonian & \\
+ eu & basque & \\
+ fa & persian & \\
+ fi & finnish & \\
+ fr & french & \\
+ fr-CA & french & variant=canadian \\
+ fr-CH & french & variant=swiss \\
+ fr-FR & french & variant=french [\emph{default}] \\
+ fur & friulian & \\
+ ga & gaelic & variant=irish [\emph{default}] \\
+ gd & gaelic & variant=scottish \\
+ gl & galician & \\
+ grc & greek & variant=ancient \\
+ he & hebrew & \\
+ hi & hindi & \\
+ hr & croatian & \\
+ hsb & sorbian & variant=upper [\emph{default}] \\
+ hu & hungarian & \\
+ hy & armenian & \\
+ ia & interlingua & \\
+ id & malay & variant=indonesian \\
+ is & icelandic & \\
+ it & italian & \\
+ ja & japanese & \\
+ ka & georgian & \\
+ km & khmer & \\
+ kmr & kurdish & variant=kurmanji \\
+ kmr-Arab & kurdish & variant=kurmanji, script=Arabic \\
+ kmr-Latn & kurdish & variant=kurmanji, script=Latin \\
+ kn & kannada & \\
+ ko & korean & \\
+ ku & kurdish & \\
+ ku-Arab & kurdish & script=Arabic \\
+ ku-Latn & kurdish & script=Latin \\
+ la & latin & \\
+ la-x-classic & latin & variant=classic \\
+ la-x-ecclesia & latin & variant=ecclesiastic \\
+ la-x-medieval & latin & variant=medieval \\
+ lo & lao & \\
+ lt & lithuanian & \\
+ lv & latvian & \\
+ mk & macedonian & \\
+ ml & malayalam & \\
+ mn & mongolian & \\
+ mr & marathi & \\
+ nb & norwegian & variant=bokmal \\
+ nko & nko & \\
+ nl & dutch & \\
+ nn & norwegian & variant=nynorsk [\emph{default}] \\
+ oc & occitan & \\
+ pl & polish & \\
+ pms & piedmontese & \\
+ pt & portuguese & \\
+ pt-BR & portuguese & variant=brazilian \\
+ pt-PT & portuguese & variant=portuguese [\emph{default}] \\
+ rm & romansh & \\
+ ro & romanian & \\
+ ru & russian & \\
+ ru-luna1918 & russian & spelling=modern [\emph{default}] \\
+ ru-petr1708 & russian & spelling=old \\
+ sa & sanskrit & \\
+ sa-Beng & sanskrit & script=Bengali \\
+ sa-Deva & sanskrit & script=Devanagari [\emph{default}] \\
+ sa-Gujr & sanskrit & script=Gujarati \\
+ sa-Knda & sanskrit & script=Kannada \\
+ sa-Mlym & sanskrit & script=Malayalam \\
+ sa-Telu & sanskrit & script=Telugu \\
+ se & sami & \\
+ sk & slovak & \\
+ sl & slovenian & \\
+ sq & albanian & \\
+ sr & serbian & \\
+ sr-Cyrl & serbian & script=Cyrillic \\
+ sr-Latn & serbian & script=Latin [\emph{default}] \\
+ sv & swedish & \\
+ syr & syriac & \\
+ ta & tamil & \\
+ te & telugu & \\
+ th & thai & \\
+ tk & turkmen & \\
+ tr & turkish & \\
+ uk & ukrainian & \\
+ ur & urdu & \\
+ vi & vietnamese & \\
+ zsm & malay & variant=malaysian [\emph{default}] \\
+ \bottomrule
+\end{longtable}
+\egroup
+
\subsection{Global options}
\pkg{Polyglossia} can be loaded with the following global package options:
\begin{itemize}
- \item \TB{babelshorthands}\new{v1.1.1} globally activates \pkg{babel}
- shorthands whenever available. Currently shorthands are implemented for
- Afrikaans, Belarusian, Catalan, Czech, Dutch, Finnish, Georgian, German,
- Italian, Latin, Mongolian, Russian, and Slovak. Please refer to the respective
- language descriptions (sec.~\ref{specific}) for details.
-
- \item \TB{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
- \cmd\markright. In earlier versions of \pkg{polyglossia},\new{v1.2.0} this
+ \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+ Globally activates \pkg{babel} shorthands whenever available. Currently
+ shorthands are implemented for Afrikaans, Belarusian, Catalan, Croatian,
+ Czech, Dutch, Finnish, Georgian, German, Italian, Latin, Mongolian,
+ Russian, Slovak, and Ukrainian. Please refer to the respective language descriptions
+ (sec.~\ref{specific}) for details.
+
+ \item \xpgoption{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
+ \cmd\markright. In earlier versions of \pkg{polyglossia},\new{1.2.0} this
option was set by default, but we now realize that it causes more problems
than it helps, so it is now off by default. For backwards-compatibility, the
- option \TB{nolocalmarks} which used to switch off the previous default, and
+ option \xpgoption{nolocalmarks} which used to switch off the previous default, and
now does nothing, is still available.
- \item \TB{quiet} turns off most info messages and some of the warnings issued
+ \item \xpgoption{quiet} turns off most info messages and some of the warnings issued
by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}.
\end{itemize}
+\condbreak{5\baselineskip}
\section{Language-switching commands}\label{languageswitching}
\subsection{Recommended commands}\label{sec:langcmds}
For each activated language the command
-\cmd{\text⟨lang⟩[⟨options⟩]\{…\}} \DescribeMacro{\text⟨lang⟩}
+\cmd{\text\meta{lang}\oarg{options}\marg{…}} \DescribeMacro{\text\meta{lang}}
(as well as the synonymous \DescribeMacro{\textlang}%
-\cmd{\textlang[⟨options⟩]\{⟨lang⟩\}\{…\}}\new{1.46})
+\cmd{\textlang\oarg{options}\marg{lang}\marg{…}}\new{1.46})
becomes available for short insertions of text in that language.
+
For example ¦\textrussian{\today}¦ and ¦\textlang{russian}{\today}¦ yield \textrussian{\today}
The commands switch to the correct hyphenation patterns, they activate
some extra features for the selected language (such as extra spacing before
-punctuation in French), and they translate the date when using ¦\today¦.
-They do not, however, translate so-called \textit{caption strings},\ie
-``chapter'', ``figure'' etc., to the local language (these remain in the main
+punctuation in French), and they translate the date when using \cmd\today.
+They do not, however, translate so-called \textit{caption strings}, \ie
+``chapter'', ``figure'' etc., to the local language (these remain in the currently active `outer'
language).
-The\DescribeEnv{⟨lang⟩}\ environment ¦⟨lang⟩¦, which is also available for any activated language,
-is meant for longer passages of text. It behaves slightly different than the \cmd{\text⟨lang⟩} and
+The\DescribeEnv{\meta{lang}}\ environment \meta{lang}, which is also available for any activated language
+(as well as the equivalent \DescribeMacro{lang}%
+\cmd{\begin\{lang\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{lang\}}\new{1.47}),
+is meant for longer passages of text. It behaves slightly different than the \cmd{\text\meta{lang}} and
\cmd\textlang\ commands: It does everything the latter do, but additionally, the caption strings
are translated as well, and the language is also passed to auxiliary files, the table of contents
and the lists of figures/tables.
@@ -361,7 +569,7 @@ Like the commands, the environment provides the possibility of setting language
For instance the following allows us to quote the beginning
of Homer’s \textit{Iliad}:
-\begin{Verbatim}[formatcom=\color{myblue}]
+\begin{Verbatim}[formatcom=\color{xpgblue}]
\begin{quote}
\begin{greek}[variant=ancient]
μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος οὐλομένην, ἣ μυρί' Ἀχαιοῖς
@@ -393,17 +601,17 @@ Some macros defined in \pkg{babel}’s \file{hyphen.cfg} (and thus usually
compiled into the \XeLaTeX\ and \LuaLaTeX\ format) are redefined, but keep a
similar behaviour.
\begin{itemize}
-\item \DescribeMacro{\selectlanguage}\cmd{\selectlanguage[⟨options⟩]\{⟨lang⟩\}}
-\item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage[⟨options⟩]\{⟨lang⟩\}\{…\}}
-\item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}[⟨options⟩]\{⟨lang⟩\}} \dots{} \cmd{\end\{otherlanguage\}}
-\item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}[⟨options⟩]\{⟨lang⟩\}} \dots{} \cmd{\end\{otherlanguage*\}}
+\item \DescribeMacro{\selectlanguage}\cmd{\selectlanguage\oarg{options}\marg{lang}}
+\item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage\oarg{options}\marg{lang}\marg{…}}
+\item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage\}}
+\item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage*\}}
\end{itemize}
%
-¦\selectlanguage{⟨lang⟩}¦ and the ¦otherlanguage¦ environment are identical to the
-the ¦⟨lang⟩¦ environment, except that ¦\selectlanguage{⟨lang⟩}¦
-does not need to be explicitly closed. The command ¦\foreinlanguage{⟨lang⟩}{…}¦ and the ¦otherlanguage*¦
-environment are identical with the use of the ¦\text⟨lang⟩¦ or ¦\textlang¦ command, with the one
-notable exception that they do not translate the date with ¦\today¦.
+\cmd\selectlanguage\marg{lang} and the ¦otherlanguage¦ environment are identical to the
+the \meta{lang} environment, except that \cmd\selectlanguage\marg{lang}
+does not need to be explicitly closed. The command \cmd\foreinlanguage\marg{lang}\marg{…} and the ¦otherlanguage*¦
+environment are identical with the use of the \cmd\text\meta{lang} or \cmd\textlang\ command, with the one
+notable exception that they do not translate the date with \cmd\today.
Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg},
the low-level commands for hyphenation and language switching
@@ -411,13 +619,12 @@ defined there are also accessible.
\subsection{Other commands}
The following commands are probably of lesser interest to the end user, but
-ought to be mentioned here.\footnote{Note that these commands require polyglossia
-language names; they do not support language\slash babel aliases.}
+ought to be mentioned here.
\begin{itemize}
-\item \DescribeMacro{\selectbackgroundlanguage}\cmd{\selectbackgroundlanguage\{⟨lang⟩\}}:
+\item \DescribeMacro{\selectbackgroundlanguage}\cmd{\selectbackgroundlanguage\marg{lang}}:
this selects the global font setup and the numbering definitions for the default language.
-\item \DescribeMacro{\resetdefaultlanguage}\cmd{\resetdefaultlanguage[⟨options⟩]\{⟨lang⟩\}} (experimental):
+\item \DescribeMacro{\resetdefaultlanguage}\cmd{\resetdefaultlanguage\oarg{options}\marg{lang}} (experimental):
completely switches the default language
to another one in the middle of a document: \textit{this may have adverse effects}!
@@ -435,43 +642,49 @@ language names; they do not support language\slash babel aliases.}
\subsection{Setting up alias commands}
By means of the macro
-\displaycmd{\setlanguagealias[⟨options⟩]\{⟨language⟩\}\{⟨alias⟩\}}{\setlanguagealias}\new{v1.46}
+\displaycmd{\setlanguagealias\oarg{options}\marg{language}\marg{alias}}{\setlanguagealias}\new{1.46}
you can define alias commands for specific language (variants). \Eg
\begin{quote}
\begin{verbatim}
-\setlanguagealias[variant=austrian]{german}{deAT}
+\setlanguagealias[variant=austrian]{german}{AT}
\end{verbatim}
\end{quote}
%
-will define a command \cmd{\textdeAT} as well as an environment ¦{deAT}¦ which will link towards
-the command \cmd{\textgerman[variant=austrian]} and the environment ¦{german}[variant=austrian]¦,
+will define a command \cmd{\textAT} as well as an environment ¦{AT}¦ which will link towards
+the command ¦\textgerman[variant=austrian]¦ and the environment ¦{german}[variant=austrian]¦,
respectively. The aliases can also be used in the language switching commands described in
section~\ref{sec:langcmds} and \ref{sec:babelcmds}.
Note, though, that the usual restrictions for command names apply, so something such as
-¦de-AT¦ or ¦de_AT¦ will not work since ¦-¦ and ¦_¦ are not allowed in command names.
+¦de-AT¦ or ¦de_AT¦ will not work since ¦-¦ and ¦_¦ are not allowed in command names (the same
+holds true for any non-ASCII character and for digits).
+
+For the latter case, and for the case where an alias would clash with an existing command
+(\eg ¦\fi¦) or a \cmd{\text\meta{\ldots}} command (\eg \cmd\textit), a starred version \Cmd{\setlanguagealias*}
+is provided which does neither define a \cmd{\text\meta{alias}} command nor an \meta{alias} environment,
+but which will set up the alias for everything else, including \cmd{\textlang\marg{alias}}
+and \cmd{\begin\{lang\}\marg{alias}}.
-For the latter case, and for the case where an alias would clash with an existing \cmd{\text⟨...⟩}
-command (\eg ¦\textit¦), a starred version \Cmd{\setlanguagealias*} is provided which does not define
-a \cmd{\text⟨alias⟩} command (but which will set up the alias for everything else, including
-\cmd{\textlang\{⟨alias⟩\}}).
+\pkg{Polyglossia} comes with some aliases predefined, namely aliases for \pkg{babel} language names
+(see sec.~\ref{sec:babelnames}) and for IETF BCP-47 language tags (the latter via \cmd{\setlanguagealias*};
+see sec.~\ref{sec:langtags}).
\section{Font setup}
With polyglossia it is possible to associate a specific font with any script or language
that occurs in the document. That font should always be defined as
-¦\⟨script⟩font¦\ or ¦\⟨language⟩font¦.
+\cmd{\⟨script⟩font}\ or \cmd{\⟨language⟩font}.
For instance, if the default font defined by \cmd\setmainfont\
does not support Greek, then one can define the font used to display Greek with:\\
-\centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,⟨…⟩]\{⟨font⟩\}}. }
+\centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,\meta{…}]\marg{font}}. }
Note that polyglossia will use the font defined as is, so assure to do all necessary settings
(please refer to the \pkg{fontspec} documentation for details).
-For instance, if ¦\arabicfont¦ is explicitly defined, then the option ¦Script=Arabic¦ should
+For instance, if \cmd\arabicfont\ is explicitly defined, then the option ¦Script=Arabic¦ should
be included in that definition.
If a specific sans serif or monospace (`teletype') font is needed for a particular script or language,
-it can be defined by means of \new{v1.2.0}
-¦\⟨script⟩fontsf¦\ or ¦\⟨language⟩fontsf¦ and ¦\⟨script⟩fonttt¦\ or ¦\⟨language⟩fonttt¦, respectively.
+it can be defined by means of \new{1.2.0}
+\cmd{\⟨script⟩fontsf} or \cmd{\⟨language⟩fontsf} and \cmd{\⟨script⟩fonttt} or \cmd{\⟨language⟩fonttt}, respectively.
Whenever a new language is activated, \pkg{polyglossia} will first check whether
a font has been defined for that language or – for languages in non-Latin scripts –
@@ -486,7 +699,7 @@ displayed.
\subsection{Hyphenation exceptions}
-\TeX\ provides the command ¦\hyphenation{⟨exceptions⟩}¦ to globally define hyphenation exceptions
+\TeX\ provides the command \cmd\hyphenation\marg{exceptions} to globally define hyphenation exceptions
which override the hyphenation patterns for specified words. The command takes as argument a space-separated
list of words where hyphenation points are marked by a dash (if no dash is used, the respective word is not
hyphenated at all):
@@ -498,8 +711,8 @@ hyphenated at all):
\end{Verbatim}
%
These exceptions, however, apply to all languages. In addition to this, \pkg{polyglossia} provides
-the command\new{v1.45}
-\displaycmd{\pghyphenation[⟨options⟩]\{⟨lang⟩\}\{⟨exceptions⟩\}}{\pghyphenation}
+the command\new{1.45}
+\displaycmd{\xpghyphenation\oarg{options}\marg{lang}\marg{exceptions}}{\xpghyphenation}
which can be used to define exceptions that only apply to a specific language or language variant,
respectively.
@@ -514,25 +727,33 @@ will be activated.
\section{Language-specific options and commands}\label{specific}
-This section gives a list of all languages for which options and end-user commands are defined.
-The default value of each option is given in italic.
-
-%\subsection{amharic}\label{amharic}
+This section gives a list of all languages for which options and end-user
+commands are defined. Note the following conventions:
+\begin{itemize}
+ \item The preset value of each option (\ie the setting that applies by default,
+ if the option is not explicitly set) is given in \xpgpresetvalue{italics}.
+ \item If an option key may be used without a value, the value that applies
+ for value-less keys is marked by a preceding \xpgdefaultvalue{asterisk}.
+\end{itemize}
+For instance, \texttt{babelshorthands = *true} or \texttt{\textit{false}} means that
+\xpgvalue{babelshorthands} is \xpgvalue{false} by default in the respective language,
+and that passing \xpgvalue{babelshorthands} (without value) is equivalent to passing
+\xpgvalue{babelshorthands=true}.
-\subsection{afrikaans}\label{afikaans}
+\subsection{afrikaans}\label{afrikaans}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
- if this is turned on, the following shorthands defined for fine-tuning hyphenation and
+ \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+ If this is turned on, the following shorthands defined for fine-tuning hyphenation and
micro-typography of Afrikaans words are activated:
\begin{shorthands}
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦ in default \TeX).
+ in the hyphenation patterns (as opposed to \cmd\- in default \TeX).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"|¦] disables a ligature at this position.
\item[¦""¦] allows for a line break at this position (without hyphenation sign).
- \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
\end{shorthands}
\end{itemize}
@@ -540,23 +761,23 @@ The default value of each option is given in italic.
\subsection{arabic}\label{arabic}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{calendar} = \textit{gregorian} or islamic (= hijri)
- \item \TB{locale} = \textit{default},\footnote{ %
- For Egypt, Sudan, Yemen and the Gulf states.}
- mashriq,\footnote{ %
- For Iraq, Syria, Jordan, Lebanon and Palestine.}
- libya, algeria, tunisia, morocco, or mauritania.
+ \item \xpgchoicekey{calendar}{\xpgpresetvalue{gregorian} or \xpgvalue{islamic} (= \xpgvalue{hijri})}
+ \item \xpgchoicekey{locale}{\xpgpresetvalue{default}\footnote{ %
+ For Egypt, Sudan, Yemen and the Gulf states.},
+ \xpgvalue{mashriq}\footnote{ %
+ For Iraq, Syria, Jordan, Lebanon and Palestine.},
+ \xpgvalue{libya}, \xpgvalue{algeria}, \xpgvalue{tunisia}, \xpgvalue{morocco}, \xpgvalue{mauritania}}
This setting influences the spelling of the month names for the Gregorian calendar,
as well as the form of the numerals (unless overriden by the following option).
- \item \TB{numerals} = \textit{mashriq} or maghrib
- (the latter is the default when locale = algeria, tunisia or morocco)
- \item \TB{abjadjimnotail} = \textit{false} or true. \new{v1.0.3}
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{mashriq} or \xpgvalue{maghrib}}
+ The latter is the default when \xpgvalue{locale=algeria}, \xpgvalue{tunisia}, or \xpgvalue{morocco}.
+ \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail}
Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
\item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
- \item \Cmd\aemph to emphasize text with ¦\overline¦.\new{v1.2.0}
+ \item \Cmd\aemph to emphasize text with \cmd\overline.\new{1.2.0}
¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}.
This command is also available for Farsi, Urdu, etc.
\end{itemize}
@@ -564,19 +785,19 @@ The default value of each option is given in italic.
\subsection{armenian}\label{armenian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant}\new{v1.45} = eastern or \textit{western}
- \item \TB{numerals}\new{v1.45} = armenian or \textit{arabic}
+ \item \xpgchoicekey[1.45]{variant}{\xpgvalue{eastern} or \xpgpresetvalue{western}}
+ \item \xpgchoicekey[1.45]{numerals}{\xpgvalue{armenian} or \xpgpresetvalue{arabic}}
\end{itemize}
-\subsection[belarusian]{belarusian\new{v1.46}}\label{belarusian}
+\subsection[belarusian]{belarusian\new{1.46}}\label{belarusian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true.
+ \item \xpgboolkeyfalse{babelshorthands}
If this is turned on, the following shorthands are activated:
\begin{shorthands}
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
+ in the hyphenation patterns (as opposed to \cmd\-).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"|¦] disables a ligature at this position.
@@ -590,67 +811,123 @@ The default value of each option is given in italic.
\item[¦"<¦] for French left double quotes (looks like <<).
\item[¦">¦] for French right double quotes (looks like >>).
\end{shorthands}
- \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
- alphanumerical numbering.
- \item \TB{spelling} = \textit{modern} or classic (=~tarask). With ¦spelling=classic¦, captions and dates
- adhere to the Taraškievica (or Belarusian classical) orthography rather than the standard orthography.
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+ Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+ \begin{itemize}
+ \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+ \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+ \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+ It supports numbers up to 999\,999.
+ \end{itemize}
+ \item \xpgchoicekey{spelling}{\xpgpresetvalue{modern} or \xpgvalue{classic} (= \xpgvalue{tarask})}
+ With ¦spelling=classic¦, captions and dates adhere to the Taraškievica (or
+ Belarusian classical) orthography rather than the standard orthography.
\end{itemize}
%
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
- environments such as ¦enumerate¦. The command takes a counter as argument,
- \eg ¦\textbelarusian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
- \item \Cmd\asbuk: same in lowercase
+ \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+ It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+ The command takes a counter as argument, \eg ¦\textbelarusian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
+ \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+ \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+ numbers up to 999\,999.\\
+ \Eg ¦\textbelarusian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+ \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
\end{itemize}
-\subsection[bengali]{bengali\new{v1.2.0}}\label{bengali}
+\subsection[bengali]{bengali\new{1.2.0}}\label{bengali}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = Western, Bengali or \textit{Devanagari}
- \item \TB{changecounternumbering} = true or \textit{false} (use specified
- numerals for headings and page numbers)
+ \item \xpgchoicekey{numerals}{\xpgvalue{Western}, \xpgvalue{Bengali}, or \xpgpresetvalue{Devanagari}}
+ \item \xpgboolkeyfalse{changecounternumbering}
+ Use specified numerals for headings and page numbers.
\end{itemize}
\subsection{catalan}\label{catalan}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
- Activates the shorthands \texttt{"l} and \texttt{"L} to type geminated l’s.
+ \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+ Activates the shorthands \texttt{"l} and \texttt{"L} to type geminated l or L.
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd{\l.l} and \Cmd{\L.L}\new{v1.1.1} can be used to type a geminated l, as in \textit{co\l.laborar},
+ \item \Cmd{\l.l} and \Cmd{\L.L}\new{1.1.1} can be used to type a geminated l, as in \textit{co\l.laborar},
similar to \pkg{babel} (the glyph U+00B7 MIDDLE DOT is used as a geminating sign).
\end{itemize}
+\subsection{croatian}\label{croatian}
+\paragraph*{Options:}
+\begin{itemize}
+ \item \xpgboolkeyfalse[1.47]{babelshorthands}
+ If this is turned on, the following shorthands for fine-tuning hyphenation and micro-typography
+ of Croatian words are activated.
+ \begin{shorthands}
+ \item[¦"|¦] disables a ligature at this position.
+ \item[¦"=¦] for an explicit hyphen with a breakpoint, allowing for hyphenation at the
+ other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
+ \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+ cases where the hyphen should stick at the following syllable.
+ \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
+ in the hyphenation patterns (as opposed to \cmd\-).
+ \item[¦""¦] allows for a line break at this position (without hyphenation sign).
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation
+ at the breakpoints preset in the hyphenation patterns is still allowed.
+ \end{shorthands}
+ Furthermore, the following shorthands generate easy access to Croatian digraphs (ligatures):
+ \begin{shorthands}
+ \item[¦"dz¦] Generates the ligature \charifavailable{01C6}{dž}\ if the font provides it. If not, the
+ two characters are output separately. Also available for ¦"Dz¦ (\charifavailable{01C5}{Dž})
+ and ¦"DZ¦ (\charifavailable{01C4}{DŽ}).
+ \item[¦"lj¦] Generates the ligature \charifavailable{01C9}{lj}\ if the font provides it. If not, the
+ two characters are output separately. Also available for ¦"Lj¦ (\charifavailable{01C8}{Lj})
+ and ¦"LJ¦ (\charifavailable{01C7}{LJ}).
+ \item[¦"nj¦] Generates the ligature \charifavailable{01CC}{nj}\ if the font provides it. If not, the
+ two characters are output separately. Also available for ¦"Nj¦ (\charifavailable{01CB}{Nj})
+ and ¦"NJ¦ (\charifavailable{01CA}{NJ}).
+ \end{shorthands}
+
+ Finally, there are also four shorthands for quotation marks:
+ \begin{shorthands}
+ \item[¦"`¦] for Croatian left double quotes („).
+ \item[¦"'¦] for Croatian right double quotes (”).
+ \item[¦">¦] for Croatian left guillemets (»).
+ \item[¦"<¦] for Croatian right guillemets («).
+ \end{shorthands}
+ \item \xpgboolkeyfalse[1.47]{disableligatures}
+ If this is \xpgvalue{true}, all Croatian ligatures (for digraphs such as
+ \charifavailable{01C6}{dž}) will be replaced by single characters. This can
+ be useful if the ligatures on your font are broken (if the font does not
+ have them, they are automatically replaced).
+\end{itemize}
+
\subsection{czech}\label{czech}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45}
- if this is turned on, the following shorthands for Czech are activated:
+ \item \xpgboolkeyfalse[1.45]{babelshorthands}
+ If this is turned on, the following shorthands for Czech are activated:
\begin{shorthands}
\item[¦"=¦] for an explicit hyphen sign which is repeated at the beginning
of the next line when hyphenated, as common in Czech typesetting
(only needed with ¦splithyphens=false¦).
- \item[¦"‘¦] for Czech left double quotes (looks like ,,).
- \item[¦"’¦] for Czech right double quotes (looks like “).
- \item[¦">¦] for Czech left double guillemets (looks like >>).
- \item[¦"<¦] for Czech right double guillemets (looks like <<).
+ \item[¦"‘¦] for Czech left double quotes („).
+ \item[¦"’¦] for Czech right double quotes (“).
+ \item[¦">¦] for Czech left double guillemets (»).
+ \item[¦"<¦] for Czech right double guillemets («).
\end{shorthands}
- \item \TB{splithyphens} = false or \textit{true}.\new{v1.45}
+ \item \xpgboolkeytrue[1.45]{splithyphens}
According to Czech typesetting conventions, if a word with a hard hyphen (such as \emph{je-li})
is hyphenated at this hyphen, a second hyphenation character is to be inserted at the beginning
of the line that follows the hyphenation (\emph{je-/-li}).
- By default, this is done automatically\new{v1.46} (if you are using \LuaTeX, the \pkg{luavlna} package is
+ By default, this is done automatically\new{1.46} (if you are using \LuaTeX, the \pkg{luavlna} package is
loaded to achieve this).
Set this option to ¦false¦ to disable the feature.
- \item \TB{vlna} = false or \textit{true}. \new{v1.45}
+ \item \xpgboolkeytrue[1.45]{vlna}
According to Czech typesetting conventions, single-letter words (non-syllable prepositions)
must not occur at line ends.
- \pkg{Polyglossia} takes care of this automatically by default\new{v1.46} (if you are using \LuaTeX, the
+ \pkg{Polyglossia} takes care of this automatically by default\new{1.46} (if you are using \LuaTeX, the
\pkg{luavlna} package is loaded to achieve this).
Set this option to ¦false¦ to disable the feature.
\end{itemize}
@@ -658,17 +935,17 @@ The default value of each option is given in italic.
\subsection{dutch}\label{dutch}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
- if this is turned on, the following shorthands defined for fine-tuning hyphenation and
+ \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+ If this is turned on, the following shorthands defined for fine-tuning hyphenation and
micro-typography of Dutch words are activated:
\begin{shorthands}
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦ in default \TeX).
+ in the hyphenation patterns (as opposed to \cmd\- in default \TeX).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"|¦] disables a ligature at this position.
\item[¦""¦] allows for a line break at this position (without hyphenation sign).
- \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
\end{shorthands}
In addition, the macro \Cmd\- is redefined to allow hyphens in the rest of the word (equivalent to ¦"-¦).
@@ -677,9 +954,10 @@ The default value of each option is given in italic.
\subsection{english}\label{english}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = \textit{american} (= us), usmax (same as ‘american’ but with additional hyphenation patterns),
- british (= uk), australian, canadian\new{v1.45} or newzealand
- \item \TB{ordinalmonthday} = true/\textit{false} (true by default only when variant = british)
+ \item \xpgchoicekey{variant}{\xpgpresetvalue{american} (= \xpgvalue{us}), \xpgvalue{usmax} (same as \xpgvalue{american} but with additional hyphenation patterns),
+ \xpgvalue{british} (= \xpgvalue{uk}), \xpgvalue{australian}, \xpgvalue{canadian}\new{1.45}, or \xpgvalue{newzealand}}
+ \item \xpgboolkeyfalse{ordinalmonthday}
+ The default value is true for \xpgvalue{variant=british}.
\end{itemize}
\subsection{esperanto}\label{esperanto}
@@ -693,17 +971,17 @@ The default value of each option is given in italic.
\subsection{finnish}\label{finnish}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45}
- if this is turned on, the following shorthands for fine-tuning hyphenation and micro-typography
- of Finnish words are activated:
+ \item \xpgboolkeyfalse[1.45]{babelshorthands}
+ If this is turned on, the following shorthands for fine-tuning hyphenation
+ and micro-typography of Finnish words are activated:
\begin{shorthands}
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
+ in the hyphenation patterns (as opposed to \cmd\-).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"|¦] disables a ligature at this position.
\item[¦""¦] allows for a line break at this position (without hyphenation sign).
- \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
\end{shorthands}
\end{itemize}
@@ -711,90 +989,115 @@ The default value of each option is given in italic.
\subsection{french}\label{french}
\paragraph*{Options:}
\begin{itemize}
- \item\TB{variant} = \textit{french} or canadian (=~acadian).\new{v1.45}
- Currently, the three variants do not differ; they are supported for compatibility with \pkg{babel} (where they do not differ either).
- \item \TB{autospacing} = \textit{true} or false. One of the most distinct features of French typography is the addition
- of extra spacing around punctuation and quotation marks (guillemets). By default, polyglossia adds these spaces automatically, so you don't need
- to enter them. This options allows you to switch this feature off globally.
- \item \TB{thincolonspace}\new{v1.46} = true or \textit{false}. Normally, a
- full (non-breaking) interword space is inserted before a colon. Use this
- option if you prefer a thinner space as used before \texttt{;}, \texttt{!},
- and \texttt{?}.
- \item \TB{autospaceguillemets}\footnote{Up to version 1.44, the option was
- called \textit{automaticspacesaroundguillemets}. For backards compatibility
- reasons, the more verbose old option is still supported.} = \textit{true}
- or false. If you only want to disable the automatic addition of spacing
- after opening and before closing guillemets (and not at punctuation), set
- this to \textit{false}. Note that the more general option
- \textit{autospacing} overrides this.
- \item \TB{autospacetypewriter}\footnote{Babel's syntax \textit{OriginalTypewriter} is also supported.}\new{1.45} = true or \textit{false} (default value = true). By default, automatic spacing is disabled in typewriter font. If this is enabled, spacing in typewriter context is the same as with roman and sans serif font, depending on the \textit{autospacing} and \textit{autospaceguillemets} settings (note that this was the default up to v.~1.44).
- \item \TB{frenchfootnote} = true or \textit{false} (default value = true). If \textit{true}, footnotes start with a non-superscripted number followed by a dot, as common in French typography. Note that this might interfere with the specific footnote handling of classes or packages.
- Also note that this option is only functional (by design) if French is the main language.
- \item \TB{frenchitemlabels}\new{v.1.46} = true or \textit{false} (default value = true). If \textit{true}, itemize item labels use em-dashes throughout,
- as common in French typography.
- Note that this option is only functional (by design) if French is the main language. Also, it might interfere with list packages such as \pkg{enumitem}.
- \item \TB{itemlabels}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of all levels.
- \item \TB{itemlabeli}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the first level.
- \item \TB{itemlabelii}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the second level.
- \item \TB{itemlabeliii}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the third level.
- \item \TB{itemlabeliv}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the fourth level.
+ \item \xpgchoicekey{variant}{\xpgpresetvalue{french} or \xpgvalue{canadian} (=~\xpgvalue{acadian})\new{1.45}, \xpgvalue{swiss}\new{1.47}}
+ Currently, the only difference between the four variants is that \xpgvalue{swiss}
+ uses \xpgvalue{thincolonspace=true} by default since this conforms to the Swiss
+ conventions.
+ \item \xpgboolkeytrue{autospacing}
+ One of the most distinct features of French typography is the addition of
+ extra spacing around punctuation and quotation marks (guillemets). By
+ default, polyglossia adds these spaces automatically, so you don't need
+ to enter them. This options allows you to switch this feature off
+ globally.
+ \item \xpgboolkeyfalse[1.46]{thincolonspace}
+ With \xpgvalue{variant=swiss}, the default value is \xpgvalue{true}. If \xpgvalue{false}, a full
+ (non-breaking) interword space is inserted before a colon. If \xpgvalue{true}, a
+ thinner space -- as before \texttt{;}, \texttt{!}, and \texttt{?} -- is
+ used. Note that this option must be set after the ¦variant¦ option.
+ \item \xpgboolkeytrue{autospaceguillemets}[Up to version 1.44, the option was
+ called \xpgvalue{automaticspacesaroundguillemets}. For backwards compatibility
+ reasons, the more verbose old option is still supported.]
+ If you only want to disable the automatic addition of spacing after
+ opening and before closing guillemets (and not at punctuation), set this
+ to \textit{false}. Note that the more general option \textit{autospacing}
+ overrides this.
+ \item \xpgboolkeyfalse[1.45]{autospacetypewriter}[Babel's syntax \xpgvalue{OriginalTypewriter}
+ is also supported.]
+ By default, automatic spacing is disabled in typewriter font. If this is
+ enabled, spacing in typewriter context is the same as with roman and sans
+ serif font, depending on the \xpgvalue{autospacing} and
+ \xpgvalue{autospaceguillemets} settings (note that this was the default up
+ to v.~1.44).
+ \item \xpgboolkeyfalse{frenchfootnote}
+ If \xpgvalue{true}, footnotes start with a non-superscripted number
+ followed by a dot, as common in French typography. Note that this might
+ interfere with the specific footnote handling of classes or packages.
+ Also note that this option is only functional (by design) if French is
+ the main language.
+ \item \xpgboolkeyfalse[1.46]{frenchitemlabels}
+ If \textit{true}, itemize item labels use em-dashes throughout, as common
+ in French typography. Note that this option is only functional (by
+ design) if French is the main language. Also, it might interfere with
+ list packages such as \pkg{enumitem}.
+ \item \xpgcodekey[1.46]{itemlabels}¦\textemdash¦
+ If \emph{frenchitemlabels} is true, you can customize here the used item
+ label of all levels.
+ \item \xpgcodekey[1.46]{itemlabeli}¦\textemdash¦
+ If \emph{frenchitemlabels} is true, you can customize here the used item
+ label of the first level.
+ \item \xpgcodekey[1.46]{itemlabelii}¦\textemdash¦
+ If \emph{frenchitemlabels} is true, you can customize here the used item
+ label of the second level.
+ \item \xpgcodekey[1.46]{itemlabeliii}¦\textemdash¦
+ If \emph{frenchitemlabels} is true, you can customize here the used item
+ label of the third level.
+ \item \xpgcodekey[1.46]{itemlabeliv}¦\textemdash¦
+ If \emph{frenchitemlabels} is true, you can customize here the used item
+ label of the fourth level.
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd\NoAutoSpacing\new{v1.45} disables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\NoAutoSpacing foo:bar}¦
- \item \Cmd\AutoSpacing\new{v1.45} enables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\AutoSpacing regarde!}¦
+ \item \Cmd\NoAutoSpacing\new{1.45} disables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\NoAutoSpacing foo:bar}¦
+ \item \Cmd\AutoSpacing\new{1.45} enables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\AutoSpacing regarde!}¦
\end{itemize}
-\subsection[gaelic]{gaelic\new{v1.45}}\label{gaelic}
+\subsection[gaelic]{gaelic\new{1.45}}\label{gaelic}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = \textit{irish} or scottish
+ \item \xpgchoicekey{variant}{\xpgpresetvalue{irish} or \xpgvalue{scottish}}
\end{itemize}
-\subsection[georgian]{georgian\new{v1.46}}\label{georgian}
+\subsection[georgian]{georgian\new{1.46}}\label{georgian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true.
- If this is turned on, the following shorthands are activated:
- \begin{shorthands}
- \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
- \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
- cases where the hyphen should stick at the following syllable.
- \item[¦"|¦] disables a ligature at this position.
- \item[¦""¦] allows for a line break at this position (without hyphenation sign).
- \item[¦"---¦] Cyrillic emdash in plain text.
- \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
- \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
- \item[¦",¦] thinspace for initials with a breakpoint in following surname.
- \item[¦"‘¦] for German left double quotes (looks like ,,).
- \item[¦"’¦] for German right double quotes (looks like “).
- \item[¦"<¦] for French left double quotes (looks like <<).
- \item[¦">¦] for French right double quotes (looks like >>).
- \end{shorthands}
- \item \TB{numerals} = \textit{arabic} or georgian. Uses either Arabic numerals or Georgian
- alphanumerical numbering.
- \item \TB{oldmonthnames} = \textit{true} or false (default: false). Uses traditional Georgian
- month names.
+ \item \xpgboolkeyfalse{babelshorthands}
+ If this is turned on, the following shorthands are activated:
+ \begin{shorthands}
+ \item[¦"-¦] adds a hyphenation point that does still allow for
+ hyphenation at the points preset in the hyphenation patterns (as opposed
+ to \cmd\-).
+ \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+ cases where the hyphen should stick at the following syllable.
+ \item[¦"|¦] disables a ligature at this position.
+ \item[¦""¦] allows for a line break at this position (without hyphenation sign).
+ \item[¦"---¦] Cyrillic emdash in plain text.
+ \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
+ \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
+ \item[¦",¦] thinspace for initials with a breakpoint in following surname.
+ \item[¦"‘¦] for German left double quotes (looks like ,,).
+ \item[¦"’¦] for German right double quotes (looks like “).
+ \item[¦"<¦] for French left double quotes (looks like <<).
+ \item[¦">¦] for French right double quotes (looks like >>).
+ \end{shorthands}
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic} or \xpgvalue{georgian}}
+ Uses either Arabic numerals or Georgian alphanumerical numbering.
+ \item \xpgboolkeyfalse{oldmonthnames}
+ Uses traditional Georgian month names.
\end{itemize}
\subsection{german}\label{german}
\paragraph*{Options:}
\begin{itemize}
- \item\TB{variant} = \textit{german}, austrian or swiss.\new{v1.33.4}
- Setting variant=austrian or variant=swiss uses some lexical variants.
- With spelling=old, variant=swiss furthermore loads specific hyphenation
+ \item \xpgchoicekey{variant}{\xpgpresetvalue{german}, austrian, or swiss\new{1.33.4}}
+ Setting \xpgvalue{variant=austrian} or \xpgvalue{variant=swiss} uses some lexical variants.
+ With \xpgvalue{spelling=old}, \xpgvalue{variant=swiss} furthermore loads specific hyphenation
patterns.
- \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901):
- indicates whether hyphenation patterns for traditional (1901) or reformed
+ \item \xpgchoicekey{spelling}{\xpgpresetvalue{new} (= \xpgvalue{1996}) or \xpgvalue{old} (= \xpgvalue{1901})}
+ Indicates whether hyphenation patterns for traditional (1901) or reformed
(1996) orthography should be used. The latter is the default.
- \item \TB{latesthyphen} = \textit{false} or true: if this option is set to true,
- the latest (experimental) hyphenation patterns ‘(n)german-x-latest’
- will be loaded instead of ‘german’ or ‘ngerman’. NB: This is based on
- the file \texttt{language.dat} that comes with \TeX Live 2008 and later.
- \item\TB{babelshorthands} = \textit{false} or true: \new{v1.0.3}
- if this is turned on, all shorthands defined in \pkg{babel}
+ \item \xpgboolkeyfalse[1.0.3]{babelshorthands}
+ If this is turned on, all shorthands defined in \pkg{babel}
for fine-tuning hyphenation and micro-typography of German words are activated.
\begin{shorthands}
\item[¦"ck¦] for ¦ck¦ to be hyphenated as ¦k-k¦ (1901 spelling).
@@ -804,12 +1107,12 @@ The default value of each option is given in italic.
\item[¦"=¦] for an explicit hyphen with a breakpoint, allowing for hyphenation at the
other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
- cases where the hyphen should stick at the following syllable,\eg ¦bergauf und "~ab¦.
+ cases where the hyphen should stick at the following syllable, \eg ¦bergauf und "~ab¦.
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
- \item[¦""¦] allows for a line break at this position (without hyphenation sign);
+ in the hyphenation patterns (as opposed to \cmd\-).
+ \item[¦""¦] allows for a line break at this position (without hyphenation sign);
\eg ¦(pseudo"~)""wissenschaftlich¦.
- \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, hyphenation at the breakpoints
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation at the breakpoints
preset in the hyphenation patterns is still allowed.
\end{shorthands}
@@ -820,7 +1123,7 @@ The default value of each option is given in italic.
\item[¦"<¦] for French left double quotes («)
\item[¦">¦] for French right double quotes (»).
\end{shorthands}
- \item\TB{script} = \textit{latin} or blackletter\new{v1.46} (=~fraktur\new{v1.2.0}).
+ \item \xpgchoicekey[1.2.0]{script}{\xpgpresetvalue{latin} or \xpgvalue{blackletter}\new{1.46} (= \xpgvalue{fraktur})}
Setting ¦script=blackletter¦ adapts the captions for typesetting German in blackletter type (using the long s (ſ)
where appropriate).
\end{itemize}
@@ -828,9 +1131,9 @@ The default value of each option is given in italic.
\subsection{greek}\label{greek}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = \textit{monotonic} (= mono), polytonic (= poly), or ancient
- \item \TB{numerals} = \textit{greek} or arabic
- \item \TB{attic} = \textit{false}/true
+ \item \xpgchoicekey{variant}{\xpgpresetvalue{monotonic} (= \xpgvalue{mono}), \xpgvalue{polytonic} (= \xpgvalue{poly}), or \xpgvalue{ancient}}
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{greek} or \xpgvalue{arabic}}
+ \item \xpgboolkeyfalse{attic}
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
@@ -845,10 +1148,12 @@ The default value of each option is given in italic.
\subsection{hebrew}\label{hebrew}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = hebrew or \textit{arabic}
- \item \TB{calendar} = hebrew or \textit{gregorian}
- \item \TB{marcheshvan} = true or \textit{false} (default value = true). If true, the second month of the civil year will be output as \texthebrew{מרחשון} (Marcheshvan)
- rather than \texthebrew{חשון} (Heshvan), which is the default.
+ \item \xpgchoicekey{numerals}{\xpgvalue{hebrew} or \xpgpresetvalue{arabic}}
+ \item \xpgchoicekey{calendar}{\xpgvalue{hebrew} or \xpgpresetvalue{gregorian}}
+ \item \xpgboolkeyfalse{marcheshvan}
+ If \xpgvalue{true}, the second month of the civil year will be output as
+ \texthebrew{מרחשון} (Marcheshvan) rather than \texthebrew{חשון} (Heshvan),
+ which is the default.
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
@@ -856,17 +1161,17 @@ The default value of each option is given in italic.
\item \Cmd\aemph (see section \ref{arabic}).
\end{itemize}
-\subsection[hindi]{hindi\new{v1.2.0}}\label{hindi}
+\subsection[hindi]{hindi\new{1.2.0}}\label{hindi}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = Western or \textit{Devanagari}
+ \item \xpgchoicekey{numerals}{\xpgvalue{Western} or \xpgpresetvalue{Devanagari}}
\end{itemize}
\subsection{hungarian}\label{hungarian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{swapstrings} = \textit{all}, captions, headings, headers, hheaders or none\new{v1.46}
-
+ \item \xpgchoicekey[1.46]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}},
+ \xpgvalue{captions}, \xpgvalue{headings}, \xpgvalue{headers}, \xpgvalue{hheaders}, or \xpgvalue{none}}
In Hungarian, some caption strings need to be in a different order than in other languages
(\eg \emph{1. fejezet} instead of \emph{Chapter 1}). By default, \pkg{polyglossia} tries hard to
provide the correct order for different classes and packages (standard classes, \pkg{KOMA-script},
@@ -893,41 +1198,66 @@ The default value of each option is given in italic.
\subsection{italian}\label{italian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.2.0cc}% TODO: check version
+ \item \xpgboolkeyfalse[1.2.0cc]{babelshorthands}% TODO: check version
Activates the ¦"¦ character as a switch to perform etymological
hyphenation when followed by a letter. Furthermore, the following shorthands are activated:
\begin{shorthands}
\item[¦""¦] double raised open quotes (the Italian keyboard misses the backtick).
\item[¦"<¦] open guillemet (looks like <<).
\item[¦">¦] closing guillemet (looks like >>).
- \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
+ in the hyphenation patterns (as opposed to \cmd\-).
\end{shorthands}
\end{itemize}
-\subsection[korean]{korean\new{v1.40.0}}\label{korean}
+\subsection[korean]{korean\new{1.40.0}}\label{korean}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = \textit{plain}, classic or modern:
- for spacing before/after CJK punctuations.
- `classic' is suitable for text with no interword spaces,
- `modern' for text with interword spaces.
- \item \TB{captions} = \textit{hangul} or hanja
+ \item \xpgchoicekey{variant}{\xpgpresetvalue{plain}, \xpgvalue{classic}, or \xpgvalue{modern}}
+ These variants control spacing before/after CJK punctuations.
+ \begin{itemize}
+ \item ¦plain¦: Do nothing
+ \item ¦classic¦: Suitable for text with no interword spaces.
+ This option forces CJK punctuations to half-width, and
+ inserts half-width glue around them.
+ \item ¦modern¦: Suitable for text with interword spaces.
+ This option forces CJK punctuations to half-width, and
+ inserts small (half of interword space) glue around them.
+ \end{itemize}
+ \item \xpgchoicekey{captions}{\xpgpresetvalue{hangul} or \xpgvalue{hanja}}
+ \item \xpgchoicekey[1.47]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}},
+ \xpgvalue{headers}, \xpgvalue{headings}, or \xpgvalue{none}}
+ With this option, Korean-style part and chapter headings, and
+ running headers are available.
+ It is similar to Hungarian (see \ref{hungarian}) except that
+ figure and table captions are not touched.
+ \begin{itemize}
+ \item ¦all¦: Redefine part and chapter headings, and running headers
+ (=~default setting)
+ \item ¦headings¦: Redefine part and chapter headings only
+ \item ¦headers¦: Redefine running headers only
+ \item ¦none¦: Do not redefine anything
+ \end{itemize}
\end{itemize}
-\subsection[kurdish]{kurdish\new{v1.45}}\label{kurdish}
+\subsection[kurdish]{kurdish\new{1.45}}\label{kurdish}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = kurmanji or \textit{sorani}
- \item \TB{script} = Arabic or Latin. Defaults are ¦Arabic¦ for Sorani and ¦Latin¦ for Kurmanji.
- \item \TB{numerals} = western or eastern. Defaults are ¦western¦ for Latin and ¦eastern¦ for Arabic script, depending on the selection above.
- \item \TB{abjadjimnotail} = \textit{false} or true.
- Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
-% \item \TB{locale} (not yet implemented)
-% \item \TB{calendar} (not yet implemented)
+ \item \xpgchoicekey{variant}{\xpgvalue{kurmanji} or \xpgpresetvalue{sorani}}
+ \item \xpgchoicekey{script}{\xpgvalue{Arabic} or \xpgvalue{Latin}}
+ Defaults are \xpgvalue{Arabic} for Sorani and \xpgvalue{Latin} for Kurmanji.
+ \item \xpgchoicekey{numerals}{\xpgvalue{western} or \xpgvalue{eastern}}
+ Defaults are \xpgvalue{western} for Latin and \xpgvalue{eastern} for Arabic script, depending
+ on the selection above.
+ \item \xpgboolkeyfalse{abjadjimnotail}
+ Set this to true if you want the \textit{abjad} form of the number three to
+ be \textarabic{ج‍} – as in the manuscript tradition – instead of the
+ modern usage \textarabic{ج}.
+% \item \xpgchoicekey{locale}{} (not yet implemented)
+% \item \xpgchoicekey{calendar}{} (not yet implemented)
\end{itemize}
\condbreak{2\baselineskip}
\paragraph*{Commands:}
@@ -938,34 +1268,33 @@ The default value of each option is given in italic.
\item \Cmd\aemph (see section \ref{arabic})
\end{itemize}
-\subsection[lao]{lao\new{v1.2.0}}\label{lao}
+\subsection[lao]{lao\new{1.2.0}}\label{lao}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = lao or \textit{arabic}
+ \item \xpgchoicekey{numerals}{\xpgvalue{lao} or \xpgpresetvalue{arabic}}
\end{itemize}
\subsection{latin}\label{latin}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = classic, medieval, \emph{modern}, or ecclesiastic\new{v.1.46}
-
- These variants refer to different spelling conventions. The ¦classic¦
- and the ¦medieval¦ variant do not use the letters \emph{U} and
+ \item \xpgchoicekey{variant}{\xpgvalue{classic}, \xpgvalue{medieval}, \xpgpresetvalue{modern}, or \xpgvalue{ecclesiastic}\new{1.46}}
+ These variants refer to different spelling conventions. The \xpgvalue{classic}
+ and the \xpgvalue{medieval} variant do not use the letters \emph{U} and
\emph{v}, but only \emph{V} and \emph{u}. This concerns predefined terms like
month names as well as the behaviour of the \cmd\MakeUppercase\ and the
\cmd\MakeLowercase\ command. The ¦medieval¦ and the
¦ecclesiastic¦ variant use the ligatures \emph{\ae} and \emph{\oe}.
See table \ref{tab:latin-spelling} for examples.
- Furthermore, the \texttt{ecclesiastic} variant takes care for a punctuation
+ Furthermore, the \xpgvalue{ecclesiastic} variant takes care for a punctuation
spacing similar to French, but with smaller spaces, as provided for
PDF\TeX\ by the \pkg{ecclesiastic} package.
\begin{table}
\centering
\caption{\label{tab:latin-spelling}Spelling differences between the Latin
language variants.\newline The capitalization of month names and the use of
- \emph{i/j} may be affected by the \texttt{capitalizemonth} and the
- \texttt{usej} option.}
+ \emph{i/j} may be affected by the \xpgvalue{capitalizemonth} and the
+ \xpgvalue{usej} option.}
\begin{tabular}{llll}
\toprule
\textbf{classic} & \textbf{medieval} & \textbf{modern} & \textbf{ecclesiastic} \\
@@ -978,8 +1307,7 @@ The default value of each option is given in italic.
\bottomrule
\end{tabular}
\end{table}
- \item \TB{hyphenation}\new{v.1.46} = classic, modern, or liturgical
-
+ \item \xpgchoicekey[1.46]{hyphenation}{\xpgvalue{classic}, \xpgvalue{modern}, or \xpgvalue{liturgical}}
There are three different sets of hyphenation patterns for Latin. Separate
documention for them is available on the
Internet.\footnote{\url{https://github.com/gregorio-project/hyphen-la/blob/master/doc/README.md\#hyphenation-styles}}
@@ -988,7 +1316,7 @@ The default value of each option is given in italic.
¦hyphenation¦ option if the default style does not fit your needs.
Note that the liturgical hyphenation patterns are the default of none of the
language variants. To use them, you have to say
- ¦hyphenation=liturgical¦ in any case.
+ \xpgvalue{hyphenation=liturgical} in any case.
\begin{table}
\caption{\label{tab:latin-hyphenation}Latin default hyphenation styles}
\centering
@@ -1003,8 +1331,7 @@ The default value of each option is given in italic.
\bottomrule
\end{tabular}
\end{table}
- \item \TB{ecclesiasticfootnotes}\new{v.1.46} = true or \emph{false}
-
+ \item \xpgboolkeyfalse[1.46]{ecclesiasticfootnotes}
Use footnotes as provided by the \pkg{ecclesiastic} package, which typesets
footnotes with ordinary instead of superior numbers and without indentation.
As many ecclesiastic documents and liturgical books use footnotes that are
@@ -1013,24 +1340,21 @@ The default value of each option is given in italic.
Note that this option is only possible if Latin is the main language of your
document.
- \item \TB{usej}\new{v.1.46} = true or \emph{false}
-
+ \item \xpgboolkeyfalse[1.46]{usej}
Use \emph{J/j} in predefined terms. The letter \emph{j} is not of ancient
origin. In early modern times, it was used to distinguish the consonantic
\emph{i} from the vocalic~\emph{i}. Nowadays, the use of \emph{j} has
disappeared from most Latin publications. So ¦false¦ is the default
value for all four language variants. Use this option if you prefer
\emph{Januarii} and \emph{Maji} to \emph{Ianuarii} and \emph{Maii}.
- \item \TB{capitalizemonth}\new{v.1.46} = true or false
-
+ \item \xpgboolkey[1.46]{capitalizemonth}
Capitalize the month name when printing dates (using the \cmd\today\
command). Traditionally, month names are capitalized. However, in recent
liturgical books they are lowercase. So ¦true¦ is the default value for
the variants ¦classic¦, ¦medieval¦, and ¦modern¦,
whereas ¦false¦ is the default value for the ¦ecclesiastic¦
variant.
- \item \TB{babelshorthands} = true or \emph{false}
-
+ \item \xpgboolkeyfalse{babelshorthands}
Enable the following shorthands inherited from \pkg{babel-latin} and the
\pkg{ecclesiastic} package.
\begin{shorthands}
@@ -1056,14 +1380,12 @@ The default value of each option is given in italic.
\item[¦'Ae¦] for Ǽ (AE ligature with acute), also available for \'Œ
\item[¦'AE¦] for Ǽ (AE ligature with acute), also available for \'Œ
\end{shorthands}
- \item \TB{prosodicshorthands}\new{v.1.46} = true or \emph{false}
-
+ \item \xpgboolkeyfalse[1.46]{prosodicshorthands}
Enable shorthands for prosodic marks (macrons and breves) very similiar to
those provided by \pkg{babel-latin} using the ¦withprosodicmarks¦
modifier.
-
Note that the active ¦=¦ character used for macrons will cause problems with
- commands using \texttt{key=value} interfaces, \eg
+ commands using \texttt{key=value} interfaces, such as the command
¦\includegraphics[scale=2]{...}¦. Use \cmd{\shorthandoff\{=\}} before
such commands (and \cmd{\shorthandon\{=\}} thereafter) within every
environment with prosodic shorthands enabled.
@@ -1096,20 +1418,25 @@ The default value of each option is given in italic.
\subsection{malay}\label{malay}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant}\new{v1.45} = \textit{indonesian} (=~bahasai in \pkg{babel}) or
- malaysian (=~bahasam in \pkg{babel})
+ \item \xpgchoicekey[1.45]{variant}{\xpgpresetvalue{indonesian} or \xpgvalue{malaysian}}
\end{itemize}
-\subsection[mongolian]{mongolian\new{v1.45}}\label{mongolian}
+\subsection{marathi}\label{marathi}
+\paragraph*{Options:}
+\begin{itemize}
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{Devanagari} or \xpgvalue{Western}}
+\end{itemize}
+
+\subsection[mongolian]{mongolian\new{1.45}}\label{mongolian}
Currently, only the Khalkha variety in Cyrillic script is supported.
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true.
+ \item \xpgboolkeyfalse{babelshorthands}
If this is turned on, the following shorthands are activated:
\begin{shorthands}
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
+ in the hyphenation patterns (as opposed to \cmd\-).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"|¦] disables a ligature at this position.
@@ -1123,32 +1450,44 @@ Currently, only the Khalkha variety in Cyrillic script is supported.
\item[¦"<¦] for French left double quotes (looks like <<).
\item[¦">¦] for French right double quotes (looks like >>).
\end{shorthands}
- \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
- alphanumerical numbering.
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+ Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+ \begin{itemize}
+ \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+ \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+ \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+ It supports numbers up to 999\,999.
+ \end{itemize}
\end{itemize}
%
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
- environments such as ¦enumerate¦. The command takes a counter as argument,
- \eg ¦\textmongolian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
- \item \Cmd\asbuk: same in lowercase
+ \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+ It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+ The command takes a counter as argument, \eg ¦\textmongolian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+ \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+ \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+ numbers up to 999\,999.\\
+ \Eg ¦\textmongolian{\AsbukTrad{section}}¦ produces \textrussian{\AsbukTrad{section}}.
+ \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
\end{itemize}
\subsection{norwegian}\label{norwegian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant}\new{v1.45} = bokmal (=~`norsk' in \pkg{babel}) or \textit{nynorsk}
+ \item \xpgchoicekey[1.45]{variant}{\xpgvalue{bokmal} or \xpgpresetvalue{nynorsk}}
\end{itemize}
\subsection{persian}\label{persian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = western or \textit{eastern}
- \item \TB{abjadjimnotail} = \textit{false} or true. \new{v1.0.3}
- Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
-% \item \TB{locale} (not yet implemented)
-% \item \TB{calendar} (not yet implemented)
+ \item \xpgchoicekey{numerals}{\xpgvalue{western} or \xpgpresetvalue{eastern}}
+ \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail}
+ Set this to \xpgvalue{true} if you want the \textit{abjad} form of the number three to
+ be \textarabic{ج‍} – as in the manuscript tradition – instead of the
+ modern usage \textarabic{ج}.
+% \item \xpgchoicekey{locale}{} (not yet implemented)
+% \item \xpgchoicekey{calendar}{} (not yet implemented)
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
@@ -1159,17 +1498,17 @@ Currently, only the Khalkha variety in Cyrillic script is supported.
\subsection{portuguese}\label{portuguese}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant}\new{v1.45} = brazilian or \textit{portuguese}
+ \item \xpgchoicekey[1.45]{variant}{\xpgvalue{brazilian} or \xpgpresetvalue{portuguese}}
\end{itemize}
\subsection{russian}\label{russian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true.
+ \item \xpgboolkeyfalse{babelshorthands}
If this is turned on, the following shorthands are activated:
\begin{shorthands}
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
+ in the hyphenation patterns (as opposed to \cmd\-).
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"|¦] disables a ligature at this position.
@@ -1184,48 +1523,72 @@ Currently, only the Khalkha variety in Cyrillic script is supported.
% \item[¦"<¦] for French left double quotes (looks like <<).
% \item[¦">¦] for French right double quotes (looks like >>).
\end{shorthands}
- \item \TB{indentfirst}\new{v1.46} = \textit{true} or false. By default, all paragraphs are indented in Russian,
- also those after a chapter or section heading. If this option is false, the latter paragraphs
- are not indented, as normal in \LaTeX.
- \item \TB{spelling} = \textit{modern} or old (for captions and date only, not for hyphenation)
- \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
- alphanumerical numbering.
+ \item \xpgboolkeytrue[1.46]{indentfirst}
+ By default, all paragraphs are indented in Russian, also those after a
+ chapter or section heading. If this option is false, the latter paragraphs
+ are not indented, as normal in \LaTeX.
+ \item \xpgchoicekey{spelling}{\xpgpresetvalue{modern} or \xpgvalue{old}}
+ This option is for captions and date only, not for hyphenation.
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+ Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+ \begin{itemize}
+ \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+ \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+ \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+ It supports numbers up to 999\,999.
+ \end{itemize}
\end{itemize}
%
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
- environments such as ¦enumerate¦. The command takes a counter as argument,
- \eg ¦\textrussian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
- \item \Cmd\asbuk: same in lowercase
+ \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+ It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+ The command takes a counter as argument, \eg ¦\textrussian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+ \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+ \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+ numbers up to 999\,999.\\
+ \Eg ¦\textrussian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+ \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
\end{itemize}
-\subsection[sami]{sami\new{v1.45}}\label{sami}
+\subsection[sami]{sami\new{1.45}}\label{sami}
Currently support for Sami is limited to Northern Sami.
\subsection{sanskrit}\label{sanskrit}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{script} = \textit{Devanagari}\new{v1.0.2}, Gujarati, Malayalam, Bengali, Kannada,
- Telugu or Latin.
- The value is passed to \pkg{fontspec} in cases where the respective ¦\⟨script⟩font¦ is not defined.
- This can be useful if you typeset Sanskrit texts in scripts other than Devanagari.
- \item \TB{numerals} = \textit{Devanagari}\new{v1.45} or Western
+ \item \xpgchoicekey[1.0.2]{script}{\xpgpresetvalue{Devanagari}, \xpgvalue{Gujarati},
+ \xpgvalue{Malayalam}, \xpgvalue{Bengali}, \xpgvalue{Kannada}, \xpgvalue{Telugu}, or \xpgvalue{Latin}}
+ The value is passed to \pkg{fontspec} in cases where the respective
+ \cmd{\⟨script⟩font} is not defined. This can be useful if you typeset Sanskrit
+ texts in scripts other than Devanagari.
+ \item \xpgchoicekey[1.45]{numerals}{\xpgpresetvalue{Devanagari} or \xpgvalue{Western}}
\end{itemize}
-
+
\subsection{serbian}\label{serbian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{script} = \textit{Cyrillic} or Latin.
- \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
- alphanumerical numbering.
- \end{itemize}
+ \item \xpgchoicekey{script}{\xpgpresetvalue{Cyrillic} or \xpgvalue{Latin}}
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+ Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+ \begin{itemize}
+ \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+ \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+ \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+ It supports numbers up to 999\,999.
+ \end{itemize}
+\end{itemize}
+%
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
- environments such as ¦enumerate¦. The command takes a counter as argument,\\
- Example: ¦\textserbian[numerals=cyrillic]{\Asbuk{page}}¦ produces \textserbian[numerals=cyrillic]{\Asbuk{page}}.
- \item \Cmd\asbuk: same in lowercase
+ \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+ It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+ The command takes a counter as argument, \eg ¦\textserbian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+ \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+ \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+ numbers up to 999\,999.\\
+ \Eg ¦\textserbian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+ \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
\end{itemize}
@@ -1233,9 +1596,9 @@ Currently support for Sami is limited to Northern Sami.
\paragraph*{Options:}
\begin{itemize}
- \item \TB{babelshorthands} = \textit{false} or true. \new{v1.46}
- if this is turned on, the following shorthands for Slovak are activated:
- \begin{shorthands}
+ \item \xpgboolkeyfalse[1.46]{babelshorthands}
+ If this is turned on, the following shorthands for Slovak are activated:
+ \begin{shorthands}
\item[¦"=¦] for an explicit hyphen sign which is repeated at the beginning
of the next line when hyphenated, as common in Slovak typesetting
(only needed with ¦splithyphens=false¦).
@@ -1243,23 +1606,23 @@ Currently support for Sami is limited to Northern Sami.
\item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
cases where the hyphen should stick at the following syllable.
\item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
- in the hyphenation patterns (as opposed to ¦\-¦).
+ in the hyphenation patterns (as opposed to \cmd\-).
\item[¦""¦] allows for a line break at this position (without hyphenation sign).
- \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, hyphenation at the breakpoints
+ \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation at the breakpoints
preset in the hyphenation patterns is still allowed.
\item[¦"‘¦] for Slovak left double quotes (looks like ,,).
\item[¦"’¦] for Slovak right double quotes (looks like “).
\item[¦">¦] for Slovak left double guillemets (looks like >>).
\item[¦"<¦] for Slovak right double guillemets (looks like <<).
- \end{shorthands}
- \item \TB{splithyphens} = \textit{false} or true. \new{v1.46}
+ \end{shorthands}
+ \item \xpgboolkeytrue[1.46]{splithyphens}
According to Slovak typesetting conventions, if a word with a hard hyphen (such as \emph{je-li})
is hyphenated at this hyphen, a second hyphenation character is to be inserted at the beginning
of the line that follows the hyphenation (\emph{je-/-li}).
By default, this is done automatically (if you are using \LuaTeX, the \pkg{luavlna} package is
loaded to achieve this).
Set this option to ¦false¦ to disable the feature.
- \item \TB{vlna} = \textit{false} or true. \new{v1.46}
+ \item \xpgboolkeytrue[1.46]{vlna}
According to Slovak typesetting conventions, single-letter words (non-syllable prepositions)
must not occur at line ends.
\pkg{Polyglossia} takes care of this automatically by default (if you are using \LuaTeX, the
@@ -1270,26 +1633,31 @@ Currently support for Sami is limited to Northern Sami.
\subsection{slovenian}\label{slovenian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{localalph} = true or \textit{false}
+ \item \xpgboolkeyfalse{localalph}
+ If \xpgvalue{true}, alpha-numeric counters will use a localized version including characters with caron
+ (a, b, c, č, d, \ldots).
\end{itemize}
\subsection{sorbian}\label{sorbian}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant}\new{v1.45} = lower or \textit{upper}
- \item \TB{olddate}\new{v1.45} = true or \textit{false} (default value = true). If true, ¦\today¦
- will use traditional Sorbian month names (\ie it will be synonymous to ¦\oldtoday¦ below)
+ \item \xpgchoicekey[1.45]{variant}{\xpgvalue{lower} or \xpgpresetvalue{upper}}
+ \item \xpgboolkeyfalse[1.45]{olddate}
+ If \xpgvalue{true}, \cmd\today\ will use traditional Sorbian month names (\ie it will be
+ synonymous to \cmd\oldtoday\ below).
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
- \item \Cmd\oldtoday: outputs the current date using traditional Sorbian month names, even if \TB{olddate} is false.
+ \item \Cmd\oldtoday: outputs the current date using traditional Sorbian month names, even if
+ \xpgvalue{olddate} is \xpgvalue{false}.
\end{itemize}
\subsection{spanish}\label{spanish}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{variant} = \textit{spanish} or mexican.\new{v1.46}
- \item \TB{spanishoperators} = all, accented, spaced or none or \textit{false} (default value = all).\new{v1.46}
+ \item \xpgchoicekey[1.46]{variant}{\xpgpresetvalue{spanish} or \xpgvalue{mexican}}
+ \item \xpgchoicekey[1.46]{spanishoperators}{\xpgdefaultvalue{all}, \xpgvalue{accented},
+ \xpgvalue{spaced}, \xpgvalue{none}, or \xpgpresetvalue{false}}
Determines of and how math operators are localized to Spanish.
\begin{itemize}
\item ¦accented¦ causes some math operators to use accents where usual in Spanish (\emph{lím},
@@ -1297,29 +1665,29 @@ Currently support for Sami is limited to Northern Sami.
\item ¦spaced¦ causes some math operators to use spaces where usual in Spanish (\emph{arc\,cos},
\emph{arc\,sen}, \emph{arc\,tg}).
\item ¦all¦ activates ¦accented¦ and ¦spaced¦ and furthermore provides Spanish localizations of
- ¦\sin¦ (\emph{sen}), ¦\tan¦ (\emph{tg}), ¦\sinh¦ (\emph{senh}), and ¦\tanh¦ (\emph{tgh}).
- \item ¦none¦ does no localization at all (default setting).
+ \cmd\sin\ (\emph{sen}), \cmd\tan\ (\emph{tg}), \cmd\sinh\ (\emph{senh}), and \cmd\tanh\ (\emph{tgh}).
+ \item ¦none¦ does no localization at all (default setting).
\end{itemize}
\end{itemize}
-\paragraph*{\color{black}Commands:}\new{v1.46}
+\paragraph*{\color{black}Commands:}\new{1.46}
\begin{itemize}
- \item \Cmd\arcsen: alias to ¦\arcsin¦ (\pkg{babel} compatibility)
- \item \Cmd\arctg: alias to ¦\arctan¦ (\pkg{babel} compatibility)
- \item \Cmd\sen: alias to ¦\sin¦ (\pkg{babel} compatibility)
- \item \Cmd\senh: alias to ¦\sinh¦ (\pkg{babel} compatibility)
- \item \Cmd\tg: alias to ¦\tan¦ (\pkg{babel} compatibility)
- \item \Cmd\tgh: alias to ¦\tanh¦ (\pkg{babel} compatibility)
+ \item \Cmd\arcsen: alias to \cmd\arcsin\ (\pkg{babel} compatibility)
+ \item \Cmd\arctg: alias to \cmd\arctan\ (\pkg{babel} compatibility)
+ \item \Cmd\sen: alias to \cmd\sin\ (\pkg{babel} compatibility)
+ \item \Cmd\senh: alias to \cmd\sinh\ (\pkg{babel} compatibility)
+ \item \Cmd\tg: alias to \cmd\tan\ (\pkg{babel} compatibility)
+ \item \Cmd\tgh: alias to \cmd\tanh\ (\pkg{babel} compatibility)
\item \Cmd\spanishoperator: allows you to define further localized operators. For instance, ¦\spanishoperator{cotg}¦
- defines a command ¦\cotg¦ that outputs \emph{cotg} in math. The optional argument of the command lets you specify the
+ defines a command \cmd\cotg\ that outputs \emph{cotg} in math. The optional argument of the command lets you specify the
spelling, if needed, \eg ¦\spanishoperator[arc\,ctg]{arcctg}¦.
\end{itemize}
\subsection{syriac}\label{syriac}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = \textit{western} (i.e., 1234567890), eastern
- (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}),
- or abjad. \new{v1.0.1}.
+ \item \xpgchoicekey[1.0.1]{numerals}{\xpgpresetvalue{western} (\ie 1234567890), \xpgvalue{eastern}
+ (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}), or
+ \xpgvalue{abjad}}
\end{itemize}
\paragraph*{Commands:}
\begin{itemize}
@@ -1330,7 +1698,7 @@ Currently support for Sami is limited to Northern Sami.
\subsection{thai}\label{thai}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = thai or \textit{arabic}
+ \item \xpgchoicekey{numerals}{\xpgvalue{thai} or \xpgpresetvalue{arabic}}
\end{itemize}
%
To insert word breaks, you need to use an external processor.
@@ -1340,21 +1708,58 @@ that comes with this package.
\subsection{tibetan}\label{tibetan}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{numerals} = tibetan or \textit{arabic}
+ \item \xpgchoicekey{numerals}{\xpgvalue{tibetan} or \xpgpresetvalue{arabic}}
\end{itemize}
\subsection{ukrainian}\label{ukrainian}
-\paragraph*{Commands:}
+
+\paragraph*{Options:}
+\begin{itemize}
+ \item \xpgboolkeyfalse{babelshorthands}
+ If this is turned on, the following shorthands are activated:
+ \begin{shorthands}
+ \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
+ in the hyphenation patterns (as opposed to \cmd\-).
+ \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+ cases where the hyphen should stick at the following syllable.
+ \item[¦"|¦] disables a ligature at this position.
+ \item[¦""¦] allows for a line break at this position (without hyphenation sign).
+ \item[¦"---¦] Cyrillic emdash in plain text.
+ \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
+ \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
+ % These are commented out in gloss-ukrainian
+ % \item[¦",¦] thinspace for initials with a breakpoint in following surname.
+ % \item[¦"‘¦] for German left double quotes (looks like ,,).
+ % \item[¦"’¦] for German right double quotes (looks like “).
+ % \item[¦"<¦] for French left double quotes (looks like <<).
+ % \item[¦">¦] for French right double quotes (looks like >>).
+ \end{shorthands}
+ \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+ Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
\begin{itemize}
- \item \Cmd\Asbuk: produces the uppercase Ukrainian alphabet, for
- environments such as ¦enumerate¦
- \item \Cmd\asbuk: same in lowercase
+ \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+ \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+ \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+ It supports numbers up to 999\,999.
\end{itemize}
+\end{itemize}
+%
+\paragraph*{Commands:}
+\begin{itemize}
+ \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+ It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+ The command takes a counter as argument, \eg ¦\textukrainian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+ \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+ \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+ numbers up to 999\,999.\\
+ \Eg ¦\textukrainian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+ \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
+\end{itemize}
\subsection{welsh}\label{welsh}
\paragraph*{Options:}
\begin{itemize}
- \item \TB{date} = long or \textit{short}
+ \item \xpgchoicekey{date}{\xpgvalue{long} or \xpgpresetvalue{short}}
\end{itemize}
@@ -1362,55 +1767,55 @@ that comes with this package.
\pkg{Polyglossia} uses the following macros to define language-specific captions
(\ie strings such as ``chapter''), date formats and additional language settings
-(¦⟨lang⟩¦ is to be replaces with the respective language name):
+(\meta{lang} is to be replaces with the respective language name):
\begin{itemize}
- \item \Cmd{\captions⟨lang⟩} stores definitions of caption strings
+ \item \Cmd{\captions\meta{lang}} stores definitions of caption strings
(such as, in the case of English, ¦\def\chaptername{Chapter}¦)
- \item \Cmd{\date⟨lang⟩} stores definitions of date formats (usually redefinitions
- of ¦\today¦, in some cases also definitions of additional date commands)
- \item \Cmd{\blockextras⟨lang⟩} stores macros that are to be executed when the language
- ⟨lang⟩ is activated via ¦\selectlanguage¦ command or the ¦⟨lang⟩¦ environment
- \item \Cmd{\inlineextras⟨lang⟩} stores macros that are to be executed when the language
- ⟨lang⟩ is activated locally via ¦\text⟨lang⟩¦ command
- \item \Cmd{\noextras⟨lang⟩} stores macros that are to be executed when the language
- ¦⟨lang⟩¦ is closed
-\end{itemize}
+ \item \Cmd{\date\meta{lang}} stores definitions of date formats (usually redefinitions
+ of \cmd\today, in some cases also definitions of additional date commands)
+ \item \Cmd{\blockextras\meta{lang}} stores macros that are to be executed when the language
+ \meta{lang} is activated via \cmd\selectlanguage command or the \meta{lang} environment
+ \item \Cmd{\inlineextras\meta{lang}} stores macros that are to be executed when the language
+ \meta{lang} is activated locally via \cmd\text\meta{lang} command
+ \item \Cmd{\noextras\meta{lang}} stores macros that are to be executed when the language
+ \meta{lang} is closed
+\end{itemize}
%
-In order to redefine internal macros, we recommend to use the command ¦\gappto¦.
-For compatibility with \pkg{babel} the command ¦\addto¦ is also available
-to the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
+In order to redefine internal macros, we recommend to use the command \cmd\gappto.
+For compatibility with \pkg{babel} the command \cmd\addto\ is also available
+to the same effect. For instance, to change the \cmd\chaptername\ for language ¦lingua¦,
you can do this:
\begin{verbatim}
\gappto\captionslingua{\def\chaptername{Caput}}
\end{verbatim}
%
Note that this needs to be done after the respective language has been loaded with
-¦\setmainlanguage¦ or ¦\setotherlanguage¦.
+\cmd\setmainlanguage\ or \cmd\setotherlanguage.
Specifically for package authors, analogous commands are provided which are only executed
if a specific language \emph{variety} is used. As opposed to the macros above, these refer
to babel names. Other than that, the function is identical:
\begin{itemize}
- \item \Cmd{\captions@bbl@⟨babelname⟩}
- \item \Cmd{\date@bbl@⟨babelname⟩}
- \item \Cmd{\blockextras@bbl@⟨babelname⟩}
- \item \Cmd{\inlineextras@bbl@⟨babelname⟩}
- \item \Cmd{\noextras@bbl@⟨babelname⟩}
+ \item \Cmd{\captions@bbl@\meta{babelname}}
+ \item \Cmd{\date@bbl@\meta{babelname}}
+ \item \Cmd{\blockextras@bbl@\meta{babelname}}
+ \item \Cmd{\inlineextras@bbl@\meta{babelname}}
+ \item \Cmd{\noextras@bbl@\meta{babelname}}
\end{itemize}
%
By default, these macros are undefined. If they are defined (\eg by an external package),
-they will be executed after their respective ¦⟨lang⟩¦ counterpart and thus can be used to
-overwrite definitions of the former. Again, use ¦\gappto¦ to define\slash modify these macros.
-For instance, to add a new caption ¦\footnotename¦ to the Swiss variety of German (babel name
+they will be executed after their respective \meta{lang} counterpart and thus can be used to
+overwrite definitions of the former. Again, use \cmd\gappto\ to define\slash modify these macros.
+For instance, to add a new caption \cmd\footnotename\ to the Swiss variety of German (babel name
¦nswissgerman¦), you can do this:
\begin{verbatim}
\gappto\captions@bbl@nswissgerman{\def\footnotename{Fussnote}}
\end{verbatim}
%
If you do this in a document preamble rather than in a package, you need to embrace the redefinition
-by ¦\makeatletter¦ and ¦\makeatother¦ due to the ¦@¦ in the macro names.
+by \cmd\makeatletter\ and \cmd\makeatother\ due to the ¦@¦ in the macro names.
\section{Script-specific numbering}
@@ -1436,25 +1841,27 @@ For instance in an Arabic environment
¦\localnumeral{42}¦ yields \textarabic{\localnumeral{42}}, whereas in an Hebrew environment, it
results in \texthebrew[numerals=hebrew]{\localnumeral{42}} with ¦numerals=hebrew¦, and \texthebrew{\localnumeral{42}}
with ¦numerals=arabic¦. Note that, as opposed to the various ¦digits¦ macros (described in sec.~\ref{sec:decdigit}),
-the argument of ¦\localnumeral¦ must consist of numbers only.
+the argument of \cmd\localnumeral\ must consist of numbers only.
For\new{1.45} the conversion of counters, the starred version \Cmd{\localnumeral*} is provided. This takes a counter as argument.
For instance in an Arabic environment ¦\localnumeral*{page}¦ yields \textarabic{\localnumeral*{page}}.
-For scripts with alphanumeric numbering, the variants \Cmd{\Localnumeral} and \Cmd{\Localnumeral*} provide the uppercased
+For scripts with alphanumeric numbering, the variants \Cmd{\Localnumeral} and \Cmd{\Localnumeral*} provide the uppercased
versions.\medskip
\noindent All these macros provide the following options:
\begin{itemize}
- \item \TB{lang} =\DescribeMacro{[lang=]}\ \textit{local}, main, or <language>.\\
- Output number in the local form of the currently active language for ¦local¦, the main language of the document for ¦main¦,
- and any (loaded) language for ¦<language>¦ (\eg ¦\localnumeral[lang=arabic]{42}}¦).
+ \item \DescribeMacro{[lang=]}\xpgchoicekey{lang}{\xpgpresetvalue{local}, \xpgvalue{main},
+ or \xpgvalue{\meta{language}}}
+ Output number in the local form of the currently active language for
+ ¦local¦, the main language of the document for ¦main¦, and any (loaded)
+ language for \meta{language} (\eg ¦\localnumeral[lang=arabic]{42}}¦).
\end{itemize}
\subsection{Non-Western decimal digits}\label{sec:decdigit}
-In addition\new{v1.1.1} to the generic macros described above, \pkg{polyglossia} provides language-specific conversion macros
+In addition\new{1.1.1} to the generic macros described above, \pkg{polyglossia} provides language-specific conversion macros
which can be used if the generic ones do not suit the need.\footnote{%
A third method are so-called TECKit fontmappings.
Those can be activated with the \pkg{fontspec} ¦Mapping¦ option,
@@ -1463,7 +1870,7 @@ For instance if \cmd\arabicfont\ is defined with the option ¦Mapping=arabicdigi
typing \cmd{\textarabic\{2010\}} results in \textarabic{٢٠١٠}. Note that this method has some drawbacks, though,
for instance when the value of a counter has to be written and read from auxiliary files.
So please use this with care.}
-The macros have the form ¦\<script>digits¦. They convert Arabic numerical input and leave every other input untouched.
+The macros have the form \cmd{\⟨script⟩digits}. They convert Arabic numerical input and leave every other input untouched.
In an Arabic context, for instance, ¦\arabicdigits{9182/738543-X}¦ yields \textarabic{\arabicdigits{9182/738543-X}}.
Currently, the following macros are provided:
@@ -1490,9 +1897,9 @@ For languages which use special (non-Latin) alphanumerical notation\footnote{%
\url{http://en.wikipedia.org/wiki/Hebrew_numerals},
and \url{http://en.wikipedia.org/wiki/Syriac_alphabet}.}, dedicated macros are provided.
-They work in a similar way than the ¦\<script>digits¦ macros described above: They take Arabic numerical input
+They work in a similar way than the \cmd{\⟨script⟩digits} macros described above: They take Arabic numerical input
and output the respective value in the local alphabetic numbering scheme (most of these macros are equivalent
-to ¦\localnumeral¦ and ¦\Localnumeral¦ in the respective context).
+to \cmd\localnumeral\ and \cmd\Localnumeral\ in the respective context).
The following macros are provided:
@@ -1509,6 +1916,13 @@ The following macros are provided:
\item \Cmd\armeniannumeral produces Armenian alphabetic numbering.
Example: ¦\armeniannumeral{1863}¦ yields \textarmenian{\armeniannumeral{1863}}.
+
+ \item \Cmd\belarusiannumeral produces Belarusian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Belarusiannumeral.
+ Depending on the ¦numerals¦ option in the Belarusian language selection, this is either Arabic digit or Cyrillic
+ alphanumercial output.\\
+ Example: With ¦numerals=latin¦ ¦\belarusiannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
+ with ¦numerals=cyrillic-trad¦ ¦\belarusiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+ with ¦numerals=cyrillic-alph¦ ¦\belarusiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
\item \Cmd\georgiannumeral produces Georgian alphabetic numbering.\\
Example: ¦\georgiannumeral{1863}¦ yields \textgeorgian{\georgiannumeral{1863}}.
@@ -1518,24 +1932,40 @@ The following macros are provided:
¦\Greeknumeral{1863}¦ results in \textgreek{\Greeknumeral{1863}}.
\item \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal generate variants of Hebrew alphanumeric numerals.
- The commands behave exactly as they do in \pkg{babel}: ¦\hebrewnumeral¦ outputs the numbers without any decoration,
- ¦\Hebrewnumeral¦ adds \textit{gereshayim} before the last letter, ¦\Hebrewnumeralfinal¦ uses in addition the final forms of Hebrew letters.
+ The commands behave exactly as they do in \pkg{babel}: \cmd\hebrewnumeral\ outputs the numbers without any decoration,
+ \cmd\Hebrewnumeral\ adds \textit{gereshayim} before the last letter, \cmd\Hebrewnumeralfinal\ uses in addition the final forms of Hebrew letters.
Examples:
¦\hebrewnumeral{1750}¦ yields \texthebrew{\hebrewnumeral{1750}},
¦\Hebrewnumeral{1750}¦ yields \texthebrew{\Hebrewnumeral{1750}},
and ¦\Hebrewnumeralfinal{1750}¦ yields \texthebrew{\Hebrewnumeralfinal{1750}}.
+
+ \item \Cmd\mongoliannumeral produces Mongolian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Mongoliannumeral.
+ Depending on the ¦numerals¦ option in the Mongolian language selection, this is either Arabic digit or Cyrillic
+ alphanumercial output.\\
+ Example: With ¦numerals=latin¦ ¦\mongoliannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
+ with ¦numerals=cyrillic-trad¦ ¦\mongoliannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+ with ¦numerals=cyrillic-alph¦ ¦\mongoliannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
\item \Cmd\russiannumeral produces Russian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Russiannumeral.
Depending on the ¦numerals¦ option in the Russian language selection, this is either Arabic digit or Cyrillic
alphanumercial output.\\
Example: With ¦numerals=latin¦ ¦\russiannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
- with ¦numerals=cyrillic¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic]{\russiannumeral{19}}.
+ with ¦numerals=cyrillic-trad¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+ with ¦numerals=cyrillic-alph¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
\item \Cmd\serbiannumeral produces Serbian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Serbiannumeral.
Depending on the ¦numerals¦ option in the Serbian language selection, this is either Arabic digit or Cyrillic
alphanumercial output.\\
- Example: With ¦numerals=latin¦ ¦\serbiannumeral{19}¦ yields \textserbian{\serbiannumeral{19}},
- with ¦numerals=cyrillic¦ ¦\serbiannumeral{19}¦ results in \textserbian[numerals=cyrillic]{\serbiannumeral{19}}.
+ Example: With ¦numerals=latin¦ ¦\serbiannumeral{19}¦ yields \textrussian{\serbiannumeral{19}},
+ with ¦numerals=cyrillic-trad¦ ¦\serbiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\serbiannumeral{19}},\\
+ with ¦numerals=cyrillic-alph¦ ¦\serbiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\serbiannumeral{19}}.
+
+ \item \Cmd\ukrainiannumeral produces Ukrainian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Ukrainiannumeral.
+ Depending on the ¦numerals¦ option in the Ukrainian language selection, this is either Arabic digit or Cyrillic
+ alphanumercial output.\\
+ Example: With ¦numerals=latin¦ ¦\ukrainiannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
+ with ¦numerals=cyrillic-trad¦ ¦\ukrainiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+ with ¦numerals=cyrillic-alph¦ ¦\ukrainiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
\end{itemize}
@@ -1548,14 +1978,14 @@ Thus, footnote handling in right-to-left context sometimes needs manual interven
\subsection{Horizontal footnote position}
-When right-to-left languages are used, the ¦\footnote¦ command becomes sensitive to the text directionality. The footnote is
+When right-to-left languages are used, the \cmd\footnote\ command becomes sensitive to the text directionality. The footnote is
always placed on the side that is currently the origin of direction: on the left side of the page in LTR paragraphs and
on the right in RTL paragraphs.
For cases where this is not desired, two additional footnote commands are provided: \Cmd\RTLfootnote and \Cmd\LTRfootnote.
-¦\LTRfootnote¦ always places the footnote on the left side, notwithstanding the current
-directionality. Likewise, ¦\RTLfootnote¦ always places it on the right side. Like ¦\footnote¦, ¦\RTLfootnote¦
-and ¦\LTRfootnote¦ provide an optional argument to customize the number.
+\cmd\LTRfootnote\ always places the footnote on the left side, notwithstanding the current
+directionality. Likewise, \cmd\RTLfootnote\ always places it on the right side. Like \cmd\footnote, \cmd\RTLfootnote\
+and \cmd\LTRfootnote\ provide an optional argument to customize the number.
\subsection{Footnote rule length and position}
@@ -1572,12 +2002,13 @@ In both cases, you can change the default behavior as follows:
\item Put \Cmd\autofootnoterule in the preamble to have automatic placement depending on the context (see below for elaboration).
\item Put \Cmd\textwidthfootnoterule in the preamble to have a rule that spans the whole text width.
\end{itemize}
-With ¦\autofootnoterule¦, the first footnote on the current page determines the placement. Note that this automatic can fail with
-footnotes at page boundaries that differ in directionality from the first footnote on the page. You can work around such cases by switching to ¦\rightfootnoterule¦ or ¦\leftfootnoterule¦ on these pages.
+With \cmd\autofootnoterule, the first footnote on the current page determines the placement. Note that this automatic can fail with
+footnotes at page boundaries that differ in directionality from the first footnote on the page. You can work around such cases by switching to \cmd\rightfootnoterule\ or \cmd\leftfootnoterule\ on these pages.
Note also that the rule switches might interfere in bad ways with packages or classes that redefine footnotes themselves. This is also the reason
-why ¦\autofootnoterule¦ is not used by default.
+why \cmd\autofootnoterule\ is not used by default.
+\condbreak{5\baselineskip}
\section{Calendars}
\subsection{Hebrew calendar (hebrewcal.sty)}
@@ -1594,24 +2025,24 @@ This package computes dates in the lunar Islamic (Hijra) calendar.\footnote{ %
(Cambridge University Press, 2001).\label{reingold}}
It provides two macros for the end-user.
The command
- \displaycmd{\HijriFromGregorian\{⟨year⟩\}\{⟨month⟩\}\{⟨day⟩\}}{\HijriFromGregorian}
+ \displaycmd{\HijriFromGregorian\marg{year}\marg{month}\marg{day}}{\HijriFromGregorian}
sets the counters ¦Hijriday¦, ¦Hijrimonth¦ and ¦Hijriyear¦.
\Cmd\Hijritoday\ formats the Hijri date for the current day.
-This command is now locale-aware\new{v1.1.1}: its output will differ depending on the
+This command is now locale-aware\new{1.1.1}: its output will differ depending on the
currently active language. Presently \pkg{polyglossia}’s language definition files
-for Arabic, Farsi, Urdu, Turkish and Malay provide a localized version of ¦\Hijritoday¦.
+for Arabic, Farsi, Urdu, Turkish and Malay provide a localized version of \cmd\Hijritoday.
If the formatting macro for the current language is undefined, the Hijri date will be formatted
in Arabic or in roman transliteration, depending of the current writing direction.
You can define a new format or redefine one with the command
- \displaycmd{\DefineHijriDateFormat\{<lang>\}\{<code>\}.}{\DefineHijriDateFormat}
+ \displaycmd{\DefineHijriDateFormat\marg{lang}\marg{code}.}{\DefineHijriDateFormat}
-The command ¦\Hijritoday¦ also accepts an optional argument to add or subtract a correction
+The command \cmd\Hijritoday\ also accepts an optional argument to add or subtract a correction
(in days) to the date computed by the arithmetical algorithm.\footnote{ %
The Islamic calendar is indeed a purely lunar calendar based on the observation
of the first visibility of the lunar crescent at the beginning of the lunar month,
so there can be differences between different localities, as well as between
civil and religious authorities.}
-For instance if ¦\Hijritoday¦ yields the date “7 Rajab 1429” (which is the date that was
+For instance if \cmd\Hijritoday\ yields the date “7 Rajab 1429” (which is the date that was
displayed on the front page of \href{http://www.aljazeera.net}{aljazeera.net} on
11th July 2008), ¦\Hijritoday[1]¦ would rather print “8 Rajab 1429” (the date
indicated the same day on the site \href{http://www.gulfnews.com}{gulfnews.com}).
@@ -1619,19 +2050,26 @@ indicated the same day on the site \href{http://www.gulfnews.com}{gulfnews.com})
\subsection{Farsi (jalālī) calendar (farsical.sty)}
This package is an almost verbatim copy of ¦Arabiftoday.sty¦ (in the \pkg{Arabi} package),
itself a slight modification of ¦ftoday.sty¦ in Farsi\TeX.\footnote{ %
- One day I may rewrite \pkg{farsical} from scratch using the algorithm in
- Reingold \& Gershowitz (ref.~n.~\ref{reingold}).}
+ One day we may rewrite \pkg{farsical} from scratch using the algorithm in
+ Reingold \& Gershowitz (ref.~n.\,\ref{reingold}).}
Here we have renamed the command \cmd\ftoday\ to
\Cmd\Jalalitoday.
Example: today is \Jalalitoday.
-%\section{Varia}
+\section{Auxiliary commands}
+
+The macro \displaycmd{\charifavailable\marg{char code}\marg{substitution}}{\charifavailable}\new{1.47} checks whether
+the character with the specified \meta{char code} (\ie unicode utf-16 code without preceding ¦0x¦) exists in
+the current font. If so, the character is printed, if not, the \meta{substitution} is printed.
+
+Example: ¦\charifavailable{1E9E}{SS}¦ prints the capital version of the German letter ⟨ß⟩ if available
+(\ie \charifavailable{1E9E}{SS}), else it prints the substitution digraph SS.
+
\section{Accessing language information}
The following is specifically relevant to package authors who need information about the languages in use.
-
In order to get such information, \pkg{polyglossia} provides the following macros:
\begin{itemize}
@@ -1646,20 +2084,36 @@ In order to get such information, \pkg{polyglossia} provides the following macro
Note that this macro is also defined for languages that are not supported in \pkg{babel}. In that
case, they are equal to the polyglossia language name.
\item \Cmd\mainbabelname\ analogously stores the name of document's main language (variant) in \pkg{babel}.
+ \item \Cmd{\languageid\marg{type}}\new{1.47} stores the identifier tag of the current language. Currently supported \meta{types}:
+ \begin{itemize}
+ \item ¦bcp-47¦ (alias ¦bcp47¦): IETF BCP-47 language identifier
+ \end{itemize}
+ \item \Cmd{\mainlanguageid\marg{type}}\new{1.47} stores identifier tag of the main language. Currently supported \meta{types}:
+ see \cmd\languageid.
\end{itemize}
-%
-If you want to have a full list of loaded languages/variants, use the following macros:
+\bigskip
+
+\noindent If you want to have a full list of loaded languages/variants, use the following macros:
\begin{itemize}
\item \Cmd{\xpg@loaded}\ stores a comma-separated list of all loaded languages (polyglossia name)
\item \Cmd{\xpg@vloaded}\ stores a comma-separated list of all loaded variants
- \item \Cmd{\xpg@bloaded}\ stores a comma-separated list of \pkg{babel} names of all language variants
+ \item \Cmd{\xpg@bloaded}\ stores a comma-separated list of \pkg{babel} names of all language variants
+ \item \Cmd{\xpg@bcp@loaded}\new{1.47}\ stores a comma-separated list of the BCP-47 IDs of all language variants
\end{itemize}
-%
-Finally, you can test whether a language is loaded by
-\displaycmd{\iflanguageloaded\{⟨lang⟩\}\{⟨true⟩\}\{⟨false⟩\}}{\iflanguageloaded}
-where \texttt{⟨lang⟩} is a \pkg{polyglossia} language name, or
-\displaycmd{\ifbabellanguageloaded\{⟨lang⟩\}\{⟨true⟩\}\{⟨false⟩\}}{\ifbabellanguageloaded}
-where \texttt{⟨lang⟩} is a \pkg{babel} language name.
+\bigskip
+
+\noindent Whether a language is loaded can be tested by
+\displaycmd{\iflanguageloaded\marg{lang}\marg{true}\marg{false}}{\iflanguageloaded}
+where \texttt{\meta{lang}} is a \pkg{polyglossia} language name, by
+\displaycmd{\ifbabellanguageloaded\marg{lang}\marg{true}\marg{false}}{\ifbabellanguageloaded}
+where \texttt{\meta{lang}} is a \pkg{babel} language name (see table~\ref{tab:bbllang} on p.~\pageref{tab:bbllang}), or by
+\displaycmd{\iflanguageidloaded\marg{type}\marg{id}\marg{true}\marg{false}}{\iflanguageidloaded}\new{1.47}
+where \meta{type} is a supported language id type (such as ¦bcp-47¦) and \meta{id} is a language id
+(such as ¦en-US¦; see table~\ref{tab:BCP47-polyglossia} on p.~\pageref{tab:BCP47-polyglossia}).
+\bigskip
+
+\noindent Finally, if you want to know whether a specific language option has been set, you can use
+\displaycmd{\iflanguageoption\marg{lang}\marg{opt. key}\marg{opt. value}\marg{true}\marg{false}}{\iflanguageoption}\new{1.47}
\section{Acknowledgements (by François Charette)}
\pkg{Polyglossia} is notable for being a recycle box of previous contributions
@@ -1675,7 +2129,7 @@ individuals for their assistance in supporting specific languages: \TA{Yves Code
(Sanskrit), \TA{Zdenĕk Wagner} (Hindi), \TA{Mikhal Oren} (Hebrew), \TA{Sergey Astanin} (Russian),
\TA{Khaled Hosny} (Arabic), \TA{Sertaç Ö. Yıldız} (Turkish), \TA{Kamal Abdali} (Urdu),
and several other members of the \XeTeX\ user community, notably \TA{Enrico Gregorio}, who
-has sent me many useful suggestions and corrections and contributed the ¦\newXeTeXintercharclass¦
+has sent me many useful suggestions and corrections and contributed the \cmd\newXeTeXintercharclass\
mechanism in xelatex.ini which is now used by polyglossia.
More recently, \TA{Kevin Godby} of the \href{http://ubuntu-manual.org}{Ubuntu Manual} project has
contributed very useful feedback, bug hunting and, with the help of translators,
@@ -1692,9 +2146,9 @@ since we took over.
In alphabetical order: \TA{Ignas Anikevicius}, \TA{Sina Ahmadi}, \TA{Wouter Bolsterlee}, \TA{Christian Buhtz},
\TA{Zgarbul Andrey}, \TA{Oleg Domanov}, \TA{Philipp Gesang}, \TA{Kevin Godby}, \TA{Enrico Gregorio},
\TA{Khaled Hosny}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime}, \TA{Mike Kroutikov},
-\TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Maïeul Rouquette},
-\TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Keno Wehr}, \TA{Dominik Wujastyk},
-\TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
+\TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Will Robertson}, \TA{Maïeul Rouquette},
+\TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Niranjan Tambe}, \TA{Keno Wehr},
+\TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
Their respective contributions can be identified from the contributor statistics on
\href{https://github.com/reutenauer/polyglossia/graphs/contributors}{GitHub}.
diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
index fe48e7e23e5..3c85e2c6ff5 100644
--- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
@@ -11,7 +11,7 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.46 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -44,8 +44,8 @@ Polyglossia makes it possible to automate the following tasks:
LICENSE
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2019 Arthur Reutenauer,
-Copyright (c) 2019 Bastien Roucariès, 2019 Jürgen Spitzmüller
+Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer,
+Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller
Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence
(https://opensource.org/licenses/MIT).
@@ -74,7 +74,7 @@ to track the issues and follow progress.
The polyglossia package
(C) 2008–2010 François Charette
- (C) 2011-2019 Arthur Reutenauer
+ (C) 2011-2020 Arthur Reutenauer
(C) 2013 Elie Roux
License information appended
@@ -82,7 +82,7 @@ to track the issues and follow progress.
\endpreamble
\postamble
- Copyright (C) 2019 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
+ Copyright (C) 2020 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -101,61 +101,168 @@ to track the issues and follow progress.
\let\MetaPrefix\DoubleperCent
\askforoverwritefalse
\generate{\file{gloss-acadien.ldf}{\from{polyglossia.dtx}{gloss-acadien.ldf}}}
+\generate{\file{gloss-aeb.ldf}{\from{polyglossia.dtx}{gloss-aeb.ldf}}}
+\generate{\file{gloss-af.ldf}{\from{polyglossia.dtx}{gloss-af.ldf}}}
+\generate{\file{gloss-afb.ldf}{\from{polyglossia.dtx}{gloss-afb.ldf}}}
\generate{\file{gloss-afrikaans.ldf}{\from{polyglossia.dtx}{gloss-afrikaans.ldf}}}
\generate{\file{gloss-albanian.ldf}{\from{polyglossia.dtx}{gloss-albanian.ldf}}}
+\generate{\file{gloss-am.ldf}{\from{polyglossia.dtx}{gloss-am.ldf}}}
\generate{\file{gloss-american.ldf}{\from{polyglossia.dtx}{gloss-american.ldf}}}
\generate{\file{gloss-amharic.ldf}{\from{polyglossia.dtx}{gloss-amharic.ldf}}}
+\generate{\file{gloss-apd.ldf}{\from{polyglossia.dtx}{gloss-apd.ldf}}}
+\generate{\file{gloss-ar-IQ.ldf}{\from{polyglossia.dtx}{gloss-ar-IQ.ldf}}}
+\generate{\file{gloss-ar-JO.ldf}{\from{polyglossia.dtx}{gloss-ar-JO.ldf}}}
+\generate{\file{gloss-ar-LB.ldf}{\from{polyglossia.dtx}{gloss-ar-LB.ldf}}}
+\generate{\file{gloss-ar-MR.ldf}{\from{polyglossia.dtx}{gloss-ar-MR.ldf}}}
+\generate{\file{gloss-ar-PS.ldf}{\from{polyglossia.dtx}{gloss-ar-PS.ldf}}}
+\generate{\file{gloss-ar-SY.ldf}{\from{polyglossia.dtx}{gloss-ar-SY.ldf}}}
+\generate{\file{gloss-ar-YE.ldf}{\from{polyglossia.dtx}{gloss-ar-YE.ldf}}}
+\generate{\file{gloss-ar.ldf}{\from{polyglossia.dtx}{gloss-ar.ldf}}}
\generate{\file{gloss-arabic.ldf}{\from{polyglossia.dtx}{gloss-arabic.ldf}}}
\generate{\file{gloss-armenian.ldf}{\from{polyglossia.dtx}{gloss-armenian.ldf}}}
+\generate{\file{gloss-arq.ldf}{\from{polyglossia.dtx}{gloss-arq.ldf}}}
+\generate{\file{gloss-ary.ldf}{\from{polyglossia.dtx}{gloss-ary.ldf}}}
+\generate{\file{gloss-arz.ldf}{\from{polyglossia.dtx}{gloss-arz.ldf}}}
+\generate{\file{gloss-ast.ldf}{\from{polyglossia.dtx}{gloss-ast.ldf}}}
\generate{\file{gloss-asturian.ldf}{\from{polyglossia.dtx}{gloss-asturian.ldf}}}
\generate{\file{gloss-australian.ldf}{\from{polyglossia.dtx}{gloss-australian.ldf}}}
\generate{\file{gloss-austrian.ldf}{\from{polyglossia.dtx}{gloss-austrian.ldf}}}
+\generate{\file{gloss-ayl.ldf}{\from{polyglossia.dtx}{gloss-ayl.ldf}}}
\generate{\file{gloss-bahasa.ldf}{\from{polyglossia.dtx}{gloss-bahasa.ldf}}}
\generate{\file{gloss-bahasai.ldf}{\from{polyglossia.dtx}{gloss-bahasai.ldf}}}
\generate{\file{gloss-bahasam.ldf}{\from{polyglossia.dtx}{gloss-bahasam.ldf}}}
\generate{\file{gloss-basque.ldf}{\from{polyglossia.dtx}{gloss-basque.ldf}}}
+\generate{\file{gloss-be-tarask.ldf}{\from{polyglossia.dtx}{gloss-be-tarask.ldf}}}
+\generate{\file{gloss-be.ldf}{\from{polyglossia.dtx}{gloss-be.ldf}}}
\generate{\file{gloss-belarusian.ldf}{\from{polyglossia.dtx}{gloss-belarusian.ldf}}}
\generate{\file{gloss-bengali.ldf}{\from{polyglossia.dtx}{gloss-bengali.ldf}}}
+\generate{\file{gloss-bg.ldf}{\from{polyglossia.dtx}{gloss-bg.ldf}}}
+\generate{\file{gloss-bn.ldf}{\from{polyglossia.dtx}{gloss-bn.ldf}}}
+\generate{\file{gloss-bo.ldf}{\from{polyglossia.dtx}{gloss-bo.ldf}}}
\generate{\file{gloss-bosnian.ldf}{\from{polyglossia.dtx}{gloss-bosnian.ldf}}}
+\generate{\file{gloss-br.ldf}{\from{polyglossia.dtx}{gloss-br.ldf}}}
\generate{\file{gloss-brazil.ldf}{\from{polyglossia.dtx}{gloss-brazil.ldf}}}
\generate{\file{gloss-breton.ldf}{\from{polyglossia.dtx}{gloss-breton.ldf}}}
\generate{\file{gloss-british.ldf}{\from{polyglossia.dtx}{gloss-british.ldf}}}
+\generate{\file{gloss-bs.ldf}{\from{polyglossia.dtx}{gloss-bs.ldf}}}
\generate{\file{gloss-bulgarian.ldf}{\from{polyglossia.dtx}{gloss-bulgarian.ldf}}}
+\generate{\file{gloss-ca.ldf}{\from{polyglossia.dtx}{gloss-ca.ldf}}}
\generate{\file{gloss-canadian.ldf}{\from{polyglossia.dtx}{gloss-canadian.ldf}}}
\generate{\file{gloss-canadien.ldf}{\from{polyglossia.dtx}{gloss-canadien.ldf}}}
\generate{\file{gloss-catalan.ldf}{\from{polyglossia.dtx}{gloss-catalan.ldf}}}
+\generate{\file{gloss-ckb-Arab.ldf}{\from{polyglossia.dtx}{gloss-ckb-Arab.ldf}}}
+\generate{\file{gloss-ckb-Latn.ldf}{\from{polyglossia.dtx}{gloss-ckb-Latn.ldf}}}
+\generate{\file{gloss-ckb.ldf}{\from{polyglossia.dtx}{gloss-ckb.ldf}}}
+\generate{\file{gloss-cop.ldf}{\from{polyglossia.dtx}{gloss-cop.ldf}}}
\generate{\file{gloss-coptic.ldf}{\from{polyglossia.dtx}{gloss-coptic.ldf}}}
\generate{\file{gloss-croatian.ldf}{\from{polyglossia.dtx}{gloss-croatian.ldf}}}
+\generate{\file{gloss-cy.ldf}{\from{polyglossia.dtx}{gloss-cy.ldf}}}
+\generate{\file{gloss-cz.ldf}{\from{polyglossia.dtx}{gloss-cz.ldf}}}
\generate{\file{gloss-czech.ldf}{\from{polyglossia.dtx}{gloss-czech.ldf}}}
+\generate{\file{gloss-da.ldf}{\from{polyglossia.dtx}{gloss-da.ldf}}}
\generate{\file{gloss-danish.ldf}{\from{polyglossia.dtx}{gloss-danish.ldf}}}
+\generate{\file{gloss-de-AT-1901.ldf}{\from{polyglossia.dtx}{gloss-de-AT-1901.ldf}}}
+\generate{\file{gloss-de-AT-1996.ldf}{\from{polyglossia.dtx}{gloss-de-AT-1996.ldf}}}
+\generate{\file{gloss-de-AT.ldf}{\from{polyglossia.dtx}{gloss-de-AT.ldf}}}
+\generate{\file{gloss-de-CH-1901.ldf}{\from{polyglossia.dtx}{gloss-de-CH-1901.ldf}}}
+\generate{\file{gloss-de-CH-1996.ldf}{\from{polyglossia.dtx}{gloss-de-CH-1996.ldf}}}
+\generate{\file{gloss-de-CH.ldf}{\from{polyglossia.dtx}{gloss-de-CH.ldf}}}
+\generate{\file{gloss-de-DE-1901.ldf}{\from{polyglossia.dtx}{gloss-de-DE-1901.ldf}}}
+\generate{\file{gloss-de-DE-1996.ldf}{\from{polyglossia.dtx}{gloss-de-DE-1996.ldf}}}
+\generate{\file{gloss-de-DE.ldf}{\from{polyglossia.dtx}{gloss-de-DE.ldf}}}
+\generate{\file{gloss-de-Latf-AT-1901.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-AT-1901.ldf}}}
+\generate{\file{gloss-de-Latf-AT-1996.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-AT-1996.ldf}}}
+\generate{\file{gloss-de-Latf-AT.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-AT.ldf}}}
+\generate{\file{gloss-de-Latf-CH-1901.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-CH-1901.ldf}}}
+\generate{\file{gloss-de-Latf-CH-1996.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-CH-1996.ldf}}}
+\generate{\file{gloss-de-Latf-CH.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-CH.ldf}}}
+\generate{\file{gloss-de-Latf-DE-1901.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-DE-1901.ldf}}}
+\generate{\file{gloss-de-Latf-DE-1996.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-DE-1996.ldf}}}
+\generate{\file{gloss-de-Latf-DE.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-DE.ldf}}}
+\generate{\file{gloss-de-Latf.ldf}{\from{polyglossia.dtx}{gloss-de-Latf.ldf}}}
+\generate{\file{gloss-de.ldf}{\from{polyglossia.dtx}{gloss-de.ldf}}}
\generate{\file{gloss-divehi.ldf}{\from{polyglossia.dtx}{gloss-divehi.ldf}}}
+\generate{\file{gloss-dsb.ldf}{\from{polyglossia.dtx}{gloss-dsb.ldf}}}
\generate{\file{gloss-dutch.ldf}{\from{polyglossia.dtx}{gloss-dutch.ldf}}}
+\generate{\file{gloss-dv.ldf}{\from{polyglossia.dtx}{gloss-dv.ldf}}}
+\generate{\file{gloss-el-monoton.ldf}{\from{polyglossia.dtx}{gloss-el-monoton.ldf}}}
+\generate{\file{gloss-el-polyton.ldf}{\from{polyglossia.dtx}{gloss-el-polyton.ldf}}}
+\generate{\file{gloss-el.ldf}{\from{polyglossia.dtx}{gloss-el.ldf}}}
+\generate{\file{gloss-en-AU.ldf}{\from{polyglossia.dtx}{gloss-en-AU.ldf}}}
+\generate{\file{gloss-en-CA.ldf}{\from{polyglossia.dtx}{gloss-en-CA.ldf}}}
+\generate{\file{gloss-en-GB.ldf}{\from{polyglossia.dtx}{gloss-en-GB.ldf}}}
+\generate{\file{gloss-en-NZ.ldf}{\from{polyglossia.dtx}{gloss-en-NZ.ldf}}}
+\generate{\file{gloss-en-US.ldf}{\from{polyglossia.dtx}{gloss-en-US.ldf}}}
+\generate{\file{gloss-en.ldf}{\from{polyglossia.dtx}{gloss-en.ldf}}}
\generate{\file{gloss-english.ldf}{\from{polyglossia.dtx}{gloss-english.ldf}}}
+\generate{\file{gloss-eo.ldf}{\from{polyglossia.dtx}{gloss-eo.ldf}}}
+\generate{\file{gloss-es-ES.ldf}{\from{polyglossia.dtx}{gloss-es-ES.ldf}}}
+\generate{\file{gloss-es-MX.ldf}{\from{polyglossia.dtx}{gloss-es-MX.ldf}}}
+\generate{\file{gloss-es.ldf}{\from{polyglossia.dtx}{gloss-es.ldf}}}
\generate{\file{gloss-esperanto.ldf}{\from{polyglossia.dtx}{gloss-esperanto.ldf}}}
\generate{\file{gloss-estonian.ldf}{\from{polyglossia.dtx}{gloss-estonian.ldf}}}
+\generate{\file{gloss-et.ldf}{\from{polyglossia.dtx}{gloss-et.ldf}}}
+\generate{\file{gloss-eu.ldf}{\from{polyglossia.dtx}{gloss-eu.ldf}}}
+\generate{\file{gloss-fa.ldf}{\from{polyglossia.dtx}{gloss-fa.ldf}}}
\generate{\file{gloss-farsi.ldf}{\from{polyglossia.dtx}{gloss-farsi.ldf}}}
+\generate{\file{gloss-fi.ldf}{\from{polyglossia.dtx}{gloss-fi.ldf}}}
\generate{\file{gloss-finnish.ldf}{\from{polyglossia.dtx}{gloss-finnish.ldf}}}
+\generate{\file{gloss-fr-CA.ldf}{\from{polyglossia.dtx}{gloss-fr-CA.ldf}}}
+\generate{\file{gloss-fr-CH.ldf}{\from{polyglossia.dtx}{gloss-fr-CH.ldf}}}
+\generate{\file{gloss-fr-FR.ldf}{\from{polyglossia.dtx}{gloss-fr-FR.ldf}}}
+\generate{\file{gloss-fr.ldf}{\from{polyglossia.dtx}{gloss-fr.ldf}}}
\generate{\file{gloss-french.ldf}{\from{polyglossia.dtx}{gloss-french.ldf}}}
\generate{\file{gloss-friulan.ldf}{\from{polyglossia.dtx}{gloss-friulan.ldf}}}
\generate{\file{gloss-friulian.ldf}{\from{polyglossia.dtx}{gloss-friulian.ldf}}}
+\generate{\file{gloss-fur.ldf}{\from{polyglossia.dtx}{gloss-fur.ldf}}}
+\generate{\file{gloss-ga.ldf}{\from{polyglossia.dtx}{gloss-ga.ldf}}}
\generate{\file{gloss-gaelic.ldf}{\from{polyglossia.dtx}{gloss-gaelic.ldf}}}
\generate{\file{gloss-galician.ldf}{\from{polyglossia.dtx}{gloss-galician.ldf}}}
+\generate{\file{gloss-gd.ldf}{\from{polyglossia.dtx}{gloss-gd.ldf}}}
\generate{\file{gloss-georgian.ldf}{\from{polyglossia.dtx}{gloss-georgian.ldf}}}
\generate{\file{gloss-german.ldf}{\from{polyglossia.dtx}{gloss-german.ldf}}}
\generate{\file{gloss-germanb.ldf}{\from{polyglossia.dtx}{gloss-germanb.ldf}}}
+\generate{\file{gloss-gl.ldf}{\from{polyglossia.dtx}{gloss-gl.ldf}}}
+\generate{\file{gloss-grc.ldf}{\from{polyglossia.dtx}{gloss-grc.ldf}}}
\generate{\file{gloss-greek.ldf}{\from{polyglossia.dtx}{gloss-greek.ldf}}}
+\generate{\file{gloss-he.ldf}{\from{polyglossia.dtx}{gloss-he.ldf}}}
\generate{\file{gloss-hebrew.ldf}{\from{polyglossia.dtx}{gloss-hebrew.ldf}}}
+\generate{\file{gloss-hi.ldf}{\from{polyglossia.dtx}{gloss-hi.ldf}}}
\generate{\file{gloss-hindi.ldf}{\from{polyglossia.dtx}{gloss-hindi.ldf}}}
+\generate{\file{gloss-hr.ldf}{\from{polyglossia.dtx}{gloss-hr.ldf}}}
+\generate{\file{gloss-hsb.ldf}{\from{polyglossia.dtx}{gloss-hsb.ldf}}}
+\generate{\file{gloss-hu.ldf}{\from{polyglossia.dtx}{gloss-hu.ldf}}}
\generate{\file{gloss-hungarian.ldf}{\from{polyglossia.dtx}{gloss-hungarian.ldf}}}
+\generate{\file{gloss-hy.ldf}{\from{polyglossia.dtx}{gloss-hy.ldf}}}
+\generate{\file{gloss-ia.ldf}{\from{polyglossia.dtx}{gloss-ia.ldf}}}
\generate{\file{gloss-icelandic.ldf}{\from{polyglossia.dtx}{gloss-icelandic.ldf}}}
+\generate{\file{gloss-id.ldf}{\from{polyglossia.dtx}{gloss-id.ldf}}}
\generate{\file{gloss-interlingua.ldf}{\from{polyglossia.dtx}{gloss-interlingua.ldf}}}
\generate{\file{gloss-irish.ldf}{\from{polyglossia.dtx}{gloss-irish.ldf}}}
+\generate{\file{gloss-is.ldf}{\from{polyglossia.dtx}{gloss-is.ldf}}}
+\generate{\file{gloss-it.ldf}{\from{polyglossia.dtx}{gloss-it.ldf}}}
\generate{\file{gloss-italian.ldf}{\from{polyglossia.dtx}{gloss-italian.ldf}}}
+\generate{\file{gloss-ja.ldf}{\from{polyglossia.dtx}{gloss-ja.ldf}}}
\generate{\file{gloss-japanese.ldf}{\from{polyglossia.dtx}{gloss-japanese.ldf}}}
+\generate{\file{gloss-ka.ldf}{\from{polyglossia.dtx}{gloss-ka.ldf}}}
\generate{\file{gloss-kannada.ldf}{\from{polyglossia.dtx}{gloss-kannada.ldf}}}
\generate{\file{gloss-khmer.ldf}{\from{polyglossia.dtx}{gloss-khmer.ldf}}}
+\generate{\file{gloss-km.ldf}{\from{polyglossia.dtx}{gloss-km.ldf}}}
+\generate{\file{gloss-kmr-Arab.ldf}{\from{polyglossia.dtx}{gloss-kmr-Arab.ldf}}}
+\generate{\file{gloss-kmr-Latn.ldf}{\from{polyglossia.dtx}{gloss-kmr-Latn.ldf}}}
+\generate{\file{gloss-kmr.ldf}{\from{polyglossia.dtx}{gloss-kmr.ldf}}}
+\generate{\file{gloss-kn.ldf}{\from{polyglossia.dtx}{gloss-kn.ldf}}}
+\generate{\file{gloss-ko.ldf}{\from{polyglossia.dtx}{gloss-ko.ldf}}}
\generate{\file{gloss-korean.ldf}{\from{polyglossia.dtx}{gloss-korean.ldf}}}
+\generate{\file{gloss-ku-Arab.ldf}{\from{polyglossia.dtx}{gloss-ku-Arab.ldf}}}
+\generate{\file{gloss-ku-Latn.ldf}{\from{polyglossia.dtx}{gloss-ku-Latn.ldf}}}
+\generate{\file{gloss-ku.ldf}{\from{polyglossia.dtx}{gloss-ku.ldf}}}
\generate{\file{gloss-kurdish.ldf}{\from{polyglossia.dtx}{gloss-kurdish.ldf}}}
+\generate{\file{gloss-kurmanji.ldf}{\from{polyglossia.dtx}{gloss-kurmanji.ldf}}}
+\generate{\file{gloss-la-x-classic.ldf}{\from{polyglossia.dtx}{gloss-la-x-classic.ldf}}}
+\generate{\file{gloss-la-x-ecclesia.ldf}{\from{polyglossia.dtx}{gloss-la-x-ecclesia.ldf}}}
+\generate{\file{gloss-la-x-medieval.ldf}{\from{polyglossia.dtx}{gloss-la-x-medieval.ldf}}}
+\generate{\file{gloss-la.ldf}{\from{polyglossia.dtx}{gloss-la.ldf}}}
\generate{\file{gloss-lao.ldf}{\from{polyglossia.dtx}{gloss-lao.ldf}}}
\generate{\file{gloss-latex.ldf}{\from{polyglossia.dtx}{gloss-latex.ldf}}}
\generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}}
@@ -164,15 +271,23 @@ to track the issues and follow progress.
\generate{\file{gloss-latinmedieval.ldf}{\from{polyglossia.dtx}{gloss-latinmedieval.ldf}}}
\generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}}
\generate{\file{gloss-lithuanian.ldf}{\from{polyglossia.dtx}{gloss-lithuanian.ldf}}}
+\generate{\file{gloss-lo.ldf}{\from{polyglossia.dtx}{gloss-lo.ldf}}}
\generate{\file{gloss-lowersorbian.ldf}{\from{polyglossia.dtx}{gloss-lowersorbian.ldf}}}
\generate{\file{gloss-lsorbian.ldf}{\from{polyglossia.dtx}{gloss-lsorbian.ldf}}}
+\generate{\file{gloss-lt.ldf}{\from{polyglossia.dtx}{gloss-lt.ldf}}}
+\generate{\file{gloss-lv.ldf}{\from{polyglossia.dtx}{gloss-lv.ldf}}}
\generate{\file{gloss-macedonian.ldf}{\from{polyglossia.dtx}{gloss-macedonian.ldf}}}
\generate{\file{gloss-magyar.ldf}{\from{polyglossia.dtx}{gloss-magyar.ldf}}}
\generate{\file{gloss-malay.ldf}{\from{polyglossia.dtx}{gloss-malay.ldf}}}
\generate{\file{gloss-malayalam.ldf}{\from{polyglossia.dtx}{gloss-malayalam.ldf}}}
\generate{\file{gloss-marathi.ldf}{\from{polyglossia.dtx}{gloss-marathi.ldf}}}
+\generate{\file{gloss-mk.ldf}{\from{polyglossia.dtx}{gloss-mk.ldf}}}
+\generate{\file{gloss-ml.ldf}{\from{polyglossia.dtx}{gloss-ml.ldf}}}
+\generate{\file{gloss-mn.ldf}{\from{polyglossia.dtx}{gloss-mn.ldf}}}
\generate{\file{gloss-mongolian.ldf}{\from{polyglossia.dtx}{gloss-mongolian.ldf}}}
+\generate{\file{gloss-mr.ldf}{\from{polyglossia.dtx}{gloss-mr.ldf}}}
\generate{\file{gloss-naustrian.ldf}{\from{polyglossia.dtx}{gloss-naustrian.ldf}}}
+\generate{\file{gloss-nb.ldf}{\from{polyglossia.dtx}{gloss-nb.ldf}}}
\generate{\file{gloss-newzealand.ldf}{\from{polyglossia.dtx}{gloss-newzealand.ldf}}}
\generate{\file{gloss-ngerman.ldf}{\from{polyglossia.dtx}{gloss-ngerman.ldf}}}
\generate{\file{gloss-nko.ldf}{\from{polyglossia.dtx}{gloss-nko.ldf}}}
@@ -249,19 +364,19 @@ to track the issues and follow progress.
% !TeX TS-program = xelatex
\documentclass[11pt]{ltxdoc}
\usepackage{color}
-\usepackage{xspace,fancyvrb,booktabs}
+\usepackage{xspace,fancyvrb,longtable,booktabs}
\usepackage[neverdecrease]{paralist}
\usepackage[format=hang,labelfont=bf,labelsep=period]{caption}
-\definecolor{myblue}{rgb}{0.02,0.04,0.48}
+\definecolor{xpgblue}{rgb}{0.02,0.04,0.48}
\definecolor{lightblue}{rgb}{0.61,.8,.8}
-\definecolor{myred}{rgb}{0.65,0.04,0.07}
+\definecolor{xpgred}{rgb}{0.65,0.04,0.07}
\usepackage[
unicode=true,
bookmarks=true,
colorlinks=true,
- linkcolor=myblue,
- urlcolor=myblue,
- citecolor=myblue,
+ linkcolor=xpgblue,
+ urlcolor=xpgblue,
+ citecolor=xpgblue,
hyperindex=false,
hyperfootnotes=false,
pdftitle={Polyglossia: Modern multilingual typesetting with XeLaTeX and LuaLaTeX},
@@ -277,13 +392,13 @@ to track the issues and follow progress.
\setotherlanguages{arabic,armenian,hebrew,syriac,greek,russian,serbian,catalan,georgian}
\usepackage[protrusion]{microtype}
\newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace}
-\newcommand*\pkg[1]{\textsf{\color{myblue}#1}}
-\newcommand*\file[1]{\texttt{\color{myblue}#1}}
-\newcommand*\TR[1]{\textcolor{myred}{#1}}
-\newcommand*\TX[1]{\hyperref[#1]{\textcolor{myred}{#1}}}
-\newcommand*\TB[1]{\textcolor{myblue}{\bf #1}}
-\newcommand*\TA[1]{\textsc{\color{myblue}#1}}
+\newcommand*\pkg[1]{\textsf{\color{xpgblue}#1}}
+\newcommand*\file[1]{\texttt{\color{xpgblue}#1}}
+\newcommand*\TR[1]{\textcolor{xpgred}{#1}}
+\newcommand*\TX[1]{\hyperref[#1]{\textcolor{xpgred}{#1}}}
+\newcommand*\TA[1]{\textsc{\color{xpgblue}#1}}
\newcommand*\link[1]{\href{#1}{#1}}
+\renewcommand*\meta[1]{\texttt{⟨#1⟩}}
\def\eg{\textit{e.g.,}\xspace}
\def\ie{\textit{i.e.,}\xspace}
\def\ca{\textit{ca.}\@\xspace}
@@ -291,14 +406,37 @@ to track the issues and follow progress.
\def\Ie{\textit{I.e.,}\xspace}
\def\etc{\@ifnextchar.{\textit{etc}}{\textit{etc.}\@\xspace}}
+%% Commands for documenting options
+\newcommand*\xpgoption[1]{\textcolor{xpgblue}{\ttfamily\bfseries #1}}
+\newcommand*\xpgvalue[1]{\texttt{#1}}
+\newcommand*\xpgpresetvalue[1]{\texttt{\textit{#1}}}
+\newcommand*\xpgdefaultvalue[1]{\texttt{*#1}}
+
+% arguments: #1 version number, #2 key name, #3 footnote, #4 possible values
+\NewDocumentCommand\xpgchoicekey{omom}{%
+ \xpgoption{#2}\IfValueT{#3}{\footnote{#3}}%
+ \IfValueT{#1}{\new{#1}} \xpgvalue{=} #4\par%
+}
+
+% arguments: #1 version number, #2 key name, #3 footnote
+\NewDocumentCommand\xpgboolkey{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{true} or \xpgvalue{false}}}
+\NewDocumentCommand\xpgboolkeytrue{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{\xpgpresetvalue{true}} or \xpgvalue{false}}}
+\NewDocumentCommand\xpgboolkeyfalse{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{true} or \xpgpresetvalue{false}}}
+
+% arguments: #1 version number, #2 key name, #3 default code
+\NewDocumentCommand\xpgcodekey{omv}{%
+ \xpgoption{#2}\IfValueT{#1}{\new{#1}}
+ \xpgvalue{=} \meta{code} (default value: \texttt{#3})\par%
+}
+
%% Sidenotes << copied from fontspec.dtx
\newcommand\new[1]{%
- \edef\thisversion{#1}%
+ \edef\thisversion{v#1}%
\ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
$\leftarrow$}%
\marginpar{\centering
\small\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
- \textsf{#1}}}
+ \textsf{v#1}}}
\newcommand\displaycmd[2]{%
\\\DescribeMacro{#2}\centerline{\cmd{#1}}}
\renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}%
@@ -318,7 +456,7 @@ to track the issues and follow progress.
\pretocmd{\subsection}{\condbreak{2\baselineskip}}{}{}
%% fontspec declarations:
-\setmainfont{Linux Libertine O}
+\setmainfont{Linux Libertine O}[Numbers=OldStyle]
\setsansfont{Linux Biolinum O}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
@@ -348,12 +486,12 @@ to track the issues and follow progress.
% \errorcontextlines=999
% \makeatletter
%
-% \hyphenation{Kha-li-ghi Reu-ten-auer}
+% \hyphenation{Kha-li-ghi Reu-ten-auer new-zea-land}
% \GetFileInfo{polyglossia.sty}
%
% \title{\textcolor{lightblue}{\Huge\fontspec[LetterSpace=40]{GFS Ambrosia} Πολυγλωσσια}
% \\[16pt]
-% \color{myblue}Polyglossia: Modern multilingual typesetting with \XeLaTeX\ and \LuaLaTeX}
+% \color{xpgblue}Polyglossia: Modern multilingual typesetting with \XeLaTeX\ and \LuaLaTeX}
% \author{\TA{François Charette} \and \TA{Arthur Reutenauer}\thanks{Current maintainer}
% \and \TA{Bastien Roucariès} \and \TA{Jürgen Spitzmüller}}
% \date{\filedate \qquad \fileversion\\
@@ -376,7 +514,7 @@ to track the issues and follow progress.
% \section{Introduction}
%
% \pkg{Polyglossia} is a package for facilitating multilingual typesetting with
-% \XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it
+% \XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it
% can be used as an alternative to \pkg{babel} for performing the following
% tasks automatically:
%
@@ -400,7 +538,7 @@ to track the issues and follow progress.
% that are written from right to left (via the package \pkg{bidi},
% available separately).
% \end{enumerate}
-%
+% ^^A
% Several features of \pkg{babel} that do not make sense in the \XeTeX\ world (like font
% encodings, shorthands, etc.) are not supported.
% Generally speaking, \pkg{polyglossia} aims to remain as compatible as possible
@@ -412,7 +550,7 @@ to track the issues and follow progress.
% macros defined in the \pkg{etoolbox} package by \TA{Philipp Lehmann} and \TA{Joseph Wright}.
% Being designed for \XeLaTeX\ and \LuaLaTeX, it obviously also relies on \pkg{fontspec} by
% \TA{Will Robertson}. For languages written from right to left, it needs the package \pkg{bidi}
-% (for \XeTeX) or \pkg{luabidi} (for \LuaTeX) by \TA{Vafa Khalighi} (\textarabic{وفا خليقي}) and
+% (for \XeTeX) or \pkg{luabidi} (for \LuaTeX) by \TA{Vafa Khalighi} (\textarabic{وفا خليقي}) and
% the \pkg{bidi-tex GitHub Organisation}.
% Polyglossia also bundles three packages for calendaric computations (\pkg{hebrewcal},
% \pkg{hijrical}, and \pkg{farsical}).
@@ -423,16 +561,16 @@ to track the issues and follow progress.
% \subsection{Activating languages}
%
% The default language of a document is specified by means of the command
-% \displaycmd{\setdefaultlanguage[⟨options⟩]\{⟨lang⟩\}}{\setdefaultlanguage}
+% \displaycmd{\setdefaultlanguage\oarg{options}\marg{lang}}{\setdefaultlanguage}
% (or, equivalently, \Cmd\setmainlanguage).
% Secondary languages are specified with
-% \displaycmd{\setotherlanguage[⟨options⟩]\{⟨lang⟩\}.}{\setotherlanguage}
+% \displaycmd{\setotherlanguage\oarg{options}\marg{lang}.}{\setotherlanguage}
% All these commands allow you to set language-specific options.\footnote{%
% Section~\ref{specific} documents these options for the respective languages.}
% It is also possible to load a series of secondary languages at once (but without options)
% using
-% \displaycmd{\setotherlanguages\{⟨lang1⟩,⟨lang2⟩,⟨lang3⟩,…\}.}{\setotherlanguages}
-%
+% \displaycmd{\setotherlanguages\marg{lang1⟩,⟨lang2⟩,⟨lang3⟩,⟨…}.}{\setotherlanguages}
+% ^^A
% All language-specific options can be modified locally by means of the
% language-switching commands described in section \ref{languageswitching}.
%
@@ -453,7 +591,7 @@ to track the issues and follow progress.
% ^^A Edited by hand -- JS, 2019-11-01
% \begin{tabular}{lllll}
% \toprule
-% \TX{afrikaans} & danish & \TX{hungarian} & marathi & \TX{slovenian} \\
+% \TX{afrikaans} & danish & \TX{hungarian} & \TX{marathi} & \TX{slovenian} \\
% albanian & divehi & icelandic & \TX{mongolian} & \TX{sorbian} \\
% amharic & \TX{dutch} & interlingua & nko & \TX{spanish} \\
% \TX{arabic} & \TX{english} & \TX{italian} & \TX{norwegian} & swedish \\
@@ -467,26 +605,26 @@ to track the issues and follow progress.
% bulgarian & \TX{georgian} & latvian & \TX{russian} & \TX{ukrainian} \\
% \TX{catalan} & \TX{german} & lithuanian & \TX{sami} & urdu \\
% coptic & \TX{greek} & macedonian & \TX{sanskrit} & vietnamese \\
-% croatian & \TX{hebrew} & \TX{malay} & \TX{serbian} & \TX{welsh} \\
+% \TX{croatian} & \TX{hebrew} & \TX{malay} & \TX{serbian} & \TX{welsh} \\
% \TX{czech} & \TX{hindi} & malayalam & \TX{slovak} & \\
% \bottomrule
% \end{tabular}
%
% \end{table}
%
-% \paragraph{Version Notes} The support for Amharic\new{v1.0.1} should be considered an experimental attempt to
+% \paragraph{Version Notes} The support for Amharic\new{1.0.1} should be considered an experimental attempt to
% port the package \pkg{ethiop}; feedback is welcome.
-% Version 1.1.1\new{v1.1.1} added support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.},
+% Version 1.1.1\new{1.1.1} added support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.},
% Lithuanian, %\footnote{ Provided by Kevin Godby and Paulius Sladkevičius.},
% and Urdu. %\footnote{ Provided by Kamal Abdali.}
% ^^A
-% Version 1.2\new{v1.2.0} introduced Armenian, Occitan, Bengali,
+% Version 1.2\new{1.2.0} introduced Armenian, Occitan, Bengali,
% Lao, Malayalam, Marathi, Tamil, Telugu, and Turkmen.\footnote{%
% See acknowledgements at the end for due credit to the various contributors.}
-% Version 1.43\new{v1.43} brought basic support for Japanese (this
+% Version 1.43\new{1.43} brought basic support for Japanese (this
% is considered experimental, feedback is appreciated).
-% In version 1.45\new{v1.45}, support for Kurdish and Mongolian as well as some new
-% variants (Canadian French and English) have been added. Furthermore, for consistency reasons, some language have
+% In version 1.45\new{1.45}, support for Kurdish and Mongolian as well as some new
+% variants (Canadian French and English) have been added. Furthermore, for consistency reasons, some language have
% been renamed (\emph{farsi}\textrightarrow\emph{persian}, \emph{friulan}\textrightarrow\emph{friulian},
% \emph{magyar}\textrightarrow\emph{hungarian}, \emph{portuges}\textrightarrow\emph{portuguese},
% \emph{samin}\textrightarrow\emph{sami}) or merged (\emph{bahasai}\slash\emph{bahasam}\textrightarrow\emph{malay},
@@ -495,10 +633,10 @@ to track the issues and follow progress.
% \emph{irish}\slash\emph{scottish}\textrightarrow\emph{gaelic},
% \emph{norsk}\slash\emph{nynorsk}\textrightarrow\emph{norwegian}). The old names are still supported for backwards
% compatibility reasons.
-% Version 1.46\new{v1.46} introduces support for Afrikaans, Belarusian, Bosnian and Georgian.
+% Version 1.46\new{1.46} introduces support for Afrikaans, Belarusian, Bosnian and Georgian.
%
%
-% \subsection{Relation to and use of Babel language names}
+% \subsection{Relation to and use of Babel language names}\label{sec:babelnames}
%
% If you are familiar with the \pkg{babel} package, you will note that \pkg{polyglossia}'s language naming
% slightly differs. Whereas \pkg{babel} has a unique name for each language variety (\eg\emph{american} and \emph{british}),
@@ -507,7 +645,7 @@ to track the issues and follow progress.
% Furthermore, \pkg{babel} sometimes uses abbreviated language names (\eg\emph{bahasam} for Bahasa Malayu) as well
% as endonyms, \ie language names coming from the designated languages (such as \emph{bahasa}, \emph{canadien} or \emph{magyar}).
% As opposed to this, \pkg{polyglossia} always uses spelled-out (lower-cased) English language names.
-% Please refer to table~\ref{tab:bbllang} for the differing language names in both packages.
+% Please refer to table~\ref{tab:bbllang} for the differing language names in both packages.
%
% \begin{table}
% \caption{\label{tab:bbllang}Babel-polyglossia language name matching}
@@ -515,7 +653,7 @@ to track the issues and follow progress.
% \begin{minipage}[t]{1\columnwidth}
% \small\centering
% \begin{tabular}{lll}
-% \toprule
+% \toprule
% \textbf{Babel name} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\tabularnewline
% \midrule
% acadien & french & variant=acadian \\
@@ -528,20 +666,20 @@ to track the issues and follow progress.
% british & english & variant=british \\
% canadian & english & variant=canadian \\
% canadien & french & variant=canadian \\
+% classiclatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.classic}).}
+% & latin & variant=classic \\
% farsi & persian & \\
+% ecclesiasticlatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.ecclesiastic}).}
+% & latin & variant=ecclesiastic \\
% friulan & friulian & \\
% german\footnote{Due to the name conflict only available in \pkg{polyglossia} as \emph{germanb} (which is a \pkg{babel} synonym).}
% & german & spelling=old \\
% irish & gaelic & variant=irish [\emph{default}] \\
% kurmanji & kurdish & variant=kurmanji \\
-% latin.classic\footnote{Available in \pkg{polyglossia} as \emph{latinclassic} (as dots are invalid in command names).}
-% & latin & variant=classic \\
-% latin.ecclesiastic\footnote{Available in \pkg{polyglossia} as \emph{latinecclesiastic} (as dots are invalid in command names).}
-% & latin & variant=ecclesiastic \\
-% latin.medieval\footnote{Available in \pkg{polyglossia} as \emph{latinmedieval} (as dots are invalid in command names).}
-% & latin & variant=medieval \\
% lowersorbian & sorbian & variant=lower \\
% magyar & hungarian & \\
+% medievallatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.medieval}).}
+% & latin & variant=medieval \\
% naustrian & german & variant=austrian \\
% newzealand & english & variant=newzealand \\
% ngerman & german & variant=german [\emph{default}] \\
@@ -556,62 +694,247 @@ to track the issues and follow progress.
% slovene & slovenian & \\
% spanishmx & spanish & variant=mexican \\
% swissgerman & german & variant=swiss, spelling=old \\
-% uppersorbian & sorbian & variant=upper \\
+% uppersorbian & sorbian & variant=upper [\emph{default}] \\
% \bottomrule
% \end{tabular}
% \end{minipage}
%
% \end{table}
%
-% For convenience reasons, \pkg{polyglossia} also supports the use of babel names\new{v1.46} (for the few justified
+% For convenience reasons, \pkg{polyglossia} also supports the use of babel names\new{1.46} (for the few justified
% exceptions, please refer to the notes in table~\ref{tab:bbllang}).
% The babel names listed in table~\ref{tab:bbllang} can be used instead of the corresponding polyglossia
% name\slash options in \cmd\setdefaultlanguage\ and \cmd\setotherlanguage\ as well as in the \pkg{polyglossia} and
% \pkg{babel} language switching commands\slash environments documented in section~\ref{sec:langcmds} and
-% \ref{sec:babelcmds} (\eg \cmd\textaustrian\ is synonymous to \cmd{\textgerman[variant=austrian,spelling=old]}).
+% \ref{sec:babelcmds} (\eg \cmd\textaustrian\ is synonymous to ¦\textgerman[variant=austrian,spelling=old]¦).
% However, unless you have special reasons, we strongly encourage you to use the \pkg{polyglossia} names.
%
%
+% \subsection{Using IETF language tags}\label{sec:langtags}
+%
+% \pkg{Polyglossia}\new{1.47} also supports the use of language tags that conform to the IETF BCP-47
+% \emph{Best Current Practice}.\footnote{Please refer to \url{https://tools.ietf.org/html/bcp47} and
+% \url{https://en.wikipedia.org/wiki/IETF_language_tag} for details.}
+% Thus, you can use tags such as ¦en-GB¦ (for British English) or ¦de-AT-1901¦ (for Austrian German, old spelling)
+% in \cmd\setdefaultlanguage\ and \cmd\setotherlanguage\ as well as in the language switching command
+% \cmd{\textlang\marg{tag}}, the environment \cmd{\begin\{lang\}\marg{tag}} \ldots\ \cmd{\end\{lang\}} and the \pkg{babel}
+% language switching commands\slash environments documented in section~\ref{sec:babelcmds}.
+% Table~\ref{tab:BCP47-polyglossia} lists the currently supported tags.
+%
+% \bgroup\small\addfontfeatures{Numbers={Monospaced,Lining}}
+% \begin{longtable}[c]{lll}
+% \caption{\label{tab:BCP47-polyglossia}BCP47-polyglossia language name matching}\\
+% \toprule
+% \textbf{BCP-47 tag} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\\
+% \midrule
+% \endfirsthead
+% \caption[]{BCP47-polyglossia language name matching (\emph{continued})}\\
+% \toprule
+% \textbf{BCP-47 tag} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\\
+% \midrule
+% \endhead
+% aeb & arabic & locale=tunisia \\
+% af & afrikaans & \\
+% afb & arabic & locale=default \\
+% am & amharic & \\
+% apd & arabic & locale=default \\
+% ar & arabic & \\
+% ar-IQ & arabic & locale=mashriq \\
+% ar-JO & arabic & locale=mashriq \\
+% ar-LB & arabic & locale=mashriq \\
+% ar-MR & arabic & locale=mauritania \\
+% ar-PS & arabic & locale=mashriq \\
+% ar-SY & arabic & locale=mashriq \\
+% ar-YE & arabic & locale=default \\
+% arq & arabic & locale=algeria \\
+% ary & arabic & locale=morocco \\
+% arz & arabic & locale=default \\
+% ast & asturian & \\
+% ayl & arabic & locale=libya \\
+% be & belarusian & \\
+% be-tarask & belarusian & spelling=classic \\
+% bg & bulgarian & \\
+% bn & bengali & \\
+% bo & tibetan & \\
+% br & breton & \\
+% bs & bosnian & \\
+% ca & catalan & \\
+% ckb & kurdish & variant=sorani [\emph{default}] \\
+% ckb-Arab & kurdish & variant=sorani, script=Arabic [\emph{default}] \\
+% ckb-Latn & kurdish & variant=sorani, script=Latin \\
+% cop & coptic & \\
+% cy & welsh & \\
+% cz & czech & \\
+% da & danish & \\
+% de & german & \\
+% de-AT & german & variant=austrian, spelling=new \\
+% de-AT-1901 & german & variant=austrian, spelling=old \\
+% de-AT-1996 & german & variant=austrian, spelling=new \\
+% de-CH & german & variant=swiss, spelling=new \\
+% de-CH-1901 & german & variant=swiss, spelling=old \\
+% de-CH-1996 & german & variant=swiss, spelling=new \\
+% de-DE & german & variant=german, spelling=new \\
+% de-DE-1901 & german & variant=german, spelling=old \\
+% de-DE-1996 & german & variant=german, spelling=new [\emph{default}] \\
+% de-Latf & german & script=blackletter \\
+% de-Latf-AT & german & variant=austrian, spelling=new, script=blackletter \\
+% de-Latf-AT-1901 & german & variant=austrian, spelling=old, script=blackletter \\
+% de-Latf-AT-1996 & german & variant=austrian, spelling=new, script=blackletter \\
+% de-Latf-CH & german & variant=swiss, spelling=new, script=blackletter \\
+% de-Latf-CH-1901 & german & variant=swiss, spelling=old, script=blackletter \\
+% de-Latf-CH-1996 & german & variant=swiss, spelling=new, script=blackletter \\
+% de-Latf-DE & german & variant=german, spelling=new, script=blackletter \\
+% de-Latf-DE-1901 & german & variant=german, spelling=old, script=blackletter \\
+% de-Latf-DE-1996 & german & variant=german, spelling=new, script=blackletter \\
+% dsb & sorbian & variant=lower \\
+% dv & divehi & \\
+% el & greek & \\
+% el-monoton & greek & variant=monotonic [\emph{default}] \\
+% el-polyton & greek & varant=polytonic \\
+% en & english & \\
+% en-AU & english & variant=australian \\
+% en-CA & english & variant=canadian \\
+% en-GB & english & variant=british \\
+% en-NZ & english & variant=newzealand \\
+% en-US & english & variant=us [\emph{default}] \\
+% eo & esperanto & \\
+% es & spanish & \\
+% es-ES & spanish & variant=spanish [\emph{default}] \\
+% es-MX & spanish & variant=mexican \\
+% et & estonian & \\
+% eu & basque & \\
+% fa & persian & \\
+% fi & finnish & \\
+% fr & french & \\
+% fr-CA & french & variant=canadian \\
+% fr-CH & french & variant=swiss \\
+% fr-FR & french & variant=french [\emph{default}] \\
+% fur & friulian & \\
+% ga & gaelic & variant=irish [\emph{default}] \\
+% gd & gaelic & variant=scottish \\
+% gl & galician & \\
+% grc & greek & variant=ancient \\
+% he & hebrew & \\
+% hi & hindi & \\
+% hr & croatian & \\
+% hsb & sorbian & variant=upper [\emph{default}] \\
+% hu & hungarian & \\
+% hy & armenian & \\
+% ia & interlingua & \\
+% id & malay & variant=indonesian \\
+% is & icelandic & \\
+% it & italian & \\
+% ja & japanese & \\
+% ka & georgian & \\
+% km & khmer & \\
+% kmr & kurdish & variant=kurmanji \\
+% kmr-Arab & kurdish & variant=kurmanji, script=Arabic \\
+% kmr-Latn & kurdish & variant=kurmanji, script=Latin \\
+% kn & kannada & \\
+% ko & korean & \\
+% ku & kurdish & \\
+% ku-Arab & kurdish & script=Arabic \\
+% ku-Latn & kurdish & script=Latin \\
+% la & latin & \\
+% la-x-classic & latin & variant=classic \\
+% la-x-ecclesia & latin & variant=ecclesiastic \\
+% la-x-medieval & latin & variant=medieval \\
+% lo & lao & \\
+% lt & lithuanian & \\
+% lv & latvian & \\
+% mk & macedonian & \\
+% ml & malayalam & \\
+% mn & mongolian & \\
+% mr & marathi & \\
+% nb & norwegian & variant=bokmal \\
+% nko & nko & \\
+% nl & dutch & \\
+% nn & norwegian & variant=nynorsk [\emph{default}] \\
+% oc & occitan & \\
+% pl & polish & \\
+% pms & piedmontese & \\
+% pt & portuguese & \\
+% pt-BR & portuguese & variant=brazilian \\
+% pt-PT & portuguese & variant=portuguese [\emph{default}] \\
+% rm & romansh & \\
+% ro & romanian & \\
+% ru & russian & \\
+% ru-luna1918 & russian & spelling=modern [\emph{default}] \\
+% ru-petr1708 & russian & spelling=old \\
+% sa & sanskrit & \\
+% sa-Beng & sanskrit & script=Bengali \\
+% sa-Deva & sanskrit & script=Devanagari [\emph{default}] \\
+% sa-Gujr & sanskrit & script=Gujarati \\
+% sa-Knda & sanskrit & script=Kannada \\
+% sa-Mlym & sanskrit & script=Malayalam \\
+% sa-Telu & sanskrit & script=Telugu \\
+% se & sami & \\
+% sk & slovak & \\
+% sl & slovenian & \\
+% sq & albanian & \\
+% sr & serbian & \\
+% sr-Cyrl & serbian & script=Cyrillic \\
+% sr-Latn & serbian & script=Latin [\emph{default}] \\
+% sv & swedish & \\
+% syr & syriac & \\
+% ta & tamil & \\
+% te & telugu & \\
+% th & thai & \\
+% tk & turkmen & \\
+% tr & turkish & \\
+% uk & ukrainian & \\
+% ur & urdu & \\
+% vi & vietnamese & \\
+% zsm & malay & variant=malaysian [\emph{default}] \\
+% \bottomrule
+% \end{longtable}
+% \egroup
+%
% \subsection{Global options}
%
% \pkg{Polyglossia} can be loaded with the following global package options:
%
% \begin{itemize}
-% \item \TB{babelshorthands}\new{v1.1.1} globally activates \pkg{babel}
-% shorthands whenever available. Currently shorthands are implemented for
-% Afrikaans, Belarusian, Catalan, Czech, Dutch, Finnish, Georgian, German,
-% Italian, Latin, Mongolian, Russian, and Slovak. Please refer to the respective
-% language descriptions (sec.~\ref{specific}) for details.
-%
-% \item \TB{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
-% \cmd\markright. In earlier versions of \pkg{polyglossia},\new{v1.2.0} this
+% \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+% Globally activates \pkg{babel} shorthands whenever available. Currently
+% shorthands are implemented for Afrikaans, Belarusian, Catalan, Croatian,
+% Czech, Dutch, Finnish, Georgian, German, Italian, Latin, Mongolian,
+% Russian, Slovak, and Ukrainian. Please refer to the respective language descriptions
+% (sec.~\ref{specific}) for details.
+%
+% \item \xpgoption{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
+% \cmd\markright. In earlier versions of \pkg{polyglossia},\new{1.2.0} this
% option was set by default, but we now realize that it causes more problems
% than it helps, so it is now off by default. For backwards-compatibility, the
-% option \TB{nolocalmarks} which used to switch off the previous default, and
+% option \xpgoption{nolocalmarks} which used to switch off the previous default, and
% now does nothing, is still available.
%
-% \item \TB{quiet} turns off most info messages and some of the warnings issued
+% \item \xpgoption{quiet} turns off most info messages and some of the warnings issued
% by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}.
% \end{itemize}
%
+% \condbreak{5\baselineskip}
% \section{Language-switching commands}\label{languageswitching}
%
% \subsection{Recommended commands}\label{sec:langcmds}
% For each activated language the command
-% \cmd{\text⟨lang⟩[⟨options⟩]\{…\}} \DescribeMacro{\text⟨lang⟩}
+% \cmd{\text\meta{lang}\oarg{options}\marg{…}} \DescribeMacro{\text\meta{lang}}
% (as well as the synonymous \DescribeMacro{\textlang}%
-% \cmd{\textlang[⟨options⟩]\{⟨lang⟩\}\{…\}}\new{1.46})
+% \cmd{\textlang\oarg{options}\marg{lang}\marg{…}}\new{1.46})
% becomes available for short insertions of text in that language.
+%
% For example ¦\textrussian{\today}¦ and ¦\textlang{russian}{\today}¦ yield \textrussian{\today}
% The commands switch to the correct hyphenation patterns, they activate
% some extra features for the selected language (such as extra spacing before
-% punctuation in French), and they translate the date when using ¦\today¦.
-% They do not, however, translate so-called \textit{caption strings},\ie
-% ``chapter'', ``figure'' etc., to the local language (these remain in the main
+% punctuation in French), and they translate the date when using \cmd\today.
+% They do not, however, translate so-called \textit{caption strings}, \ie
+% ``chapter'', ``figure'' etc., to the local language (these remain in the currently active `outer'
% language).
%
-% The\DescribeEnv{⟨lang⟩}\ environment ¦⟨lang⟩¦, which is also available for any activated language,
-% is meant for longer passages of text. It behaves slightly different than the \cmd{\text⟨lang⟩} and
+% The\DescribeEnv{\meta{lang}}\ environment \meta{lang}, which is also available for any activated language
+% (as well as the equivalent \DescribeMacro{lang}%
+% \cmd{\begin\{lang\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{lang\}}\new{1.47}),
+% is meant for longer passages of text. It behaves slightly different than the \cmd{\text\meta{lang}} and
% \cmd\textlang\ commands: It does everything the latter do, but additionally, the caption strings
% are translated as well, and the language is also passed to auxiliary files, the table of contents
% and the lists of figures/tables.
@@ -619,7 +942,7 @@ to track the issues and follow progress.
% For instance the following allows us to quote the beginning
% of Homer’s \textit{Iliad}:
%
-% \begin{Verbatim}[formatcom=\color{myblue}]
+% \begin{Verbatim}[formatcom=\color{xpgblue}]
% \begin{quote}
% \begin{greek}[variant=ancient]
% μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος οὐλομένην, ἣ μυρί' Ἀχαιοῖς
@@ -651,17 +974,17 @@ to track the issues and follow progress.
% compiled into the \XeLaTeX\ and \LuaLaTeX\ format) are redefined, but keep a
% similar behaviour.
% \begin{itemize}
-% \item \DescribeMacro{\selectlanguage}\cmd{\selectlanguage[⟨options⟩]\{⟨lang⟩\}}
-% \item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage[⟨options⟩]\{⟨lang⟩\}\{…\}}
-% \item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}[⟨options⟩]\{⟨lang⟩\}} \dots{} \cmd{\end\{otherlanguage\}}
-% \item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}[⟨options⟩]\{⟨lang⟩\}} \dots{} \cmd{\end\{otherlanguage*\}}
+% \item \DescribeMacro{\selectlanguage}\cmd{\selectlanguage\oarg{options}\marg{lang}}
+% \item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage\oarg{options}\marg{lang}\marg{…}}
+% \item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage\}}
+% \item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage*\}}
% \end{itemize}
% ^^A
-% ¦\selectlanguage{⟨lang⟩}¦ and the ¦otherlanguage¦ environment are identical to the
-% the ¦⟨lang⟩¦ environment, except that ¦\selectlanguage{⟨lang⟩}¦
-% does not need to be explicitly closed. The command ¦\foreinlanguage{⟨lang⟩}{…}¦ and the ¦otherlanguage*¦
-% environment are identical with the use of the ¦\text⟨lang⟩¦ or ¦\textlang¦ command, with the one
-% notable exception that they do not translate the date with ¦\today¦.
+% \cmd\selectlanguage\marg{lang} and the ¦otherlanguage¦ environment are identical to the
+% the \meta{lang} environment, except that \cmd\selectlanguage\marg{lang}
+% does not need to be explicitly closed. The command \cmd\foreinlanguage\marg{lang}\marg{…} and the ¦otherlanguage*¦
+% environment are identical with the use of the \cmd\text\meta{lang} or \cmd\textlang\ command, with the one
+% notable exception that they do not translate the date with \cmd\today.
%
% Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg},
% the low-level commands for hyphenation and language switching
@@ -669,13 +992,12 @@ to track the issues and follow progress.
%
% \subsection{Other commands}
% The following commands are probably of lesser interest to the end user, but
-% ought to be mentioned here.\footnote{Note that these commands require polyglossia
-% language names; they do not support language\slash babel aliases.}
+% ought to be mentioned here.
% \begin{itemize}
-% \item \DescribeMacro{\selectbackgroundlanguage}\cmd{\selectbackgroundlanguage\{⟨lang⟩\}}:
+% \item \DescribeMacro{\selectbackgroundlanguage}\cmd{\selectbackgroundlanguage\marg{lang}}:
% this selects the global font setup and the numbering definitions for the default language.
%
-% \item \DescribeMacro{\resetdefaultlanguage}\cmd{\resetdefaultlanguage[⟨options⟩]\{⟨lang⟩\}} (experimental):
+% \item \DescribeMacro{\resetdefaultlanguage}\cmd{\resetdefaultlanguage\oarg{options}\marg{lang}} (experimental):
% completely switches the default language
% to another one in the middle of a document: \textit{this may have adverse effects}!
%
@@ -693,43 +1015,49 @@ to track the issues and follow progress.
% \subsection{Setting up alias commands}
%
% By means of the macro
-% \displaycmd{\setlanguagealias[⟨options⟩]\{⟨language⟩\}\{⟨alias⟩\}}{\setlanguagealias}\new{v1.46}
+% \displaycmd{\setlanguagealias\oarg{options}\marg{language}\marg{alias}}{\setlanguagealias}\new{1.46}
% you can define alias commands for specific language (variants). \Eg
%
% \begin{quote}
% \begin{verbatim}
-% \setlanguagealias[variant=austrian]{german}{deAT}
+% \setlanguagealias[variant=austrian]{german}{AT}
% \end{verbatim}
% \end{quote}
% ^^A
-% will define a command \cmd{\textdeAT} as well as an environment ¦{deAT}¦ which will link towards
-% the command \cmd{\textgerman[variant=austrian]} and the environment ¦{german}[variant=austrian]¦,
+% will define a command \cmd{\textAT} as well as an environment ¦{AT}¦ which will link towards
+% the command ¦\textgerman[variant=austrian]¦ and the environment ¦{german}[variant=austrian]¦,
% respectively. The aliases can also be used in the language switching commands described in
% section~\ref{sec:langcmds} and \ref{sec:babelcmds}.
% Note, though, that the usual restrictions for command names apply, so something such as
-% ¦de-AT¦ or ¦de_AT¦ will not work since ¦-¦ and ¦_¦ are not allowed in command names.
+% ¦de-AT¦ or ¦de_AT¦ will not work since ¦-¦ and ¦_¦ are not allowed in command names (the same
+% holds true for any non-ASCII character and for digits).
+%
+% For the latter case, and for the case where an alias would clash with an existing command
+% (\eg ¦\fi¦) or a \cmd{\text\meta{\ldots}} command (\eg \cmd\textit), a starred version \Cmd{\setlanguagealias*}
+% is provided which does neither define a \cmd{\text\meta{alias}} command nor an \meta{alias} environment,
+% but which will set up the alias for everything else, including \cmd{\textlang\marg{alias}}
+% and \cmd{\begin\{lang\}\marg{alias}}.
%
-% For the latter case, and for the case where an alias would clash with an existing \cmd{\text⟨...⟩}
-% command (\eg ¦\textit¦), a starred version \Cmd{\setlanguagealias*} is provided which does not define
-% a \cmd{\text⟨alias⟩} command (but which will set up the alias for everything else, including
-% \cmd{\textlang\{⟨alias⟩\}}).
+% \pkg{Polyglossia} comes with some aliases predefined, namely aliases for \pkg{babel} language names
+% (see sec.~\ref{sec:babelnames}) and for IETF BCP-47 language tags (the latter via \cmd{\setlanguagealias*};
+% see sec.~\ref{sec:langtags}).
%
% \section{Font setup}
%
% With polyglossia it is possible to associate a specific font with any script or language
% that occurs in the document. That font should always be defined as
-% ¦\⟨script⟩font¦\ or ¦\⟨language⟩font¦.
+% \cmd{\⟨script⟩font}\ or \cmd{\⟨language⟩font}.
% For instance, if the default font defined by \cmd\setmainfont\
% does not support Greek, then one can define the font used to display Greek with:\\
-% \centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,⟨…⟩]\{⟨font⟩\}}. }
+% \centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,\meta{…}]\marg{font}}. }
% Note that polyglossia will use the font defined as is, so assure to do all necessary settings
% (please refer to the \pkg{fontspec} documentation for details).
-% For instance, if ¦\arabicfont¦ is explicitly defined, then the option ¦Script=Arabic¦ should
+% For instance, if \cmd\arabicfont\ is explicitly defined, then the option ¦Script=Arabic¦ should
% be included in that definition.
%
% If a specific sans serif or monospace (`teletype') font is needed for a particular script or language,
-% it can be defined by means of \new{v1.2.0}
-% ¦\⟨script⟩fontsf¦\ or ¦\⟨language⟩fontsf¦ and ¦\⟨script⟩fonttt¦\ or ¦\⟨language⟩fonttt¦, respectively.
+% it can be defined by means of \new{1.2.0}
+% \cmd{\⟨script⟩fontsf} or \cmd{\⟨language⟩fontsf} and \cmd{\⟨script⟩fonttt} or \cmd{\⟨language⟩fonttt}, respectively.
%
% Whenever a new language is activated, \pkg{polyglossia} will first check whether
% a font has been defined for that language or – for languages in non-Latin scripts –
@@ -744,7 +1072,7 @@ to track the issues and follow progress.
%
% \subsection{Hyphenation exceptions}
%
-% \TeX\ provides the command ¦\hyphenation{⟨exceptions⟩}¦ to globally define hyphenation exceptions
+% \TeX\ provides the command \cmd\hyphenation\marg{exceptions} to globally define hyphenation exceptions
% which override the hyphenation patterns for specified words. The command takes as argument a space-separated
% list of words where hyphenation points are marked by a dash (if no dash is used, the respective word is not
% hyphenated at all):
@@ -756,8 +1084,8 @@ to track the issues and follow progress.
% \end{Verbatim}
% ^^A
% These exceptions, however, apply to all languages. In addition to this, \pkg{polyglossia} provides
-% the command\new{v1.45}
-% \displaycmd{\pghyphenation[⟨options⟩]\{⟨lang⟩\}\{⟨exceptions⟩\}}{\pghyphenation}
+% the command\new{1.45}
+% \displaycmd{\xpghyphenation\oarg{options}\marg{lang}\marg{exceptions}}{\xpghyphenation}
% which can be used to define exceptions that only apply to a specific language or language variant,
% respectively.
%
@@ -772,25 +1100,33 @@ to track the issues and follow progress.
%
% \section{Language-specific options and commands}\label{specific}
%
-% This section gives a list of all languages for which options and end-user commands are defined.
-% The default value of each option is given in italic.
-%
-% ^^A\subsection{amharic}\label{amharic}
+% This section gives a list of all languages for which options and end-user
+% commands are defined. Note the following conventions:
+% \begin{itemize}
+% \item The preset value of each option (\ie the setting that applies by default,
+% if the option is not explicitly set) is given in \xpgpresetvalue{italics}.
+% \item If an option key may be used without a value, the value that applies
+% for value-less keys is marked by a preceding \xpgdefaultvalue{asterisk}.
+% \end{itemize}
+% For instance, \texttt{babelshorthands = *true} or \texttt{\textit{false}} means that
+% \xpgvalue{babelshorthands} is \xpgvalue{false} by default in the respective language,
+% and that passing \xpgvalue{babelshorthands} (without value) is equivalent to passing
+% \xpgvalue{babelshorthands=true}.
%
-% \subsection{afrikaans}\label{afikaans}
+% \subsection{afrikaans}\label{afrikaans}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
-% if this is turned on, the following shorthands defined for fine-tuning hyphenation and
+% \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+% If this is turned on, the following shorthands defined for fine-tuning hyphenation and
% micro-typography of Afrikaans words are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦ in default \TeX).
+% in the hyphenation patterns (as opposed to \cmd\- in default \TeX).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
% hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
% \end{shorthands}
% \end{itemize}
@@ -798,23 +1134,23 @@ to track the issues and follow progress.
% \subsection{arabic}\label{arabic}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{calendar} = \textit{gregorian} or islamic (= hijri)
-% \item \TB{locale} = \textit{default},\footnote{ %
-% For Egypt, Sudan, Yemen and the Gulf states.}
-% mashriq,\footnote{ %
-% For Iraq, Syria, Jordan, Lebanon and Palestine.}
-% libya, algeria, tunisia, morocco, or mauritania.
+% \item \xpgchoicekey{calendar}{\xpgpresetvalue{gregorian} or \xpgvalue{islamic} (= \xpgvalue{hijri})}
+% \item \xpgchoicekey{locale}{\xpgpresetvalue{default}\footnote{ %
+% For Egypt, Sudan, Yemen and the Gulf states.},
+% \xpgvalue{mashriq}\footnote{ %
+% For Iraq, Syria, Jordan, Lebanon and Palestine.},
+% \xpgvalue{libya}, \xpgvalue{algeria}, \xpgvalue{tunisia}, \xpgvalue{morocco}, \xpgvalue{mauritania}}
% This setting influences the spelling of the month names for the Gregorian calendar,
% as well as the form of the numerals (unless overriden by the following option).
-% \item \TB{numerals} = \textit{mashriq} or maghrib
-% (the latter is the default when locale = algeria, tunisia or morocco)
-% \item \TB{abjadjimnotail} = \textit{false} or true. \new{v1.0.3}
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{mashriq} or \xpgvalue{maghrib}}
+% The latter is the default when \xpgvalue{locale=algeria}, \xpgvalue{tunisia}, or \xpgvalue{morocco}.
+% \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail}
% Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
% \item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
-% \item \Cmd\aemph to emphasize text with ¦\overline¦.\new{v1.2.0}
+% \item \Cmd\aemph to emphasize text with \cmd\overline.\new{1.2.0}
% ¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}.
% This command is also available for Farsi, Urdu, etc.
% \end{itemize}
@@ -822,19 +1158,19 @@ to track the issues and follow progress.
% \subsection{armenian}\label{armenian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant}\new{v1.45} = eastern or \textit{western}
-% \item \TB{numerals}\new{v1.45} = armenian or \textit{arabic}
+% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{eastern} or \xpgpresetvalue{western}}
+% \item \xpgchoicekey[1.45]{numerals}{\xpgvalue{armenian} or \xpgpresetvalue{arabic}}
% \end{itemize}
%
-% \subsection[belarusian]{belarusian\new{v1.46}}\label{belarusian}
+% \subsection[belarusian]{belarusian\new{1.46}}\label{belarusian}
%
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true.
+% \item \xpgboolkeyfalse{babelshorthands}
% If this is turned on, the following shorthands are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
+% in the hyphenation patterns (as opposed to \cmd\-).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
@@ -848,67 +1184,123 @@ to track the issues and follow progress.
% \item[¦"<¦] for French left double quotes (looks like <<).
% \item[¦">¦] for French right double quotes (looks like >>).
% \end{shorthands}
-% \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
-% alphanumerical numbering.
-% \item \TB{spelling} = \textit{modern} or classic (=~tarask). With ¦spelling=classic¦, captions and dates
-% adhere to the Taraškievica (or Belarusian classical) orthography rather than the standard orthography.
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+% \begin{itemize}
+% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+% It supports numbers up to 999\,999.
+% \end{itemize}
+% \item \xpgchoicekey{spelling}{\xpgpresetvalue{modern} or \xpgvalue{classic} (= \xpgvalue{tarask})}
+% With ¦spelling=classic¦, captions and dates adhere to the Taraškievica (or
+% Belarusian classical) orthography rather than the standard orthography.
% \end{itemize}
% ^^A
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
-% environments such as ¦enumerate¦. The command takes a counter as argument,
-% \eg ¦\textbelarusian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
-% \item \Cmd\asbuk: same in lowercase
+% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+% It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+% The command takes a counter as argument, \eg ¦\textbelarusian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
+% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+% numbers up to 999\,999.\\
+% \Eg ¦\textbelarusian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
% \end{itemize}
%
-% \subsection[bengali]{bengali\new{v1.2.0}}\label{bengali}
+% \subsection[bengali]{bengali\new{1.2.0}}\label{bengali}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = Western, Bengali or \textit{Devanagari}
-% \item \TB{changecounternumbering} = true or \textit{false} (use specified
-% numerals for headings and page numbers)
+% \item \xpgchoicekey{numerals}{\xpgvalue{Western}, \xpgvalue{Bengali}, or \xpgpresetvalue{Devanagari}}
+% \item \xpgboolkeyfalse{changecounternumbering}
+% Use specified numerals for headings and page numbers.
% \end{itemize}
%
% \subsection{catalan}\label{catalan}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
-% Activates the shorthands \texttt{"l} and \texttt{"L} to type geminated l’s.
+% \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+% Activates the shorthands \texttt{"l} and \texttt{"L} to type geminated l or L.
% \end{itemize}
%
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd{\l.l} and \Cmd{\L.L}\new{v1.1.1} can be used to type a geminated l, as in \textit{co\l.laborar},
+% \item \Cmd{\l.l} and \Cmd{\L.L}\new{1.1.1} can be used to type a geminated l, as in \textit{co\l.laborar},
% similar to \pkg{babel} (the glyph U+00B7 MIDDLE DOT is used as a geminating sign).
% \end{itemize}
%
+% \subsection{croatian}\label{croatian}
+% \paragraph*{Options:}
+% \begin{itemize}
+% \item \xpgboolkeyfalse[1.47]{babelshorthands}
+% If this is turned on, the following shorthands for fine-tuning hyphenation and micro-typography
+% of Croatian words are activated.
+% \begin{shorthands}
+% \item[¦"|¦] disables a ligature at this position.
+% \item[¦"=¦] for an explicit hyphen with a breakpoint, allowing for hyphenation at the
+% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
+% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+% cases where the hyphen should stick at the following syllable.
+% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
+% in the hyphenation patterns (as opposed to \cmd\-).
+% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation
+% at the breakpoints preset in the hyphenation patterns is still allowed.
+% \end{shorthands}
+% Furthermore, the following shorthands generate easy access to Croatian digraphs (ligatures):
+% \begin{shorthands}
+% \item[¦"dz¦] Generates the ligature \charifavailable{01C6}{dž}\ if the font provides it. If not, the
+% two characters are output separately. Also available for ¦"Dz¦ (\charifavailable{01C5}{Dž})
+% and ¦"DZ¦ (\charifavailable{01C4}{DŽ}).
+% \item[¦"lj¦] Generates the ligature \charifavailable{01C9}{lj}\ if the font provides it. If not, the
+% two characters are output separately. Also available for ¦"Lj¦ (\charifavailable{01C8}{Lj})
+% and ¦"LJ¦ (\charifavailable{01C7}{LJ}).
+% \item[¦"nj¦] Generates the ligature \charifavailable{01CC}{nj}\ if the font provides it. If not, the
+% two characters are output separately. Also available for ¦"Nj¦ (\charifavailable{01CB}{Nj})
+% and ¦"NJ¦ (\charifavailable{01CA}{NJ}).
+% \end{shorthands}
+%
+% Finally, there are also four shorthands for quotation marks:
+% \begin{shorthands}
+% \item[¦"`¦] for Croatian left double quotes („).
+% \item[¦"'¦] for Croatian right double quotes (”).
+% \item[¦">¦] for Croatian left guillemets (»).
+% \item[¦"<¦] for Croatian right guillemets («).
+% \end{shorthands}
+% \item \xpgboolkeyfalse[1.47]{disableligatures}
+% If this is \xpgvalue{true}, all Croatian ligatures (for digraphs such as
+% \charifavailable{01C6}{dž}) will be replaced by single characters. This can
+% be useful if the ligatures on your font are broken (if the font does not
+% have them, they are automatically replaced).
+% \end{itemize}
+%
% \subsection{czech}\label{czech}
%
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45}
-% if this is turned on, the following shorthands for Czech are activated:
+% \item \xpgboolkeyfalse[1.45]{babelshorthands}
+% If this is turned on, the following shorthands for Czech are activated:
% \begin{shorthands}
% \item[¦"=¦] for an explicit hyphen sign which is repeated at the beginning
% of the next line when hyphenated, as common in Czech typesetting
% (only needed with ¦splithyphens=false¦).
-% \item[¦"‘¦] for Czech left double quotes (looks like ,,).
-% \item[¦"’¦] for Czech right double quotes (looks like “).
-% \item[¦">¦] for Czech left double guillemets (looks like >>).
-% \item[¦"<¦] for Czech right double guillemets (looks like <<).
+% \item[¦"‘¦] for Czech left double quotes („).
+% \item[¦"’¦] for Czech right double quotes (“).
+% \item[¦">¦] for Czech left double guillemets (»).
+% \item[¦"<¦] for Czech right double guillemets («).
% \end{shorthands}
-% \item \TB{splithyphens} = false or \textit{true}.\new{v1.45}
+% \item \xpgboolkeytrue[1.45]{splithyphens}
% According to Czech typesetting conventions, if a word with a hard hyphen (such as \emph{je-li})
% is hyphenated at this hyphen, a second hyphenation character is to be inserted at the beginning
% of the line that follows the hyphenation (\emph{je-/-li}).
-% By default, this is done automatically\new{v1.46} (if you are using \LuaTeX, the \pkg{luavlna} package is
+% By default, this is done automatically\new{1.46} (if you are using \LuaTeX, the \pkg{luavlna} package is
% loaded to achieve this).
% Set this option to ¦false¦ to disable the feature.
-% \item \TB{vlna} = false or \textit{true}. \new{v1.45}
+% \item \xpgboolkeytrue[1.45]{vlna}
% According to Czech typesetting conventions, single-letter words (non-syllable prepositions)
% must not occur at line ends.
-% \pkg{Polyglossia} takes care of this automatically by default\new{v1.46} (if you are using \LuaTeX, the
+% \pkg{Polyglossia} takes care of this automatically by default\new{1.46} (if you are using \LuaTeX, the
% \pkg{luavlna} package is loaded to achieve this).
% Set this option to ¦false¦ to disable the feature.
% \end{itemize}
@@ -916,17 +1308,17 @@ to track the issues and follow progress.
% \subsection{dutch}\label{dutch}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
-% if this is turned on, the following shorthands defined for fine-tuning hyphenation and
+% \item \xpgboolkeyfalse[1.1.1]{babelshorthands}
+% If this is turned on, the following shorthands defined for fine-tuning hyphenation and
% micro-typography of Dutch words are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦ in default \TeX).
+% in the hyphenation patterns (as opposed to \cmd\- in default \TeX).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
% hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
% \end{shorthands}
% In addition, the macro \Cmd\- is redefined to allow hyphens in the rest of the word (equivalent to ¦"-¦).
@@ -935,9 +1327,10 @@ to track the issues and follow progress.
% \subsection{english}\label{english}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = \textit{american} (= us), usmax (same as ‘american’ but with additional hyphenation patterns),
-% british (= uk), australian, canadian\new{v1.45} or newzealand
-% \item \TB{ordinalmonthday} = true/\textit{false} (true by default only when variant = british)
+% \item \xpgchoicekey{variant}{\xpgpresetvalue{american} (= \xpgvalue{us}), \xpgvalue{usmax} (same as \xpgvalue{american} but with additional hyphenation patterns),
+% \xpgvalue{british} (= \xpgvalue{uk}), \xpgvalue{australian}, \xpgvalue{canadian}\new{1.45}, or \xpgvalue{newzealand}}
+% \item \xpgboolkeyfalse{ordinalmonthday}
+% The default value is true for \xpgvalue{variant=british}.
% \end{itemize}
%
% \subsection{esperanto}\label{esperanto}
@@ -951,17 +1344,17 @@ to track the issues and follow progress.
% \subsection{finnish}\label{finnish}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45}
-% if this is turned on, the following shorthands for fine-tuning hyphenation and micro-typography
-% of Finnish words are activated:
+% \item \xpgboolkeyfalse[1.45]{babelshorthands}
+% If this is turned on, the following shorthands for fine-tuning hyphenation
+% and micro-typography of Finnish words are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
+% in the hyphenation patterns (as opposed to \cmd\-).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
% hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
% \end{shorthands}
% \end{itemize}
@@ -969,90 +1362,115 @@ to track the issues and follow progress.
% \subsection{french}\label{french}
% \paragraph*{Options:}
% \begin{itemize}
-% \item\TB{variant} = \textit{french} or canadian (=~acadian).\new{v1.45}
-% Currently, the three variants do not differ; they are supported for compatibility with \pkg{babel} (where they do not differ either).
-% \item \TB{autospacing} = \textit{true} or false. One of the most distinct features of French typography is the addition
-% of extra spacing around punctuation and quotation marks (guillemets). By default, polyglossia adds these spaces automatically, so you don't need
-% to enter them. This options allows you to switch this feature off globally.
-% \item \TB{thincolonspace}\new{v1.46} = true or \textit{false}. Normally, a
-% full (non-breaking) interword space is inserted before a colon. Use this
-% option if you prefer a thinner space as used before \texttt{;}, \texttt{!},
-% and \texttt{?}.
-% \item \TB{autospaceguillemets}\footnote{Up to version 1.44, the option was
-% called \textit{automaticspacesaroundguillemets}. For backards compatibility
-% reasons, the more verbose old option is still supported.} = \textit{true}
-% or false. If you only want to disable the automatic addition of spacing
-% after opening and before closing guillemets (and not at punctuation), set
-% this to \textit{false}. Note that the more general option
-% \textit{autospacing} overrides this.
-% \item \TB{autospacetypewriter}\footnote{Babel's syntax \textit{OriginalTypewriter} is also supported.}\new{1.45} = true or \textit{false} (default value = true). By default, automatic spacing is disabled in typewriter font. If this is enabled, spacing in typewriter context is the same as with roman and sans serif font, depending on the \textit{autospacing} and \textit{autospaceguillemets} settings (note that this was the default up to v.~1.44).
-% \item \TB{frenchfootnote} = true or \textit{false} (default value = true). If \textit{true}, footnotes start with a non-superscripted number followed by a dot, as common in French typography. Note that this might interfere with the specific footnote handling of classes or packages.
-% Also note that this option is only functional (by design) if French is the main language.
-% \item \TB{frenchitemlabels}\new{v.1.46} = true or \textit{false} (default value = true). If \textit{true}, itemize item labels use em-dashes throughout,
-% as common in French typography.
-% Note that this option is only functional (by design) if French is the main language. Also, it might interfere with list packages such as \pkg{enumitem}.
-% \item \TB{itemlabels}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of all levels.
-% \item \TB{itemlabeli}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the first level.
-% \item \TB{itemlabelii}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the second level.
-% \item \TB{itemlabeliii}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the third level.
-% \item \TB{itemlabeliv}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the fourth level.
+% \item \xpgchoicekey{variant}{\xpgpresetvalue{french} or \xpgvalue{canadian} (=~\xpgvalue{acadian})\new{1.45}, \xpgvalue{swiss}\new{1.47}}
+% Currently, the only difference between the four variants is that \xpgvalue{swiss}
+% uses \xpgvalue{thincolonspace=true} by default since this conforms to the Swiss
+% conventions.
+% \item \xpgboolkeytrue{autospacing}
+% One of the most distinct features of French typography is the addition of
+% extra spacing around punctuation and quotation marks (guillemets). By
+% default, polyglossia adds these spaces automatically, so you don't need
+% to enter them. This options allows you to switch this feature off
+% globally.
+% \item \xpgboolkeyfalse[1.46]{thincolonspace}
+% With \xpgvalue{variant=swiss}, the default value is \xpgvalue{true}. If \xpgvalue{false}, a full
+% (non-breaking) interword space is inserted before a colon. If \xpgvalue{true}, a
+% thinner space -- as before \texttt{;}, \texttt{!}, and \texttt{?} -- is
+% used. Note that this option must be set after the ¦variant¦ option.
+% \item \xpgboolkeytrue{autospaceguillemets}[Up to version 1.44, the option was
+% called \xpgvalue{automaticspacesaroundguillemets}. For backwards compatibility
+% reasons, the more verbose old option is still supported.]
+% If you only want to disable the automatic addition of spacing after
+% opening and before closing guillemets (and not at punctuation), set this
+% to \textit{false}. Note that the more general option \textit{autospacing}
+% overrides this.
+% \item \xpgboolkeyfalse[1.45]{autospacetypewriter}[Babel's syntax \xpgvalue{OriginalTypewriter}
+% is also supported.]
+% By default, automatic spacing is disabled in typewriter font. If this is
+% enabled, spacing in typewriter context is the same as with roman and sans
+% serif font, depending on the \xpgvalue{autospacing} and
+% \xpgvalue{autospaceguillemets} settings (note that this was the default up
+% to v.~1.44).
+% \item \xpgboolkeyfalse{frenchfootnote}
+% If \xpgvalue{true}, footnotes start with a non-superscripted number
+% followed by a dot, as common in French typography. Note that this might
+% interfere with the specific footnote handling of classes or packages.
+% Also note that this option is only functional (by design) if French is
+% the main language.
+% \item \xpgboolkeyfalse[1.46]{frenchitemlabels}
+% If \textit{true}, itemize item labels use em-dashes throughout, as common
+% in French typography. Note that this option is only functional (by
+% design) if French is the main language. Also, it might interfere with
+% list packages such as \pkg{enumitem}.
+% \item \xpgcodekey[1.46]{itemlabels}¦\textemdash¦
+% If \emph{frenchitemlabels} is true, you can customize here the used item
+% label of all levels.
+% \item \xpgcodekey[1.46]{itemlabeli}¦\textemdash¦
+% If \emph{frenchitemlabels} is true, you can customize here the used item
+% label of the first level.
+% \item \xpgcodekey[1.46]{itemlabelii}¦\textemdash¦
+% If \emph{frenchitemlabels} is true, you can customize here the used item
+% label of the second level.
+% \item \xpgcodekey[1.46]{itemlabeliii}¦\textemdash¦
+% If \emph{frenchitemlabels} is true, you can customize here the used item
+% label of the third level.
+% \item \xpgcodekey[1.46]{itemlabeliv}¦\textemdash¦
+% If \emph{frenchitemlabels} is true, you can customize here the used item
+% label of the fourth level.
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\NoAutoSpacing\new{v1.45} disables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\NoAutoSpacing foo:bar}¦
-% \item \Cmd\AutoSpacing\new{v1.45} enables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\AutoSpacing regarde!}¦
+% \item \Cmd\NoAutoSpacing\new{1.45} disables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\NoAutoSpacing foo:bar}¦
+% \item \Cmd\AutoSpacing\new{1.45} enables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\AutoSpacing regarde!}¦
% \end{itemize}
%
-% \subsection[gaelic]{gaelic\new{v1.45}}\label{gaelic}
+% \subsection[gaelic]{gaelic\new{1.45}}\label{gaelic}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = \textit{irish} or scottish
+% \item \xpgchoicekey{variant}{\xpgpresetvalue{irish} or \xpgvalue{scottish}}
% \end{itemize}
%
-% \subsection[georgian]{georgian\new{v1.46}}\label{georgian}
+% \subsection[georgian]{georgian\new{1.46}}\label{georgian}
%
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true.
-% If this is turned on, the following shorthands are activated:
-% \begin{shorthands}
-% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
-% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
-% cases where the hyphen should stick at the following syllable.
-% \item[¦"|¦] disables a ligature at this position.
-% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"---¦] Cyrillic emdash in plain text.
-% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
-% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
-% \item[¦",¦] thinspace for initials with a breakpoint in following surname.
-% \item[¦"‘¦] for German left double quotes (looks like ,,).
-% \item[¦"’¦] for German right double quotes (looks like “).
-% \item[¦"<¦] for French left double quotes (looks like <<).
-% \item[¦">¦] for French right double quotes (looks like >>).
-% \end{shorthands}
-% \item \TB{numerals} = \textit{arabic} or georgian. Uses either Arabic numerals or Georgian
-% alphanumerical numbering.
-% \item \TB{oldmonthnames} = \textit{true} or false (default: false). Uses traditional Georgian
-% month names.
+% \item \xpgboolkeyfalse{babelshorthands}
+% If this is turned on, the following shorthands are activated:
+% \begin{shorthands}
+% \item[¦"-¦] adds a hyphenation point that does still allow for
+% hyphenation at the points preset in the hyphenation patterns (as opposed
+% to \cmd\-).
+% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+% cases where the hyphen should stick at the following syllable.
+% \item[¦"|¦] disables a ligature at this position.
+% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
+% \item[¦"---¦] Cyrillic emdash in plain text.
+% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
+% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
+% \item[¦",¦] thinspace for initials with a breakpoint in following surname.
+% \item[¦"‘¦] for German left double quotes (looks like ,,).
+% \item[¦"’¦] for German right double quotes (looks like “).
+% \item[¦"<¦] for French left double quotes (looks like <<).
+% \item[¦">¦] for French right double quotes (looks like >>).
+% \end{shorthands}
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic} or \xpgvalue{georgian}}
+% Uses either Arabic numerals or Georgian alphanumerical numbering.
+% \item \xpgboolkeyfalse{oldmonthnames}
+% Uses traditional Georgian month names.
% \end{itemize}
%
% \subsection{german}\label{german}
% \paragraph*{Options:}
% \begin{itemize}
-% \item\TB{variant} = \textit{german}, austrian or swiss.\new{v1.33.4}
-% Setting variant=austrian or variant=swiss uses some lexical variants.
-% With spelling=old, variant=swiss furthermore loads specific hyphenation
+% \item \xpgchoicekey{variant}{\xpgpresetvalue{german}, austrian, or swiss\new{1.33.4}}
+% Setting \xpgvalue{variant=austrian} or \xpgvalue{variant=swiss} uses some lexical variants.
+% With \xpgvalue{spelling=old}, \xpgvalue{variant=swiss} furthermore loads specific hyphenation
% patterns.
-% \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901):
-% indicates whether hyphenation patterns for traditional (1901) or reformed
+% \item \xpgchoicekey{spelling}{\xpgpresetvalue{new} (= \xpgvalue{1996}) or \xpgvalue{old} (= \xpgvalue{1901})}
+% Indicates whether hyphenation patterns for traditional (1901) or reformed
% (1996) orthography should be used. The latter is the default.
-% \item \TB{latesthyphen} = \textit{false} or true: if this option is set to true,
-% the latest (experimental) hyphenation patterns ‘(n)german-x-latest’
-% will be loaded instead of ‘german’ or ‘ngerman’. NB: This is based on
-% the file \texttt{language.dat} that comes with \TeX Live 2008 and later.
-% \item\TB{babelshorthands} = \textit{false} or true: \new{v1.0.3}
-% if this is turned on, all shorthands defined in \pkg{babel}
+% \item \xpgboolkeyfalse[1.0.3]{babelshorthands}
+% If this is turned on, all shorthands defined in \pkg{babel}
% for fine-tuning hyphenation and micro-typography of German words are activated.
% \begin{shorthands}
% \item[¦"ck¦] for ¦ck¦ to be hyphenated as ¦k-k¦ (1901 spelling).
@@ -1062,12 +1480,12 @@ to track the issues and follow progress.
% \item[¦"=¦] for an explicit hyphen with a breakpoint, allowing for hyphenation at the
% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
-% cases where the hyphen should stick at the following syllable,\eg ¦bergauf und "~ab¦.
+% cases where the hyphen should stick at the following syllable, \eg ¦bergauf und "~ab¦.
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
-% \item[¦""¦] allows for a line break at this position (without hyphenation sign);
+% in the hyphenation patterns (as opposed to \cmd\-).
+% \item[¦""¦] allows for a line break at this position (without hyphenation sign);
% \eg ¦(pseudo"~)""wissenschaftlich¦.
-% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, hyphenation at the breakpoints
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation at the breakpoints
% preset in the hyphenation patterns is still allowed.
% \end{shorthands}
%
@@ -1078,7 +1496,7 @@ to track the issues and follow progress.
% \item[¦"<¦] for French left double quotes («)
% \item[¦">¦] for French right double quotes (»).
% \end{shorthands}
-% \item\TB{script} = \textit{latin} or blackletter\new{v1.46} (=~fraktur\new{v1.2.0}).
+% \item \xpgchoicekey[1.2.0]{script}{\xpgpresetvalue{latin} or \xpgvalue{blackletter}\new{1.46} (= \xpgvalue{fraktur})}
% Setting ¦script=blackletter¦ adapts the captions for typesetting German in blackletter type (using the long s (ſ)
% where appropriate).
% \end{itemize}
@@ -1086,9 +1504,9 @@ to track the issues and follow progress.
% \subsection{greek}\label{greek}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = \textit{monotonic} (= mono), polytonic (= poly), or ancient
-% \item \TB{numerals} = \textit{greek} or arabic
-% \item \TB{attic} = \textit{false}/true
+% \item \xpgchoicekey{variant}{\xpgpresetvalue{monotonic} (= \xpgvalue{mono}), \xpgvalue{polytonic} (= \xpgvalue{poly}), or \xpgvalue{ancient}}
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{greek} or \xpgvalue{arabic}}
+% \item \xpgboolkeyfalse{attic}
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
@@ -1103,10 +1521,12 @@ to track the issues and follow progress.
% \subsection{hebrew}\label{hebrew}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = hebrew or \textit{arabic}
-% \item \TB{calendar} = hebrew or \textit{gregorian}
-% \item \TB{marcheshvan} = true or \textit{false} (default value = true). If true, the second month of the civil year will be output as \texthebrew{מרחשון} (Marcheshvan)
-% rather than \texthebrew{חשון} (Heshvan), which is the default.
+% \item \xpgchoicekey{numerals}{\xpgvalue{hebrew} or \xpgpresetvalue{arabic}}
+% \item \xpgchoicekey{calendar}{\xpgvalue{hebrew} or \xpgpresetvalue{gregorian}}
+% \item \xpgboolkeyfalse{marcheshvan}
+% If \xpgvalue{true}, the second month of the civil year will be output as
+% \texthebrew{מרחשון} (Marcheshvan) rather than \texthebrew{חשון} (Heshvan),
+% which is the default.
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
@@ -1114,17 +1534,17 @@ to track the issues and follow progress.
% \item \Cmd\aemph (see section \ref{arabic}).
% \end{itemize}
%
-% \subsection[hindi]{hindi\new{v1.2.0}}\label{hindi}
+% \subsection[hindi]{hindi\new{1.2.0}}\label{hindi}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = Western or \textit{Devanagari}
+% \item \xpgchoicekey{numerals}{\xpgvalue{Western} or \xpgpresetvalue{Devanagari}}
% \end{itemize}
%
% \subsection{hungarian}\label{hungarian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{swapstrings} = \textit{all}, captions, headings, headers, hheaders or none\new{v1.46}
-%
+% \item \xpgchoicekey[1.46]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}},
+% \xpgvalue{captions}, \xpgvalue{headings}, \xpgvalue{headers}, \xpgvalue{hheaders}, or \xpgvalue{none}}
% In Hungarian, some caption strings need to be in a different order than in other languages
% (\eg \emph{1. fejezet} instead of \emph{Chapter 1}). By default, \pkg{polyglossia} tries hard to
% provide the correct order for different classes and packages (standard classes, \pkg{KOMA-script},
@@ -1151,41 +1571,66 @@ to track the issues and follow progress.
% \subsection{italian}\label{italian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.2.0cc}% TODO: check version
+% \item \xpgboolkeyfalse[1.2.0cc]{babelshorthands}% TODO: check version
% Activates the ¦"¦ character as a switch to perform etymological
% hyphenation when followed by a letter. Furthermore, the following shorthands are activated:
% \begin{shorthands}
% \item[¦""¦] double raised open quotes (the Italian keyboard misses the backtick).
% \item[¦"<¦] open guillemet (looks like <<).
% \item[¦">¦] closing guillemet (looks like >>).
-% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦,
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash,
% hyphenation at the breakpoints preset in the hyphenation patterns is still allowed.
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
+% in the hyphenation patterns (as opposed to \cmd\-).
% \end{shorthands}
% \end{itemize}
%
-% \subsection[korean]{korean\new{v1.40.0}}\label{korean}
+% \subsection[korean]{korean\new{1.40.0}}\label{korean}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = \textit{plain}, classic or modern:
-% for spacing before/after CJK punctuations.
-% `classic' is suitable for text with no interword spaces,
-% `modern' for text with interword spaces.
-% \item \TB{captions} = \textit{hangul} or hanja
+% \item \xpgchoicekey{variant}{\xpgpresetvalue{plain}, \xpgvalue{classic}, or \xpgvalue{modern}}
+% These variants control spacing before/after CJK punctuations.
+% \begin{itemize}
+% \item ¦plain¦: Do nothing
+% \item ¦classic¦: Suitable for text with no interword spaces.
+% This option forces CJK punctuations to half-width, and
+% inserts half-width glue around them.
+% \item ¦modern¦: Suitable for text with interword spaces.
+% This option forces CJK punctuations to half-width, and
+% inserts small (half of interword space) glue around them.
+% \end{itemize}
+% \item \xpgchoicekey{captions}{\xpgpresetvalue{hangul} or \xpgvalue{hanja}}
+% \item \xpgchoicekey[1.47]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}},
+% \xpgvalue{headers}, \xpgvalue{headings}, or \xpgvalue{none}}
+% With this option, Korean-style part and chapter headings, and
+% running headers are available.
+% It is similar to Hungarian (see \ref{hungarian}) except that
+% figure and table captions are not touched.
+% \begin{itemize}
+% \item ¦all¦: Redefine part and chapter headings, and running headers
+% (=~default setting)
+% \item ¦headings¦: Redefine part and chapter headings only
+% \item ¦headers¦: Redefine running headers only
+% \item ¦none¦: Do not redefine anything
+% \end{itemize}
% \end{itemize}
%
-% \subsection[kurdish]{kurdish\new{v1.45}}\label{kurdish}
+% \subsection[kurdish]{kurdish\new{1.45}}\label{kurdish}
%
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = kurmanji or \textit{sorani}
-% \item \TB{script} = Arabic or Latin. Defaults are ¦Arabic¦ for Sorani and ¦Latin¦ for Kurmanji.
-% \item \TB{numerals} = western or eastern. Defaults are ¦western¦ for Latin and ¦eastern¦ for Arabic script, depending on the selection above.
-% \item \TB{abjadjimnotail} = \textit{false} or true.
-% Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
-% ^^A \item \TB{locale} (not yet implemented)
-% ^^A \item \TB{calendar} (not yet implemented)
+% \item \xpgchoicekey{variant}{\xpgvalue{kurmanji} or \xpgpresetvalue{sorani}}
+% \item \xpgchoicekey{script}{\xpgvalue{Arabic} or \xpgvalue{Latin}}
+% Defaults are \xpgvalue{Arabic} for Sorani and \xpgvalue{Latin} for Kurmanji.
+% \item \xpgchoicekey{numerals}{\xpgvalue{western} or \xpgvalue{eastern}}
+% Defaults are \xpgvalue{western} for Latin and \xpgvalue{eastern} for Arabic script, depending
+% on the selection above.
+% \item \xpgboolkeyfalse{abjadjimnotail}
+% Set this to true if you want the \textit{abjad} form of the number three to
+% be \textarabic{ج‍} – as in the manuscript tradition – instead of the
+% modern usage \textarabic{ج}.
+% ^^A \item \xpgchoicekey{locale}{} (not yet implemented)
+% ^^A \item \xpgchoicekey{calendar}{} (not yet implemented)
% \end{itemize}
% \condbreak{2\baselineskip}
% \paragraph*{Commands:}
@@ -1196,34 +1641,33 @@ to track the issues and follow progress.
% \item \Cmd\aemph (see section \ref{arabic})
% \end{itemize}
%
-% \subsection[lao]{lao\new{v1.2.0}}\label{lao}
+% \subsection[lao]{lao\new{1.2.0}}\label{lao}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = lao or \textit{arabic}
+% \item \xpgchoicekey{numerals}{\xpgvalue{lao} or \xpgpresetvalue{arabic}}
% \end{itemize}
%
% \subsection{latin}\label{latin}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = classic, medieval, \emph{modern}, or ecclesiastic\new{v.1.46}
-%
-% These variants refer to different spelling conventions. The ¦classic¦
-% and the ¦medieval¦ variant do not use the letters \emph{U} and
+% \item \xpgchoicekey{variant}{\xpgvalue{classic}, \xpgvalue{medieval}, \xpgpresetvalue{modern}, or \xpgvalue{ecclesiastic}\new{1.46}}
+% These variants refer to different spelling conventions. The \xpgvalue{classic}
+% and the \xpgvalue{medieval} variant do not use the letters \emph{U} and
% \emph{v}, but only \emph{V} and \emph{u}. This concerns predefined terms like
% month names as well as the behaviour of the \cmd\MakeUppercase\ and the
% \cmd\MakeLowercase\ command. The ¦medieval¦ and the
% ¦ecclesiastic¦ variant use the ligatures \emph{\ae} and \emph{\oe}.
% See table \ref{tab:latin-spelling} for examples.
%
-% Furthermore, the \texttt{ecclesiastic} variant takes care for a punctuation
+% Furthermore, the \xpgvalue{ecclesiastic} variant takes care for a punctuation
% spacing similar to French, but with smaller spaces, as provided for
% PDF\TeX\ by the \pkg{ecclesiastic} package.
% \begin{table}
% \centering
% \caption{\label{tab:latin-spelling}Spelling differences between the Latin
% language variants.\newline The capitalization of month names and the use of
-% \emph{i/j} may be affected by the \texttt{capitalizemonth} and the
-% \texttt{usej} option.}
+% \emph{i/j} may be affected by the \xpgvalue{capitalizemonth} and the
+% \xpgvalue{usej} option.}
% \begin{tabular}{llll}
% \toprule
% \textbf{classic} & \textbf{medieval} & \textbf{modern} & \textbf{ecclesiastic} \\
@@ -1236,8 +1680,7 @@ to track the issues and follow progress.
% \bottomrule
% \end{tabular}
% \end{table}
-% \item \TB{hyphenation}\new{v.1.46} = classic, modern, or liturgical
-%
+% \item \xpgchoicekey[1.46]{hyphenation}{\xpgvalue{classic}, \xpgvalue{modern}, or \xpgvalue{liturgical}}
% There are three different sets of hyphenation patterns for Latin. Separate
% documention for them is available on the
% Internet.\footnote{\url{https://github.com/gregorio-project/hyphen-la/blob/master/doc/README.md\#hyphenation-styles}}
@@ -1246,7 +1689,7 @@ to track the issues and follow progress.
% ¦hyphenation¦ option if the default style does not fit your needs.
% Note that the liturgical hyphenation patterns are the default of none of the
% language variants. To use them, you have to say
-% ¦hyphenation=liturgical¦ in any case.
+% \xpgvalue{hyphenation=liturgical} in any case.
% \begin{table}
% \caption{\label{tab:latin-hyphenation}Latin default hyphenation styles}
% \centering
@@ -1261,8 +1704,7 @@ to track the issues and follow progress.
% \bottomrule
% \end{tabular}
% \end{table}
-% \item \TB{ecclesiasticfootnotes}\new{v.1.46} = true or \emph{false}
-%
+% \item \xpgboolkeyfalse[1.46]{ecclesiasticfootnotes}
% Use footnotes as provided by the \pkg{ecclesiastic} package, which typesets
% footnotes with ordinary instead of superior numbers and without indentation.
% As many ecclesiastic documents and liturgical books use footnotes that are
@@ -1271,24 +1713,21 @@ to track the issues and follow progress.
%
% Note that this option is only possible if Latin is the main language of your
% document.
-% \item \TB{usej}\new{v.1.46} = true or \emph{false}
-%
+% \item \xpgboolkeyfalse[1.46]{usej}
% Use \emph{J/j} in predefined terms. The letter \emph{j} is not of ancient
% origin. In early modern times, it was used to distinguish the consonantic
% \emph{i} from the vocalic~\emph{i}. Nowadays, the use of \emph{j} has
% disappeared from most Latin publications. So ¦false¦ is the default
% value for all four language variants. Use this option if you prefer
% \emph{Januarii} and \emph{Maji} to \emph{Ianuarii} and \emph{Maii}.
-% \item \TB{capitalizemonth}\new{v.1.46} = true or false
-%
+% \item \xpgboolkey[1.46]{capitalizemonth}
% Capitalize the month name when printing dates (using the \cmd\today\
% command). Traditionally, month names are capitalized. However, in recent
% liturgical books they are lowercase. So ¦true¦ is the default value for
% the variants ¦classic¦, ¦medieval¦, and ¦modern¦,
% whereas ¦false¦ is the default value for the ¦ecclesiastic¦
% variant.
-% \item \TB{babelshorthands} = true or \emph{false}
-%
+% \item \xpgboolkeyfalse{babelshorthands}
% Enable the following shorthands inherited from \pkg{babel-latin} and the
% \pkg{ecclesiastic} package.
% \begin{shorthands}
@@ -1314,14 +1753,12 @@ to track the issues and follow progress.
% \item[¦'Ae¦] for Ǽ (AE ligature with acute), also available for \'Œ
% \item[¦'AE¦] for Ǽ (AE ligature with acute), also available for \'Œ
% \end{shorthands}
-% \item \TB{prosodicshorthands}\new{v.1.46} = true or \emph{false}
-%
+% \item \xpgboolkeyfalse[1.46]{prosodicshorthands}
% Enable shorthands for prosodic marks (macrons and breves) very similiar to
% those provided by \pkg{babel-latin} using the ¦withprosodicmarks¦
% modifier.
-%
% Note that the active ¦=¦ character used for macrons will cause problems with
-% commands using \texttt{key=value} interfaces, \eg
+% commands using \texttt{key=value} interfaces, such as the command
% ¦\includegraphics[scale=2]{...}¦. Use \cmd{\shorthandoff\{=\}} before
% such commands (and \cmd{\shorthandon\{=\}} thereafter) within every
% environment with prosodic shorthands enabled.
@@ -1354,20 +1791,25 @@ to track the issues and follow progress.
% \subsection{malay}\label{malay}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant}\new{v1.45} = \textit{indonesian} (=~bahasai in \pkg{babel}) or
-% malaysian (=~bahasam in \pkg{babel})
+% \item \xpgchoicekey[1.45]{variant}{\xpgpresetvalue{indonesian} or \xpgvalue{malaysian}}
% \end{itemize}
%
-% \subsection[mongolian]{mongolian\new{v1.45}}\label{mongolian}
+% \subsection{marathi}\label{marathi}
+% \paragraph*{Options:}
+% \begin{itemize}
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{Devanagari} or \xpgvalue{Western}}
+% \end{itemize}
+%
+% \subsection[mongolian]{mongolian\new{1.45}}\label{mongolian}
% Currently, only the Khalkha variety in Cyrillic script is supported.
%
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true.
+% \item \xpgboolkeyfalse{babelshorthands}
% If this is turned on, the following shorthands are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
+% in the hyphenation patterns (as opposed to \cmd\-).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
@@ -1381,32 +1823,44 @@ to track the issues and follow progress.
% \item[¦"<¦] for French left double quotes (looks like <<).
% \item[¦">¦] for French right double quotes (looks like >>).
% \end{shorthands}
-% \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
-% alphanumerical numbering.
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+% \begin{itemize}
+% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+% It supports numbers up to 999\,999.
+% \end{itemize}
% \end{itemize}
% ^^A
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
-% environments such as ¦enumerate¦. The command takes a counter as argument,
-% \eg ¦\textmongolian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
-% \item \Cmd\asbuk: same in lowercase
+% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+% It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+% The command takes a counter as argument, \eg ¦\textmongolian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+% numbers up to 999\,999.\\
+% \Eg ¦\textmongolian{\AsbukTrad{section}}¦ produces \textrussian{\AsbukTrad{section}}.
+% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
% \end{itemize}
%
% \subsection{norwegian}\label{norwegian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant}\new{v1.45} = bokmal (=~`norsk' in \pkg{babel}) or \textit{nynorsk}
+% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{bokmal} or \xpgpresetvalue{nynorsk}}
% \end{itemize}
%
% \subsection{persian}\label{persian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = western or \textit{eastern}
-% \item \TB{abjadjimnotail} = \textit{false} or true. \new{v1.0.3}
-% Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
-% ^^A \item \TB{locale} (not yet implemented)
-% ^^A \item \TB{calendar} (not yet implemented)
+% \item \xpgchoicekey{numerals}{\xpgvalue{western} or \xpgpresetvalue{eastern}}
+% \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail}
+% Set this to \xpgvalue{true} if you want the \textit{abjad} form of the number three to
+% be \textarabic{ج‍} – as in the manuscript tradition – instead of the
+% modern usage \textarabic{ج}.
+% ^^A \item \xpgchoicekey{locale}{} (not yet implemented)
+% ^^A \item \xpgchoicekey{calendar}{} (not yet implemented)
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
@@ -1417,17 +1871,17 @@ to track the issues and follow progress.
% \subsection{portuguese}\label{portuguese}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant}\new{v1.45} = brazilian or \textit{portuguese}
+% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{brazilian} or \xpgpresetvalue{portuguese}}
% \end{itemize}
%
% \subsection{russian}\label{russian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true.
+% \item \xpgboolkeyfalse{babelshorthands}
% If this is turned on, the following shorthands are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
+% in the hyphenation patterns (as opposed to \cmd\-).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
@@ -1442,48 +1896,72 @@ to track the issues and follow progress.
% ^^A \item[¦"<¦] for French left double quotes (looks like <<).
% ^^A \item[¦">¦] for French right double quotes (looks like >>).
% \end{shorthands}
-% \item \TB{indentfirst}\new{v1.46} = \textit{true} or false. By default, all paragraphs are indented in Russian,
-% also those after a chapter or section heading. If this option is false, the latter paragraphs
-% are not indented, as normal in \LaTeX.
-% \item \TB{spelling} = \textit{modern} or old (for captions and date only, not for hyphenation)
-% \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
-% alphanumerical numbering.
+% \item \xpgboolkeytrue[1.46]{indentfirst}
+% By default, all paragraphs are indented in Russian, also those after a
+% chapter or section heading. If this option is false, the latter paragraphs
+% are not indented, as normal in \LaTeX.
+% \item \xpgchoicekey{spelling}{\xpgpresetvalue{modern} or \xpgvalue{old}}
+% This option is for captions and date only, not for hyphenation.
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+% \begin{itemize}
+% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+% It supports numbers up to 999\,999.
+% \end{itemize}
% \end{itemize}
% ^^A
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
-% environments such as ¦enumerate¦. The command takes a counter as argument,
-% \eg ¦\textrussian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}.
-% \item \Cmd\asbuk: same in lowercase
+% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+% It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+% The command takes a counter as argument, \eg ¦\textrussian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+% numbers up to 999\,999.\\
+% \Eg ¦\textrussian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
% \end{itemize}
%
-% \subsection[sami]{sami\new{v1.45}}\label{sami}
+% \subsection[sami]{sami\new{1.45}}\label{sami}
% Currently support for Sami is limited to Northern Sami.
%
% \subsection{sanskrit}\label{sanskrit}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{script} = \textit{Devanagari}\new{v1.0.2}, Gujarati, Malayalam, Bengali, Kannada,
-% Telugu or Latin.
-% The value is passed to \pkg{fontspec} in cases where the respective ¦\⟨script⟩font¦ is not defined.
-% This can be useful if you typeset Sanskrit texts in scripts other than Devanagari.
-% \item \TB{numerals} = \textit{Devanagari}\new{v1.45} or Western
+% \item \xpgchoicekey[1.0.2]{script}{\xpgpresetvalue{Devanagari}, \xpgvalue{Gujarati},
+% \xpgvalue{Malayalam}, \xpgvalue{Bengali}, \xpgvalue{Kannada}, \xpgvalue{Telugu}, or \xpgvalue{Latin}}
+% The value is passed to \pkg{fontspec} in cases where the respective
+% \cmd{\⟨script⟩font} is not defined. This can be useful if you typeset Sanskrit
+% texts in scripts other than Devanagari.
+% \item \xpgchoicekey[1.45]{numerals}{\xpgpresetvalue{Devanagari} or \xpgvalue{Western}}
% \end{itemize}
-%
+%
% \subsection{serbian}\label{serbian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{script} = \textit{Cyrillic} or Latin.
-% \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic
-% alphanumerical numbering.
-% \end{itemize}
+% \item \xpgchoicekey{script}{\xpgpresetvalue{Cyrillic} or \xpgvalue{Latin}}
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
+% \begin{itemize}
+% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+% It supports numbers up to 999\,999.
+% \end{itemize}
+% \end{itemize}
+% ^^A
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for
-% environments such as ¦enumerate¦. The command takes a counter as argument,\\
-% Example: ¦\textserbian[numerals=cyrillic]{\Asbuk{page}}¦ produces \textserbian[numerals=cyrillic]{\Asbuk{page}}.
-% \item \Cmd\asbuk: same in lowercase
+% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+% It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+% The command takes a counter as argument, \eg ¦\textserbian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+% numbers up to 999\,999.\\
+% \Eg ¦\textserbian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
% \end{itemize}
%
%
@@ -1491,9 +1969,9 @@ to track the issues and follow progress.
%
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.46}
-% if this is turned on, the following shorthands for Slovak are activated:
-% \begin{shorthands}
+% \item \xpgboolkeyfalse[1.46]{babelshorthands}
+% If this is turned on, the following shorthands for Slovak are activated:
+% \begin{shorthands}
% \item[¦"=¦] for an explicit hyphen sign which is repeated at the beginning
% of the next line when hyphenated, as common in Slovak typesetting
% (only needed with ¦splithyphens=false¦).
@@ -1501,23 +1979,23 @@ to track the issues and follow progress.
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to ¦\-¦).
+% in the hyphenation patterns (as opposed to \cmd\-).
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, hyphenation at the breakpoints
+% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation at the breakpoints
% preset in the hyphenation patterns is still allowed.
% \item[¦"‘¦] for Slovak left double quotes (looks like ,,).
% \item[¦"’¦] for Slovak right double quotes (looks like “).
% \item[¦">¦] for Slovak left double guillemets (looks like >>).
% \item[¦"<¦] for Slovak right double guillemets (looks like <<).
-% \end{shorthands}
-% \item \TB{splithyphens} = \textit{false} or true. \new{v1.46}
+% \end{shorthands}
+% \item \xpgboolkeytrue[1.46]{splithyphens}
% According to Slovak typesetting conventions, if a word with a hard hyphen (such as \emph{je-li})
% is hyphenated at this hyphen, a second hyphenation character is to be inserted at the beginning
% of the line that follows the hyphenation (\emph{je-/-li}).
% By default, this is done automatically (if you are using \LuaTeX, the \pkg{luavlna} package is
% loaded to achieve this).
% Set this option to ¦false¦ to disable the feature.
-% \item \TB{vlna} = \textit{false} or true. \new{v1.46}
+% \item \xpgboolkeytrue[1.46]{vlna}
% According to Slovak typesetting conventions, single-letter words (non-syllable prepositions)
% must not occur at line ends.
% \pkg{Polyglossia} takes care of this automatically by default (if you are using \LuaTeX, the
@@ -1528,26 +2006,31 @@ to track the issues and follow progress.
% \subsection{slovenian}\label{slovenian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{localalph} = true or \textit{false}
+% \item \xpgboolkeyfalse{localalph}
+% If \xpgvalue{true}, alpha-numeric counters will use a localized version including characters with caron
+% (a, b, c, č, d, \ldots).
% \end{itemize}
%
% \subsection{sorbian}\label{sorbian}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant}\new{v1.45} = lower or \textit{upper}
-% \item \TB{olddate}\new{v1.45} = true or \textit{false} (default value = true). If true, ¦\today¦
-% will use traditional Sorbian month names (\ie it will be synonymous to ¦\oldtoday¦ below)
+% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{lower} or \xpgpresetvalue{upper}}
+% \item \xpgboolkeyfalse[1.45]{olddate}
+% If \xpgvalue{true}, \cmd\today\ will use traditional Sorbian month names (\ie it will be
+% synonymous to \cmd\oldtoday\ below).
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\oldtoday: outputs the current date using traditional Sorbian month names, even if \TB{olddate} is false.
+% \item \Cmd\oldtoday: outputs the current date using traditional Sorbian month names, even if
+% \xpgvalue{olddate} is \xpgvalue{false}.
% \end{itemize}
%
% \subsection{spanish}\label{spanish}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{variant} = \textit{spanish} or mexican.\new{v1.46}
-% \item \TB{spanishoperators} = all, accented, spaced or none or \textit{false} (default value = all).\new{v1.46}
+% \item \xpgchoicekey[1.46]{variant}{\xpgpresetvalue{spanish} or \xpgvalue{mexican}}
+% \item \xpgchoicekey[1.46]{spanishoperators}{\xpgdefaultvalue{all}, \xpgvalue{accented},
+% \xpgvalue{spaced}, \xpgvalue{none}, or \xpgpresetvalue{false}}
% Determines of and how math operators are localized to Spanish.
% \begin{itemize}
% \item ¦accented¦ causes some math operators to use accents where usual in Spanish (\emph{lím},
@@ -1555,29 +2038,29 @@ to track the issues and follow progress.
% \item ¦spaced¦ causes some math operators to use spaces where usual in Spanish (\emph{arc\,cos},
% \emph{arc\,sen}, \emph{arc\,tg}).
% \item ¦all¦ activates ¦accented¦ and ¦spaced¦ and furthermore provides Spanish localizations of
-% ¦\sin¦ (\emph{sen}), ¦\tan¦ (\emph{tg}), ¦\sinh¦ (\emph{senh}), and ¦\tanh¦ (\emph{tgh}).
-% \item ¦none¦ does no localization at all (default setting).
+% \cmd\sin\ (\emph{sen}), \cmd\tan\ (\emph{tg}), \cmd\sinh\ (\emph{senh}), and \cmd\tanh\ (\emph{tgh}).
+% \item ¦none¦ does no localization at all (default setting).
% \end{itemize}
% \end{itemize}
-% \paragraph*{\color{black}Commands:}\new{v1.46}
+% \paragraph*{\color{black}Commands:}\new{1.46}
% \begin{itemize}
-% \item \Cmd\arcsen: alias to ¦\arcsin¦ (\pkg{babel} compatibility)
-% \item \Cmd\arctg: alias to ¦\arctan¦ (\pkg{babel} compatibility)
-% \item \Cmd\sen: alias to ¦\sin¦ (\pkg{babel} compatibility)
-% \item \Cmd\senh: alias to ¦\sinh¦ (\pkg{babel} compatibility)
-% \item \Cmd\tg: alias to ¦\tan¦ (\pkg{babel} compatibility)
-% \item \Cmd\tgh: alias to ¦\tanh¦ (\pkg{babel} compatibility)
+% \item \Cmd\arcsen: alias to \cmd\arcsin\ (\pkg{babel} compatibility)
+% \item \Cmd\arctg: alias to \cmd\arctan\ (\pkg{babel} compatibility)
+% \item \Cmd\sen: alias to \cmd\sin\ (\pkg{babel} compatibility)
+% \item \Cmd\senh: alias to \cmd\sinh\ (\pkg{babel} compatibility)
+% \item \Cmd\tg: alias to \cmd\tan\ (\pkg{babel} compatibility)
+% \item \Cmd\tgh: alias to \cmd\tanh\ (\pkg{babel} compatibility)
% \item \Cmd\spanishoperator: allows you to define further localized operators. For instance, ¦\spanishoperator{cotg}¦
-% defines a command ¦\cotg¦ that outputs \emph{cotg} in math. The optional argument of the command lets you specify the
+% defines a command \cmd\cotg\ that outputs \emph{cotg} in math. The optional argument of the command lets you specify the
% spelling, if needed, \eg ¦\spanishoperator[arc\,ctg]{arcctg}¦.
% \end{itemize}
%
% \subsection{syriac}\label{syriac}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = \textit{western} (i.e., 1234567890), eastern
-% (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}),
-% or abjad. \new{v1.0.1}.
+% \item \xpgchoicekey[1.0.1]{numerals}{\xpgpresetvalue{western} (\ie 1234567890), \xpgvalue{eastern}
+% (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}), or
+% \xpgvalue{abjad}}
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
@@ -1588,7 +2071,7 @@ to track the issues and follow progress.
% \subsection{thai}\label{thai}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = thai or \textit{arabic}
+% \item \xpgchoicekey{numerals}{\xpgvalue{thai} or \xpgpresetvalue{arabic}}
% \end{itemize}
% ^^A
% To insert word breaks, you need to use an external processor.
@@ -1598,21 +2081,58 @@ to track the issues and follow progress.
% \subsection{tibetan}\label{tibetan}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{numerals} = tibetan or \textit{arabic}
+% \item \xpgchoicekey{numerals}{\xpgvalue{tibetan} or \xpgpresetvalue{arabic}}
% \end{itemize}
%
% \subsection{ukrainian}\label{ukrainian}
-% \paragraph*{Commands:}
+%
+% \paragraph*{Options:}
+% \begin{itemize}
+% \item \xpgboolkeyfalse{babelshorthands}
+% If this is turned on, the following shorthands are activated:
+% \begin{shorthands}
+% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
+% in the hyphenation patterns (as opposed to \cmd\-).
+% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+% cases where the hyphen should stick at the following syllable.
+% \item[¦"|¦] disables a ligature at this position.
+% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
+% \item[¦"---¦] Cyrillic emdash in plain text.
+% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
+% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
+% ^^A These are commented out in gloss-ukrainian
+% ^^A \item[¦",¦] thinspace for initials with a breakpoint in following surname.
+% ^^A \item[¦"‘¦] for German left double quotes (looks like ,,).
+% ^^A \item[¦"’¦] for German right double quotes (looks like “).
+% ^^A \item[¦"<¦] for French left double quotes (looks like <<).
+% ^^A \item[¦">¦] for French right double quotes (looks like >>).
+% \end{shorthands}
+% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
+% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
% \begin{itemize}
-% \item \Cmd\Asbuk: produces the uppercase Ukrainian alphabet, for
-% environments such as ¦enumerate¦
-% \item \Cmd\asbuk: same in lowercase
+% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30.
+% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.%
+% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.}
+% It supports numbers up to 999\,999.
% \end{itemize}
+% \end{itemize}
+% ^^A
+% \paragraph*{Commands:}
+% \begin{itemize}
+% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
+% It steps through the Cyrillic alphabet and thus it can only be used up to 30.
+% The command takes a counter as argument, \eg ¦\textukrainian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}.
+% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase.
+% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports
+% numbers up to 999\,999.\\
+% \Eg ¦\textukrainian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}.
+% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase.
+% \end{itemize}
%
% \subsection{welsh}\label{welsh}
% \paragraph*{Options:}
% \begin{itemize}
-% \item \TB{date} = long or \textit{short}
+% \item \xpgchoicekey{date}{\xpgvalue{long} or \xpgpresetvalue{short}}
% \end{itemize}
%
%
@@ -1620,55 +2140,55 @@ to track the issues and follow progress.
%
% \pkg{Polyglossia} uses the following macros to define language-specific captions
% (\ie strings such as ``chapter''), date formats and additional language settings
-% (¦⟨lang⟩¦ is to be replaces with the respective language name):
+% (\meta{lang} is to be replaces with the respective language name):
%
% \begin{itemize}
-% \item \Cmd{\captions⟨lang⟩} stores definitions of caption strings
+% \item \Cmd{\captions\meta{lang}} stores definitions of caption strings
% (such as, in the case of English, ¦\def\chaptername{Chapter}¦)
-% \item \Cmd{\date⟨lang⟩} stores definitions of date formats (usually redefinitions
-% of ¦\today¦, in some cases also definitions of additional date commands)
-% \item \Cmd{\blockextras⟨lang⟩} stores macros that are to be executed when the language
-% ⟨lang⟩ is activated via ¦\selectlanguage¦ command or the ¦⟨lang⟩¦ environment
-% \item \Cmd{\inlineextras⟨lang⟩} stores macros that are to be executed when the language
-% ⟨lang⟩ is activated locally via ¦\text⟨lang⟩¦ command
-% \item \Cmd{\noextras⟨lang⟩} stores macros that are to be executed when the language
-% ¦⟨lang⟩¦ is closed
-% \end{itemize}
+% \item \Cmd{\date\meta{lang}} stores definitions of date formats (usually redefinitions
+% of \cmd\today, in some cases also definitions of additional date commands)
+% \item \Cmd{\blockextras\meta{lang}} stores macros that are to be executed when the language
+% \meta{lang} is activated via \cmd\selectlanguage command or the \meta{lang} environment
+% \item \Cmd{\inlineextras\meta{lang}} stores macros that are to be executed when the language
+% \meta{lang} is activated locally via \cmd\text\meta{lang} command
+% \item \Cmd{\noextras\meta{lang}} stores macros that are to be executed when the language
+% \meta{lang} is closed
+% \end{itemize}
% ^^A
-% In order to redefine internal macros, we recommend to use the command ¦\gappto¦.
-% For compatibility with \pkg{babel} the command ¦\addto¦ is also available
-% to the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
+% In order to redefine internal macros, we recommend to use the command \cmd\gappto.
+% For compatibility with \pkg{babel} the command \cmd\addto\ is also available
+% to the same effect. For instance, to change the \cmd\chaptername\ for language ¦lingua¦,
% you can do this:
% \begin{verbatim}
% \gappto\captionslingua{\def\chaptername{Caput}}
% \end{verbatim}
% ^^A
% Note that this needs to be done after the respective language has been loaded with
-% ¦\setmainlanguage¦ or ¦\setotherlanguage¦.
+% \cmd\setmainlanguage\ or \cmd\setotherlanguage.
%
% Specifically for package authors, analogous commands are provided which are only executed
% if a specific language \emph{variety} is used. As opposed to the macros above, these refer
% to babel names. Other than that, the function is identical:
%
% \begin{itemize}
-% \item \Cmd{\captions@bbl@⟨babelname⟩}
-% \item \Cmd{\date@bbl@⟨babelname⟩}
-% \item \Cmd{\blockextras@bbl@⟨babelname⟩}
-% \item \Cmd{\inlineextras@bbl@⟨babelname⟩}
-% \item \Cmd{\noextras@bbl@⟨babelname⟩}
+% \item \Cmd{\captions@bbl@\meta{babelname}}
+% \item \Cmd{\date@bbl@\meta{babelname}}
+% \item \Cmd{\blockextras@bbl@\meta{babelname}}
+% \item \Cmd{\inlineextras@bbl@\meta{babelname}}
+% \item \Cmd{\noextras@bbl@\meta{babelname}}
% \end{itemize}
% ^^A
% By default, these macros are undefined. If they are defined (\eg by an external package),
-% they will be executed after their respective ¦⟨lang⟩¦ counterpart and thus can be used to
-% overwrite definitions of the former. Again, use ¦\gappto¦ to define\slash modify these macros.
-% For instance, to add a new caption ¦\footnotename¦ to the Swiss variety of German (babel name
+% they will be executed after their respective \meta{lang} counterpart and thus can be used to
+% overwrite definitions of the former. Again, use \cmd\gappto\ to define\slash modify these macros.
+% For instance, to add a new caption \cmd\footnotename\ to the Swiss variety of German (babel name
% ¦nswissgerman¦), you can do this:
% \begin{verbatim}
% \gappto\captions@bbl@nswissgerman{\def\footnotename{Fussnote}}
% \end{verbatim}
% ^^A
% If you do this in a document preamble rather than in a package, you need to embrace the redefinition
-% by ¦\makeatletter¦ and ¦\makeatother¦ due to the ¦@¦ in the macro names.
+% by \cmd\makeatletter\ and \cmd\makeatother\ due to the ¦@¦ in the macro names.
%
% \section{Script-specific numbering}
%
@@ -1694,25 +2214,27 @@ to track the issues and follow progress.
% ¦\localnumeral{42}¦ yields \textarabic{\localnumeral{42}}, whereas in an Hebrew environment, it
% results in \texthebrew[numerals=hebrew]{\localnumeral{42}} with ¦numerals=hebrew¦, and \texthebrew{\localnumeral{42}}
% with ¦numerals=arabic¦. Note that, as opposed to the various ¦digits¦ macros (described in sec.~\ref{sec:decdigit}),
-% the argument of ¦\localnumeral¦ must consist of numbers only.
+% the argument of \cmd\localnumeral\ must consist of numbers only.
%
% For\new{1.45} the conversion of counters, the starred version \Cmd{\localnumeral*} is provided. This takes a counter as argument.
% For instance in an Arabic environment ¦\localnumeral*{page}¦ yields \textarabic{\localnumeral*{page}}.
%
-% For scripts with alphanumeric numbering, the variants \Cmd{\Localnumeral} and \Cmd{\Localnumeral*} provide the uppercased
+% For scripts with alphanumeric numbering, the variants \Cmd{\Localnumeral} and \Cmd{\Localnumeral*} provide the uppercased
% versions.\medskip
%
% \noindent All these macros provide the following options:
%
% \begin{itemize}
-% \item \TB{lang} =\DescribeMacro{[lang=]}\ \textit{local}, main, or <language>.\\
-% Output number in the local form of the currently active language for ¦local¦, the main language of the document for ¦main¦,
-% and any (loaded) language for ¦<language>¦ (\eg ¦\localnumeral[lang=arabic]{42}}¦).
+% \item \DescribeMacro{[lang=]}\xpgchoicekey{lang}{\xpgpresetvalue{local}, \xpgvalue{main},
+% or \xpgvalue{\meta{language}}}
+% Output number in the local form of the currently active language for
+% ¦local¦, the main language of the document for ¦main¦, and any (loaded)
+% language for \meta{language} (\eg ¦\localnumeral[lang=arabic]{42}}¦).
% \end{itemize}
%
% \subsection{Non-Western decimal digits}\label{sec:decdigit}
%
-% In addition\new{v1.1.1} to the generic macros described above, \pkg{polyglossia} provides language-specific conversion macros
+% In addition\new{1.1.1} to the generic macros described above, \pkg{polyglossia} provides language-specific conversion macros
% which can be used if the generic ones do not suit the need.\footnote{%
% A third method are so-called TECKit fontmappings.
% Those can be activated with the \pkg{fontspec} ¦Mapping¦ option,
@@ -1721,7 +2243,7 @@ to track the issues and follow progress.
% typing \cmd{\textarabic\{2010\}} results in \textarabic{٢٠١٠}. Note that this method has some drawbacks, though,
% for instance when the value of a counter has to be written and read from auxiliary files.
% So please use this with care.}
-% The macros have the form ¦\<script>digits¦. They convert Arabic numerical input and leave every other input untouched.
+% The macros have the form \cmd{\⟨script⟩digits}. They convert Arabic numerical input and leave every other input untouched.
% In an Arabic context, for instance, ¦\arabicdigits{9182/738543-X}¦ yields \textarabic{\arabicdigits{9182/738543-X}}.
%
% Currently, the following macros are provided:
@@ -1748,9 +2270,9 @@ to track the issues and follow progress.
% \url{http://en.wikipedia.org/wiki/Hebrew_numerals},
% and \url{http://en.wikipedia.org/wiki/Syriac_alphabet}.}, dedicated macros are provided.
%
-% They work in a similar way than the ¦\<script>digits¦ macros described above: They take Arabic numerical input
+% They work in a similar way than the \cmd{\⟨script⟩digits} macros described above: They take Arabic numerical input
% and output the respective value in the local alphabetic numbering scheme (most of these macros are equivalent
-% to ¦\localnumeral¦ and ¦\Localnumeral¦ in the respective context).
+% to \cmd\localnumeral\ and \cmd\Localnumeral\ in the respective context).
%
% The following macros are provided:
%
@@ -1767,6 +2289,13 @@ to track the issues and follow progress.
%
% \item \Cmd\armeniannumeral produces Armenian alphabetic numbering.
% Example: ¦\armeniannumeral{1863}¦ yields \textarmenian{\armeniannumeral{1863}}.
+%
+% \item \Cmd\belarusiannumeral produces Belarusian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Belarusiannumeral.
+% Depending on the ¦numerals¦ option in the Belarusian language selection, this is either Arabic digit or Cyrillic
+% alphanumercial output.\\
+% Example: With ¦numerals=latin¦ ¦\belarusiannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
+% with ¦numerals=cyrillic-trad¦ ¦\belarusiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+% with ¦numerals=cyrillic-alph¦ ¦\belarusiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
%
% \item \Cmd\georgiannumeral produces Georgian alphabetic numbering.\\
% Example: ¦\georgiannumeral{1863}¦ yields \textgeorgian{\georgiannumeral{1863}}.
@@ -1776,24 +2305,40 @@ to track the issues and follow progress.
% ¦\Greeknumeral{1863}¦ results in \textgreek{\Greeknumeral{1863}}.
%
% \item \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal generate variants of Hebrew alphanumeric numerals.
-% The commands behave exactly as they do in \pkg{babel}: ¦\hebrewnumeral¦ outputs the numbers without any decoration,
-% ¦\Hebrewnumeral¦ adds \textit{gereshayim} before the last letter, ¦\Hebrewnumeralfinal¦ uses in addition the final forms of Hebrew letters.
+% The commands behave exactly as they do in \pkg{babel}: \cmd\hebrewnumeral\ outputs the numbers without any decoration,
+% \cmd\Hebrewnumeral\ adds \textit{gereshayim} before the last letter, \cmd\Hebrewnumeralfinal\ uses in addition the final forms of Hebrew letters.
% Examples:
% ¦\hebrewnumeral{1750}¦ yields \texthebrew{\hebrewnumeral{1750}},
% ¦\Hebrewnumeral{1750}¦ yields \texthebrew{\Hebrewnumeral{1750}},
% and ¦\Hebrewnumeralfinal{1750}¦ yields \texthebrew{\Hebrewnumeralfinal{1750}}.
+%
+% \item \Cmd\mongoliannumeral produces Mongolian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Mongoliannumeral.
+% Depending on the ¦numerals¦ option in the Mongolian language selection, this is either Arabic digit or Cyrillic
+% alphanumercial output.\\
+% Example: With ¦numerals=latin¦ ¦\mongoliannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
+% with ¦numerals=cyrillic-trad¦ ¦\mongoliannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+% with ¦numerals=cyrillic-alph¦ ¦\mongoliannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
%
% \item \Cmd\russiannumeral produces Russian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Russiannumeral.
% Depending on the ¦numerals¦ option in the Russian language selection, this is either Arabic digit or Cyrillic
% alphanumercial output.\\
% Example: With ¦numerals=latin¦ ¦\russiannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
-% with ¦numerals=cyrillic¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic]{\russiannumeral{19}}.
+% with ¦numerals=cyrillic-trad¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+% with ¦numerals=cyrillic-alph¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
%
% \item \Cmd\serbiannumeral produces Serbian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Serbiannumeral.
% Depending on the ¦numerals¦ option in the Serbian language selection, this is either Arabic digit or Cyrillic
% alphanumercial output.\\
-% Example: With ¦numerals=latin¦ ¦\serbiannumeral{19}¦ yields \textserbian{\serbiannumeral{19}},
-% with ¦numerals=cyrillic¦ ¦\serbiannumeral{19}¦ results in \textserbian[numerals=cyrillic]{\serbiannumeral{19}}.
+% Example: With ¦numerals=latin¦ ¦\serbiannumeral{19}¦ yields \textrussian{\serbiannumeral{19}},
+% with ¦numerals=cyrillic-trad¦ ¦\serbiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\serbiannumeral{19}},\\
+% with ¦numerals=cyrillic-alph¦ ¦\serbiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\serbiannumeral{19}}.
+%
+% \item \Cmd\ukrainiannumeral produces Ukrainian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Ukrainiannumeral.
+% Depending on the ¦numerals¦ option in the Ukrainian language selection, this is either Arabic digit or Cyrillic
+% alphanumercial output.\\
+% Example: With ¦numerals=latin¦ ¦\ukrainiannumeral{19}¦ yields \textrussian{\russiannumeral{19}},
+% with ¦numerals=cyrillic-trad¦ ¦\ukrainiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\
+% with ¦numerals=cyrillic-alph¦ ¦\ukrainiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}.
% \end{itemize}
%
%
@@ -1806,14 +2351,14 @@ to track the issues and follow progress.
%
% \subsection{Horizontal footnote position}
%
-% When right-to-left languages are used, the ¦\footnote¦ command becomes sensitive to the text directionality. The footnote is
+% When right-to-left languages are used, the \cmd\footnote\ command becomes sensitive to the text directionality. The footnote is
% always placed on the side that is currently the origin of direction: on the left side of the page in LTR paragraphs and
% on the right in RTL paragraphs.
%
% For cases where this is not desired, two additional footnote commands are provided: \Cmd\RTLfootnote and \Cmd\LTRfootnote.
-% ¦\LTRfootnote¦ always places the footnote on the left side, notwithstanding the current
-% directionality. Likewise, ¦\RTLfootnote¦ always places it on the right side. Like ¦\footnote¦, ¦\RTLfootnote¦
-% and ¦\LTRfootnote¦ provide an optional argument to customize the number.
+% \cmd\LTRfootnote\ always places the footnote on the left side, notwithstanding the current
+% directionality. Likewise, \cmd\RTLfootnote\ always places it on the right side. Like \cmd\footnote, \cmd\RTLfootnote\
+% and \cmd\LTRfootnote\ provide an optional argument to customize the number.
%
%
% \subsection{Footnote rule length and position}
@@ -1830,12 +2375,13 @@ to track the issues and follow progress.
% \item Put \Cmd\autofootnoterule in the preamble to have automatic placement depending on the context (see below for elaboration).
% \item Put \Cmd\textwidthfootnoterule in the preamble to have a rule that spans the whole text width.
% \end{itemize}
-% With ¦\autofootnoterule¦, the first footnote on the current page determines the placement. Note that this automatic can fail with
-% footnotes at page boundaries that differ in directionality from the first footnote on the page. You can work around such cases by switching to ¦\rightfootnoterule¦ or ¦\leftfootnoterule¦ on these pages.
+% With \cmd\autofootnoterule, the first footnote on the current page determines the placement. Note that this automatic can fail with
+% footnotes at page boundaries that differ in directionality from the first footnote on the page. You can work around such cases by switching to \cmd\rightfootnoterule\ or \cmd\leftfootnoterule\ on these pages.
%
% Note also that the rule switches might interfere in bad ways with packages or classes that redefine footnotes themselves. This is also the reason
-% why ¦\autofootnoterule¦ is not used by default.
+% why \cmd\autofootnoterule\ is not used by default.
%
+% \condbreak{5\baselineskip}
% \section{Calendars}
%
% \subsection{Hebrew calendar (hebrewcal.sty)}
@@ -1852,24 +2398,24 @@ to track the issues and follow progress.
% (Cambridge University Press, 2001).\label{reingold}}
% It provides two macros for the end-user.
% The command
-% \displaycmd{\HijriFromGregorian\{⟨year⟩\}\{⟨month⟩\}\{⟨day⟩\}}{\HijriFromGregorian}
+% \displaycmd{\HijriFromGregorian\marg{year}\marg{month}\marg{day}}{\HijriFromGregorian}
% sets the counters ¦Hijriday¦, ¦Hijrimonth¦ and ¦Hijriyear¦.
% \Cmd\Hijritoday\ formats the Hijri date for the current day.
-% This command is now locale-aware\new{v1.1.1}: its output will differ depending on the
+% This command is now locale-aware\new{1.1.1}: its output will differ depending on the
% currently active language. Presently \pkg{polyglossia}’s language definition files
-% for Arabic, Farsi, Urdu, Turkish and Malay provide a localized version of ¦\Hijritoday¦.
+% for Arabic, Farsi, Urdu, Turkish and Malay provide a localized version of \cmd\Hijritoday.
% If the formatting macro for the current language is undefined, the Hijri date will be formatted
% in Arabic or in roman transliteration, depending of the current writing direction.
% You can define a new format or redefine one with the command
-% \displaycmd{\DefineHijriDateFormat\{<lang>\}\{<code>\}.}{\DefineHijriDateFormat}
+% \displaycmd{\DefineHijriDateFormat\marg{lang}\marg{code}.}{\DefineHijriDateFormat}
%
-% The command ¦\Hijritoday¦ also accepts an optional argument to add or subtract a correction
+% The command \cmd\Hijritoday\ also accepts an optional argument to add or subtract a correction
% (in days) to the date computed by the arithmetical algorithm.\footnote{ %
% The Islamic calendar is indeed a purely lunar calendar based on the observation
% of the first visibility of the lunar crescent at the beginning of the lunar month,
% so there can be differences between different localities, as well as between
% civil and religious authorities.}
-% For instance if ¦\Hijritoday¦ yields the date “7 Rajab 1429” (which is the date that was
+% For instance if \cmd\Hijritoday\ yields the date “7 Rajab 1429” (which is the date that was
% displayed on the front page of \href{http://www.aljazeera.net}{aljazeera.net} on
% 11th July 2008), ¦\Hijritoday[1]¦ would rather print “8 Rajab 1429” (the date
% indicated the same day on the site \href{http://www.gulfnews.com}{gulfnews.com}).
@@ -1877,19 +2423,26 @@ to track the issues and follow progress.
% \subsection{Farsi (jalālī) calendar (farsical.sty)}
% This package is an almost verbatim copy of ¦Arabiftoday.sty¦ (in the \pkg{Arabi} package),
% itself a slight modification of ¦ftoday.sty¦ in Farsi\TeX.\footnote{ %
-% One day I may rewrite \pkg{farsical} from scratch using the algorithm in
-% Reingold \& Gershowitz (ref.~n.~\ref{reingold}).}
+% One day we may rewrite \pkg{farsical} from scratch using the algorithm in
+% Reingold \& Gershowitz (ref.~n.\,\ref{reingold}).}
% Here we have renamed the command \cmd\ftoday\ to
% \Cmd\Jalalitoday.
% Example: today is \Jalalitoday.
%
%
-% ^^A\section{Varia}
+% \section{Auxiliary commands}
+%
+% The macro \displaycmd{\charifavailable\marg{char code}\marg{substitution}}{\charifavailable}\new{1.47} checks whether
+% the character with the specified \meta{char code} (\ie unicode utf-16 code without preceding ¦0x¦) exists in
+% the current font. If so, the character is printed, if not, the \meta{substitution} is printed.
+%
+% Example: ¦\charifavailable{1E9E}{SS}¦ prints the capital version of the German letter ⟨ß⟩ if available
+% (\ie \charifavailable{1E9E}{SS}), else it prints the substitution digraph SS.
+%
%
% \section{Accessing language information}
%
% The following is specifically relevant to package authors who need information about the languages in use.
-%
% In order to get such information, \pkg{polyglossia} provides the following macros:
%
% \begin{itemize}
@@ -1904,20 +2457,36 @@ to track the issues and follow progress.
% Note that this macro is also defined for languages that are not supported in \pkg{babel}. In that
% case, they are equal to the polyglossia language name.
% \item \Cmd\mainbabelname\ analogously stores the name of document's main language (variant) in \pkg{babel}.
+% \item \Cmd{\languageid\marg{type}}\new{1.47} stores the identifier tag of the current language. Currently supported \meta{types}:
+% \begin{itemize}
+% \item ¦bcp-47¦ (alias ¦bcp47¦): IETF BCP-47 language identifier
+% \end{itemize}
+% \item \Cmd{\mainlanguageid\marg{type}}\new{1.47} stores identifier tag of the main language. Currently supported \meta{types}:
+% see \cmd\languageid.
% \end{itemize}
-% ^^A
-% If you want to have a full list of loaded languages/variants, use the following macros:
+% \bigskip
+%
+% \noindent If you want to have a full list of loaded languages/variants, use the following macros:
% \begin{itemize}
% \item \Cmd{\xpg@loaded}\ stores a comma-separated list of all loaded languages (polyglossia name)
% \item \Cmd{\xpg@vloaded}\ stores a comma-separated list of all loaded variants
-% \item \Cmd{\xpg@bloaded}\ stores a comma-separated list of \pkg{babel} names of all language variants
+% \item \Cmd{\xpg@bloaded}\ stores a comma-separated list of \pkg{babel} names of all language variants
+% \item \Cmd{\xpg@bcp@loaded}\new{1.47}\ stores a comma-separated list of the BCP-47 IDs of all language variants
% \end{itemize}
-% ^^A
-% Finally, you can test whether a language is loaded by
-% \displaycmd{\iflanguageloaded\{⟨lang⟩\}\{⟨true⟩\}\{⟨false⟩\}}{\iflanguageloaded}
-% where \texttt{⟨lang⟩} is a \pkg{polyglossia} language name, or
-% \displaycmd{\ifbabellanguageloaded\{⟨lang⟩\}\{⟨true⟩\}\{⟨false⟩\}}{\ifbabellanguageloaded}
-% where \texttt{⟨lang⟩} is a \pkg{babel} language name.
+% \bigskip
+%
+% \noindent Whether a language is loaded can be tested by
+% \displaycmd{\iflanguageloaded\marg{lang}\marg{true}\marg{false}}{\iflanguageloaded}
+% where \texttt{\meta{lang}} is a \pkg{polyglossia} language name, by
+% \displaycmd{\ifbabellanguageloaded\marg{lang}\marg{true}\marg{false}}{\ifbabellanguageloaded}
+% where \texttt{\meta{lang}} is a \pkg{babel} language name (see table~\ref{tab:bbllang} on p.~\pageref{tab:bbllang}), or by
+% \displaycmd{\iflanguageidloaded\marg{type}\marg{id}\marg{true}\marg{false}}{\iflanguageidloaded}\new{1.47}
+% where \meta{type} is a supported language id type (such as ¦bcp-47¦) and \meta{id} is a language id
+% (such as ¦en-US¦; see table~\ref{tab:BCP47-polyglossia} on p.~\pageref{tab:BCP47-polyglossia}).
+% \bigskip
+%
+% \noindent Finally, if you want to know whether a specific language option has been set, you can use
+% \displaycmd{\iflanguageoption\marg{lang}\marg{opt. key}\marg{opt. value}\marg{true}\marg{false}}{\iflanguageoption}\new{1.47}
%
% \section{Acknowledgements (by François Charette)}
% \pkg{Polyglossia} is notable for being a recycle box of previous contributions
@@ -1933,7 +2502,7 @@ to track the issues and follow progress.
% (Sanskrit), \TA{Zdenĕk Wagner} (Hindi), \TA{Mikhal Oren} (Hebrew), \TA{Sergey Astanin} (Russian),
% \TA{Khaled Hosny} (Arabic), \TA{Sertaç Ö. Yıldız} (Turkish), \TA{Kamal Abdali} (Urdu),
% and several other members of the \XeTeX\ user community, notably \TA{Enrico Gregorio}, who
-% has sent me many useful suggestions and corrections and contributed the ¦\newXeTeXintercharclass¦
+% has sent me many useful suggestions and corrections and contributed the \cmd\newXeTeXintercharclass\
% mechanism in xelatex.ini which is now used by polyglossia.
% More recently, \TA{Kevin Godby} of the \href{http://ubuntu-manual.org}{Ubuntu Manual} project has
% contributed very useful feedback, bug hunting and, with the help of translators,
@@ -1950,9 +2519,9 @@ to track the issues and follow progress.
% In alphabetical order: \TA{Ignas Anikevicius}, \TA{Sina Ahmadi}, \TA{Wouter Bolsterlee}, \TA{Christian Buhtz},
% \TA{Zgarbul Andrey}, \TA{Oleg Domanov}, \TA{Philipp Gesang}, \TA{Kevin Godby}, \TA{Enrico Gregorio},
% \TA{Khaled Hosny}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime}, \TA{Mike Kroutikov},
-% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Maïeul Rouquette},
-% \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Keno Wehr}, \TA{Dominik Wujastyk},
-% \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
+% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Will Robertson}, \TA{Maïeul Rouquette},
+% \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Niranjan Tambe}, \TA{Keno Wehr},
+% \TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
% Their respective contributions can be identified from the contributor statistics on
% \href{https://github.com/reutenauer/polyglossia/graphs/contributors}{GitHub}.
%
@@ -1986,6 +2555,51 @@ to track the issues and follow progress.
% \end{macrocode}
% \iffalse
%</gloss-acadien.ldf>
+%<*gloss-aeb.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-aeb.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-aeb.ldf}[polyglossia: module for aeb (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-aeb.ldf>
+%<*gloss-af.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-af.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-af.ldf}[polyglossia: module for af (afrikaans)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{afrikaans}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-af.ldf>
+%<*gloss-afb.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-afb.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-afb.ldf}[polyglossia: module for afb (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-afb.ldf>
%<*gloss-afrikaans.ldf>
% \fi
% \clearpage
@@ -1995,6 +2609,7 @@ to track the issues and follow progress.
\ProvidesFile{gloss-afrikaans.ldf}[polyglossia: module for afrikaans]
\PolyglossiaSetup{afrikaans}{
+ bcp47=af,
hyphennames={afrikaans,dutch},
hyphenmins={2,2},
langtag=AFK,
@@ -2002,8 +2617,14 @@ to track the issues and follow progress.
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
@@ -2089,6 +2710,7 @@ to track the issues and follow progress.
\ProvidesFile{gloss-albanian.ldf}[polyglossia: module for albanian]
\PolyglossiaSetup{albanian}{
+ bcp47=sq,
hyphennames={albanian},
langtag=SQI,
hyphenmins={2,2},
@@ -2096,6 +2718,9 @@ to track the issues and follow progress.
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{albanian}{sq}
+
\def\captionsalbanian{%
\def\refname{Referencat}%
\def\abstractname{Përmbledhja}%
@@ -2129,6 +2754,21 @@ to track the issues and follow progress.
% \end{macrocode}
% \iffalse
%</gloss-albanian.ldf>
+%<*gloss-am.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-am.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-am.ldf}[polyglossia: module for am (amharic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{amharic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-am.ldf>
%<*gloss-american.ldf>
% \fi
% \clearpage
@@ -2152,6 +2792,7 @@ to track the issues and follow progress.
% \begin{macrocode}
\ProvidesFile{gloss-amharic.ldf}[polyglossia: module for amharic]
\PolyglossiaSetup{amharic}{
+ bcp47=am,
script=Ethiopic,
scripttag=ethi,
langtag=AMH,
@@ -2161,6 +2802,9 @@ to track the issues and follow progress.
%TODO localalph=ethnum
}
+% BCP-47 compliant aliases
+\setlanguagealias*{amharic}{am}
+
\def\captionsamharic{%
\def\refname{የነሥ ጹሁፍ ምንጭ}%
\def\abstractname{አኅጽተሮ ጽሁፍ}%
@@ -2356,6 +3000,141 @@ to track the issues and follow progress.
% \end{macrocode}
% \iffalse
%</gloss-amharic.ldf>
+%<*gloss-apd.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-apd.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-apd.ldf}[polyglossia: module for apd (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-apd.ldf>
+%<*gloss-ar-IQ.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-IQ.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-IQ.ldf}[polyglossia: module for ar-IQ (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-IQ.ldf>
+%<*gloss-ar-JO.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-JO.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-JO.ldf}[polyglossia: module for ar-JO (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-JO.ldf>
+%<*gloss-ar-LB.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-LB.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-LB.ldf}[polyglossia: module for ar-LB (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-LB.ldf>
+%<*gloss-ar-MR.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-MR.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-MR.ldf}[polyglossia: module for ar-MR (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-MR.ldf>
+%<*gloss-ar-PS.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-PS.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-PS.ldf}[polyglossia: module for ar-PS (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-PS.ldf>
+%<*gloss-ar-SY.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-SY.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-SY.ldf}[polyglossia: module for ar-SY (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-SY.ldf>
+%<*gloss-ar-YE.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar-YE.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar-YE.ldf}[polyglossia: module for ar-YE (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar-YE.ldf>
+%<*gloss-ar.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ar.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ar.ldf}[polyglossia: module for ar (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ar.ldf>
%<*gloss-arabic.ldf>
% \fi
% \clearpage
@@ -2374,6 +3153,7 @@ and may look very wrong.}
\RequirePackage{hijrical}
\PolyglossiaSetup{arabic}{
+ bcp47=ar,
script=Arabic,
direction=RL,
langtag=ARA,
@@ -2385,6 +3165,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}
@@ -2411,9 +3208,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}}}
@@ -2433,8 +3232,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
@@ -2596,6 +3397,7 @@ and may look very wrong.}
\ProvidesFile{gloss-armenian.ldf}[polyglossia: module for armenian]
\PolyglossiaSetup{armenian}{
+ bcp47=hy,
script=Armenian,
scripttag=armn,
langtag=HYE,
@@ -2605,6 +3407,9 @@ and may look very wrong.}
localnumeral=armeniannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{armenian}{hy}
+
\newif\if@eastern@armenian
\@eastern@armenianfalse
\define@choicekey*+{armenian}{variant}[\val\nr]{western,eastern}[western]{%
@@ -2624,6 +3429,9 @@ and may look very wrong.}
\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{Հղումներ}%
@@ -2765,6 +3573,66 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-armenian.ldf>
+%<*gloss-arq.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-arq.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-arq.ldf}[polyglossia: module for arq (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-arq.ldf>
+%<*gloss-ary.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ary.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ary.ldf}[polyglossia: module for ary (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ary.ldf>
+%<*gloss-arz.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-arz.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-arz.ldf}[polyglossia: module for arz (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-arz.ldf>
+%<*gloss-ast.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ast.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ast.ldf}[polyglossia: module for ast (asturian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{asturian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ast.ldf>
%<*gloss-asturian.ldf>
% \fi
% \clearpage
@@ -2776,6 +3644,7 @@ and may look very wrong.}
%
\ProvidesFile{gloss-asturian.ldf}[polyglossia: module for asturian]
\PolyglossiaSetup{asturian}{
+ bcp47=ast,
hyphennames={asturian,catalan},
hyphenmins={2,2},
langtag=AST,
@@ -2784,6 +3653,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{asturian}{ast}
+
\def\captionsasturian{%
\def\prefacename{Entamu}%
\def\refname{Referencies}%
@@ -2838,7 +3710,7 @@ and may look very wrong.}
%
% \subsection{gloss-austrian.ldf}
% \begin{macrocode}
-\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
@@ -2847,17 +3719,32 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-austrian.ldf>
+%<*gloss-ayl.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ayl.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ayl.ldf}[polyglossia: module for ayl (arabic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{arabic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ayl.ldf>
%<*gloss-bahasa.ldf>
% \fi
% \clearpage
%
% \subsection{gloss-bahasa.ldf}
% \begin{macrocode}
-\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}
% \end{macrocode}
% \iffalse
@@ -2902,6 +3789,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-basque.ldf}[polyglossia: module for basque]
\PolyglossiaSetup{basque}{
+ bcp47=eu,
hyphennames={basque},
hyphenmins={2,2},
langtag=EUQ,
@@ -2909,6 +3797,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{basque}{eu}
+
\def\captionsbasque{%
\def\refname{Erreferentziak}%
\def\abstractname{Laburpena}%
@@ -2943,6 +3834,36 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-basque.ldf>
+%<*gloss-be-tarask.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-be-tarask.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-be-tarask.ldf}[polyglossia: module for be-tarask (belarusian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{belarusian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-be-tarask.ldf>
+%<*gloss-be.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-be.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-be.ldf}[polyglossia: module for be (belarusian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{belarusian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-be.ldf>
%<*gloss-belarusian.ldf>
% \fi
% \clearpage
@@ -2954,6 +3875,7 @@ and may look very wrong.}
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{belarusian}{
+ bcp47=be,
script=Cyrillic,
scripttag=cyrl,
langtag=BEL,
@@ -2965,30 +3887,56 @@ and may look very wrong.}
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}
@@ -3153,7 +4101,11 @@ and may look very wrong.}
\def\belarusiannumber#1{%
\ifcyrillic@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \belarusian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -3161,7 +4113,11 @@ and may look very wrong.}
\def\Belarusiannumber#1{%
\ifcyrillic@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \belarusian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -3170,24 +4126,30 @@ and may look very wrong.}
\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\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\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}
+% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
+% 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@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@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
@@ -3232,16 +4194,19 @@ and may look very wrong.}
% 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,
@@ -3252,55 +4217,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{তথ্যসূত্রসমূহ}%
@@ -3355,13 +4300,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
@@ -3377,6 +4328,51 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-bengali.ldf>
+%<*gloss-bg.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-bg.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-bg.ldf}[polyglossia: module for bg (bulgarian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{bulgarian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-bg.ldf>
+%<*gloss-bn.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-bn.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-bn.ldf}[polyglossia: module for bn (bengali)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{bengali}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-bn.ldf>
+%<*gloss-bo.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-bo.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-bo.ldf}[polyglossia: module for bo (tibetan)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{tibetan}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-bo.ldf>
%<*gloss-bosnian.ldf>
% \fi
% \clearpage
@@ -3386,6 +4382,7 @@ and may look very wrong.}
\ProvidesFile{gloss-bosnian.ldf}[polyglossia: module for bosnian]
\PolyglossiaSetup{bosnian}{
+ bcp47=bs,
langtag=BOS,
hyphennames={bosnian,croatian},
hyphenmins={2,2}, % adapted from gloss-croatian
@@ -3394,6 +4391,9 @@ and may look very wrong.}
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{bosnian}{bs}
+
% TODO: Add script=Cyrillic
% from babel-bosnian
@@ -3431,6 +4431,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-bosnian.ldf>
+%<*gloss-br.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-br.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-br.ldf}[polyglossia: module for br (breton)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{breton}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-br.ldf>
%<*gloss-brazil.ldf>
% \fi
% \clearpage
@@ -3456,6 +4471,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-breton.ldf}[polyglossia: module for breton]
\PolyglossiaSetup{breton}{
+ bcp47=br,
hyphennames={breton},
hyphenmins={2,2},
langtag=BRE,
@@ -3464,6 +4480,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{breton}{br}
+
\ifluatex
% TODO
\else
@@ -3553,7 +4572,7 @@ and may look very wrong.}
%
% \subsection{gloss-british.ldf}
% \begin{macrocode}
-\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
@@ -3562,6 +4581,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-british.ldf>
+%<*gloss-bs.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-bs.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-bs.ldf}[polyglossia: module for bs (bosnian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{bosnian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-bs.ldf>
%<*gloss-bulgarian.ldf>
% \fi
% \clearpage
@@ -3570,6 +4604,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-bulgarian.ldf}[polyglossia: module for bulgarian]
\PolyglossiaSetup{bulgarian}{
+ bcp47=bg,
script=Cyrillic,
scripttag=cyrl,
langtag=BGR,
@@ -3580,6 +4615,9 @@ and may look very wrong.}
%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
@@ -3654,6 +4692,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-bulgarian.ldf>
+%<*gloss-ca.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ca.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ca.ldf}[polyglossia: module for ca (catalan)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{catalan}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ca.ldf>
%<*gloss-canadian.ldf>
% \fi
% \clearpage
@@ -3675,7 +4728,7 @@ and may look very wrong.}
%
% \subsection{gloss-canadien.ldf}
% \begin{macrocode}
-\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
@@ -3692,6 +4745,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan]
\PolyglossiaSetup{catalan}{
+ bcp47=ca,
hyphennames={catalan},
hyphenmins={2,2},
langtag=CAT,
@@ -3700,6 +4754,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{catalan}{ca}
+
\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
\ifsystem@babelshorthands
\setkeys{catalan}{babelshorthands=true}
@@ -3707,6 +4764,9 @@ and may look very wrong.}
\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{"}%
@@ -3715,33 +4775,21 @@ and may look very wrong.}
%%% 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%
@@ -3755,21 +4803,16 @@ and may look very wrong.}
\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%
@@ -3784,6 +4827,7 @@ and may look very wrong.}
\kern\rightllkern\hbox{L}}\allowhyphens
\fi
}
+
\AtBeginDocument{%
\let\lslash\l
\let\Lslash\L
@@ -3848,6 +4892,66 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-catalan.ldf>
+%<*gloss-ckb-Arab.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ckb-Arab.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ckb-Arab.ldf}[polyglossia: module for ckb-Arab (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ckb-Arab.ldf>
+%<*gloss-ckb-Latn.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ckb-Latn.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ckb-Latn.ldf}[polyglossia: module for ckb-Latn (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ckb-Latn.ldf>
+%<*gloss-ckb.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ckb.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ckb.ldf}[polyglossia: module for ckb (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ckb.ldf>
+%<*gloss-cop.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-cop.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-cop.ldf}[polyglossia: module for cop (coptic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{coptic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-cop.ldf>
%<*gloss-coptic.ldf>
% \fi
% \clearpage
@@ -3856,6 +4960,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-coptic.ldf}[polyglossia: module for coptic]
\PolyglossiaSetup{coptic}{
+ bcp47=cop,
script=Coptic,
scripttag=copt,
langtag=COP,
@@ -3864,6 +4969,9 @@ and may look very wrong.}
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{coptic}{cop}
+
%\def\captionscoptic{%
% \def\refname{<++>}%
% \def\abstractname{<++>}%
@@ -3903,6 +5011,7 @@ and may look very wrong.}
% \begin{macrocode}
\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
@@ -3911,12 +5020,134 @@ and may look very wrong.}
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}%
@@ -3934,15 +5165,59 @@ and may look very wrong.}
\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%
+}
% \end{macrocode}
% \iffalse
%</gloss-croatian.ldf>
+%<*gloss-cy.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-cy.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-cy.ldf}[polyglossia: module for cy (welsh)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{welsh}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-cy.ldf>
+%<*gloss-cz.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-cz.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-cz.ldf}[polyglossia: module for cz (czech)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{czech}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-cz.ldf>
%<*gloss-czech.ldf>
% \fi
% \clearpage
@@ -3952,6 +5227,7 @@ and may look very wrong.}
\ProvidesFile{gloss-czech.ldf}[polyglossia: module for czech]
\PolyglossiaSetup{czech}{
+ bcp47=cz,
hyphennames={czech},
hyphenmins={2,2},
langtag=CSY,
@@ -3959,6 +5235,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{czech}{cz}
+
\ifluatex
\RequirePackage{luavlna}
\fi
@@ -3969,7 +5248,8 @@ and may look very wrong.}
\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}
@@ -3984,8 +5264,12 @@ and may look very wrong.}
}{}
\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{%
@@ -4163,18 +5447,33 @@ and may look very wrong.}
\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%
}
% \end{macrocode}
% \iffalse
%</gloss-czech.ldf>
+%<*gloss-da.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-da.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-da.ldf}[polyglossia: module for da (danish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{danish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-da.ldf>
%<*gloss-danish.ldf>
% \fi
% \clearpage
@@ -4183,6 +5482,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-danish.ldf}[polyglossia: module for danish]
\PolyglossiaSetup{danish}{
+ bcp47=da,
hyphennames={danish},
hyphenmins={2,3},
langtag=DAN,
@@ -4190,6 +5490,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{danish}{da}
+
\def\captionsdanish{%
\def\prefacename{Forord}%
\def\refname{Litteratur}%
@@ -4223,6 +5526,306 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-danish.ldf>
+%<*gloss-de-AT-1901.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-AT-1901.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-AT-1901.ldf>
+%<*gloss-de-AT-1996.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-AT-1996.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-AT-1996.ldf>
+%<*gloss-de-AT.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-AT.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-de-AT.ldf}[polyglossia: module for de-AT (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-AT.ldf>
+%<*gloss-de-CH-1901.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-CH-1901.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-CH-1901.ldf>
+%<*gloss-de-CH-1996.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-CH-1996.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-CH-1996.ldf>
+%<*gloss-de-CH.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-CH.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-de-CH.ldf}[polyglossia: module for de-CH (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-CH.ldf>
+%<*gloss-de-DE-1901.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-DE-1901.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-DE-1901.ldf>
+%<*gloss-de-DE-1996.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-DE-1996.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-DE-1996.ldf>
+%<*gloss-de-DE.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-DE.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-de-DE.ldf}[polyglossia: module for de-DE (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-DE.ldf>
+%<*gloss-de-Latf-AT-1901.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-AT-1901.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-AT-1901.ldf>
+%<*gloss-de-Latf-AT-1996.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-AT-1996.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-AT-1996.ldf>
+%<*gloss-de-Latf-AT.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-AT.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-AT.ldf>
+%<*gloss-de-Latf-CH-1901.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-CH-1901.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-CH-1901.ldf>
+%<*gloss-de-Latf-CH-1996.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-CH-1996.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-CH-1996.ldf>
+%<*gloss-de-Latf-CH.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-CH.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-CH.ldf>
+%<*gloss-de-Latf-DE-1901.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-DE-1901.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-DE-1901.ldf>
+%<*gloss-de-Latf-DE-1996.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-DE-1996.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-DE-1996.ldf>
+%<*gloss-de-Latf-DE.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf-DE.ldf}
+% \begin{macrocode}
+\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}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf-DE.ldf>
+%<*gloss-de-Latf.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de-Latf.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-de-Latf.ldf}[polyglossia: module for de-Latf (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de-Latf.ldf>
+%<*gloss-de.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-de.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-de.ldf}[polyglossia: module for de (german)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{german}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-de.ldf>
%<*gloss-divehi.ldf>
% \fi
% \clearpage
@@ -4238,6 +5841,7 @@ and may look very wrong.}
\fi
\RequireBidi
\PolyglossiaSetup{divehi}{
+ bcp47=dv,
script=Thaana,
scripttag=thaa,
langtag=DIV,% TODO Support DHV as well?
@@ -4246,6 +5850,9 @@ and may look very wrong.}
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{divehi}{dv}
+
%\def\captionsdivehi{%
% \def\refname{<++>}%
% \def\abstractname{<++>}%
@@ -4287,6 +5894,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-divehi.ldf>
+%<*gloss-dsb.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-dsb.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-dsb.ldf}[polyglossia: module for dsb (sorbian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{sorbian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-dsb.ldf>
%<*gloss-dutch.ldf>
% \fi
% \clearpage
@@ -4295,6 +5917,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-dutch.ldf}[polyglossia: module for dutch]
\PolyglossiaSetup{dutch}{
+ bcp47=nl,
hyphennames={dutch},
hyphenmins={2,2},
langtag=NLD,
@@ -4302,8 +5925,14 @@ and may look very wrong.}
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
@@ -4381,6 +6010,156 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-dutch.ldf>
+%<*gloss-dv.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-dv.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-dv.ldf}[polyglossia: module for dv (divehi)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{divehi}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-dv.ldf>
+%<*gloss-el-monoton.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-el-monoton.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-el-monoton.ldf}[polyglossia: module for el-monoton (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-el-monoton.ldf>
+%<*gloss-el-polyton.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-el-polyton.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-el-polyton.ldf}[polyglossia: module for el-polyton (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-el-polyton.ldf>
+%<*gloss-el.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-el.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-el.ldf}[polyglossia: module for el (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-el.ldf>
+%<*gloss-en-AU.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-en-AU.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-en-AU.ldf}[polyglossia: module for en-AU (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-en-AU.ldf>
+%<*gloss-en-CA.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-en-CA.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-en-CA.ldf}[polyglossia: module for en-CA (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-en-CA.ldf>
+%<*gloss-en-GB.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-en-GB.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-en-GB.ldf}[polyglossia: module for en-GB (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-en-GB.ldf>
+%<*gloss-en-NZ.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-en-NZ.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-en-NZ.ldf}[polyglossia: module for en-NZ (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-en-NZ.ldf>
+%<*gloss-en-US.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-en-US.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-en-US.ldf}[polyglossia: module for en-US (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-en-US.ldf>
+%<*gloss-en.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-en.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-en.ldf}[polyglossia: module for en (english)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{english}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-en.ldf>
%<*gloss-english.ldf>
% \fi
% \clearpage
@@ -4390,12 +6169,21 @@ and may look very wrong.}
\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}
@@ -4417,41 +6205,41 @@ and may look very wrong.}
% 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
@@ -4466,8 +6254,9 @@ and may look very wrong.}
\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
@@ -4475,16 +6264,18 @@ and may look very wrong.}
\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}{}%
@@ -4496,6 +6287,12 @@ and may look very wrong.}
\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
@@ -4515,7 +6312,7 @@ and may look very wrong.}
\fi
\def\english@language{%
- \polyglossia@setup@language@patterns{\english@variant}
+ \polyglossia@setup@language@patterns{\english@variant}%
}%
\def\captionsenglish{%
@@ -4566,6 +6363,66 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-english.ldf>
+%<*gloss-eo.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-eo.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-eo.ldf}[polyglossia: module for eo (esperanto)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{esperanto}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-eo.ldf>
+%<*gloss-es-ES.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-es-ES.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-es-ES.ldf}[polyglossia: module for es-ES (spanish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{spanish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-es-ES.ldf>
+%<*gloss-es-MX.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-es-MX.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-es-MX.ldf}[polyglossia: module for es-MX (spanish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{spanish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-es-MX.ldf>
+%<*gloss-es.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-es.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-es.ldf}[polyglossia: module for es (spanish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{spanish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-es.ldf>
%<*gloss-esperanto.ldf>
% \fi
% \clearpage
@@ -4574,6 +6431,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-esperanto.ldf}[polyglossia: module for esperanto]
\PolyglossiaSetup{esperanto}{
+ bcp47=eo,
hyphennames={esperanto},
hyphenmins={2,2},
langtag=NTO,
@@ -4581,6 +6439,9 @@ and may look very wrong.}
%TODO localalph={esperanto@alph,esperanto@Alph}
}
+% BCP-47 compliant aliases
+\setlanguagealias*{esperanto}{eo}
+
\def\captionsesperanto{%
\def\refname{Citaĵoj}%
\def\abstractname{Resumo}%
@@ -4646,6 +6507,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-estonian.ldf}[polyglossia: module for estonian]
\PolyglossiaSetup{estonian}{
+ bcp47=et,
hyphennames={estonian},
hyphenmins={2,2},
langtag=ETI,
@@ -4653,6 +6515,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{estonian}{et}
+
\def\captionsestonian{%
\def\refname{Viited}%
\def\abstractname{Kokkuvõte}%
@@ -4686,6 +6551,51 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-estonian.ldf>
+%<*gloss-et.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-et.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-et.ldf}[polyglossia: module for et (estonian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{estonian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-et.ldf>
+%<*gloss-eu.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-eu.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-eu.ldf}[polyglossia: module for eu (basque)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{basque}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-eu.ldf>
+%<*gloss-fa.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fa.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fa.ldf}[polyglossia: module for fa (persian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{persian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fa.ldf>
%<*gloss-farsi.ldf>
% \fi
% \clearpage
@@ -4702,6 +6612,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-farsi.ldf>
+%<*gloss-fi.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fi.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fi.ldf}[polyglossia: module for fi (finnish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{finnish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fi.ldf>
%<*gloss-finnish.ldf>
% \fi
% \clearpage
@@ -4710,6 +6635,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-finnish.ldf}[polyglossia: module for finnish]
\PolyglossiaSetup{finnish}{
+ bcp47=fi,
hyphennames={finnish},
hyphenmins={2,2},
langtag=FIN,
@@ -4717,8 +6643,14 @@ and may look very wrong.}
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
@@ -4793,6 +6725,66 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-finnish.ldf>
+%<*gloss-fr-CA.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fr-CA.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fr-CA.ldf}[polyglossia: module for fr-CA (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fr-CA.ldf>
+%<*gloss-fr-CH.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fr-CH.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fr-CH.ldf}[polyglossia: module for fr-CH (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fr-CH.ldf>
+%<*gloss-fr-FR.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fr-FR.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fr-FR.ldf}[polyglossia: module for fr-FR (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fr-FR.ldf>
+%<*gloss-fr.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fr.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fr.ldf}[polyglossia: module for fr (french)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{french}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fr.ldf>
%<*gloss-french.ldf>
% \fi
% \clearpage
@@ -4802,6 +6794,7 @@ and may look very wrong.}
\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]
\PolyglossiaSetup{french}{%
+ bcp47=fr-FR,
language=French,
script=Latin,
langtag=FRA,
@@ -4811,46 +6804,63 @@ and may look very wrong.}
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 % » ›
@@ -4863,9 +6873,9 @@ and may look very wrong.}
\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%
@@ -4873,10 +6883,10 @@ and may look very wrong.}
}
\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
}%
}
@@ -4948,19 +6958,28 @@ and may look very wrong.}
\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
@@ -4993,12 +7012,13 @@ and may look very wrong.}
\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
@@ -5017,26 +7037,35 @@ and may look very wrong.}
\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}% "):" -> ") :"
@@ -5054,6 +7083,7 @@ and may look very wrong.}
\XeTeXcharclass `\⁇ \z@
\XeTeXcharclass `\⁈ \z@
\XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\‽ \z@
\XeTeXcharclass `\; \z@
\XeTeXcharclass `\: \z@
\XeTeXcharclass `\« \z@
@@ -5184,6 +7214,7 @@ and may look very wrong.}
\ProvidesFile{gloss-friulian.ldf}[polyglossia: module for friulian]
\PolyglossiaSetup{friulian}{%
+ bcp47=fur,
language=Friulian,
babelname=friulan,
hyphennames={friulan,furlan},
@@ -5194,6 +7225,9 @@ and may look very wrong.}
frenchspacing=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{friulian}{fur}
+
% Babel and backwards compat. alias
\setlanguagealias{friulian}{friulan}
@@ -5253,6 +7287,36 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-friulian.ldf>
+%<*gloss-fur.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-fur.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-fur.ldf}[polyglossia: module for fur (friulian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{friulian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-fur.ldf>
+%<*gloss-ga.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ga.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ga.ldf}[polyglossia: module for ga (gaelic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{gaelic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ga.ldf>
%<*gloss-gaelic.ldf>
% \fi
% \clearpage
@@ -5262,6 +7326,7 @@ and may look very wrong.}
\ProvidesFile{gloss-gaelic.ldf}[polyglossia: module for gaelic]
\PolyglossiaSetup{gaelic}{
+ bcp47=ga,
language=Irish,
babelname=irish,
hyphennames={irish},
@@ -5270,6 +7335,9 @@ and may look very wrong.}
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}
@@ -5279,17 +7347,20 @@ and may look very wrong.}
\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}%
@@ -5380,6 +7451,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-galician.ldf}[polyglossia: module for galician]
\PolyglossiaSetup{galician}{
+ bcp47=gl,
hyphennames={galician},
hyphenmins={2,2},
langtag=GAL,
@@ -5387,6 +7459,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{galician}{gl}
+
\def\captionsgalician{%
\def\refname{Referencias}%
\def\abstractname{Resumo}%
@@ -5420,6 +7495,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-galician.ldf>
+%<*gloss-gd.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-gd.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-gd.ldf}[polyglossia: module for gd (gaelic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{gaelic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-gd.ldf>
%<*gloss-georgian.ldf>
% \fi
% \clearpage
@@ -5429,6 +7519,7 @@ and may look very wrong.}
\ProvidesFile{gloss-georgian.ldf}[polyglossia: module for georgian]
\PolyglossiaSetup{georgian}{
+ bcp47=ka,
script=Georgian,
scripttag=geor,
langtag=KAT,
@@ -5437,6 +7528,9 @@ and may look very wrong.}
localnumeral=georgiannumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{georgian}{ka}
+
\newif\ifgeorgian@numerals
\define@key{georgian}{numerals}[arabic]{%
\ifstrequal{#1}{georgian}%
@@ -5448,6 +7542,9 @@ and may look very wrong.}
\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
@@ -5662,6 +7759,7 @@ and may look very wrong.}
\ProvidesFile{gloss-german.ldf}[polyglossia: module for german]
\PolyglossiaSetup{german}{
+ bcp47=de-DE,
hyphenmins={2,2},
frenchspacing=true,
fontsetup=true,
@@ -5669,6 +7767,28 @@ and may look very wrong.}
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}
@@ -5679,7 +7799,7 @@ and may look very wrong.}
\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
@@ -5689,6 +7809,9 @@ and may look very wrong.}
\or
% 1901:
\@german@oldspellingtrue
+ \or
+ % 1996:
+ \@german@oldspellingfalse
\fi
\german@set@babelname%
\xpg@info{Option: German, spelling=\val}%
@@ -5725,21 +7848,45 @@ and may look very wrong.}
\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
}
@@ -5756,14 +7903,24 @@ and may look very wrong.}
% 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}
@@ -5890,26 +8047,23 @@ and may look very wrong.}
}
\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
}
@@ -5943,6 +8097,36 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-germanb.ldf>
+%<*gloss-gl.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-gl.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-gl.ldf}[polyglossia: module for gl (galician)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{galician}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-gl.ldf>
+%<*gloss-grc.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-grc.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-grc.ldf}[polyglossia: module for grc (greek)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{greek}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-grc.ldf>
%<*gloss-greek.ldf>
% \fi
% \clearpage
@@ -5952,6 +8136,7 @@ and may look very wrong.}
\ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek]
\PolyglossiaSetup{greek}{
+ bcp47=el-monoton,
script=Greek,
scripttag=grek,
langtag=ELL,
@@ -5963,6 +8148,12 @@ and may look very wrong.}
%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}
@@ -5999,7 +8190,7 @@ and may look very wrong.}
\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
@@ -6010,6 +8201,7 @@ and may look very wrong.}
\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}{}%
@@ -6019,12 +8211,13 @@ and may look very wrong.}
\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}%
}
@@ -6035,8 +8228,11 @@ and may look very wrong.}
\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{Αναφορές}%
@@ -6347,6 +8543,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-greek.ldf>
+%<*gloss-he.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-he.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-he.ldf}[polyglossia: module for he (hebrew)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{hebrew}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-he.ldf>
%<*gloss-hebrew.ldf>
% \fi
% \clearpage
@@ -6364,6 +8575,7 @@ and may look very wrong.}
\RequirePackage{hebrewcal}
\PolyglossiaSetup{hebrew}{
+ bcp47=he,
script=Hebrew,
direction=RL,
scripttag=hebr,
@@ -6375,6 +8587,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]{%
@@ -6405,6 +8620,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{מקורות}%
@@ -6459,19 +8677,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
@@ -6496,6 +8740,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-hebrew.ldf>
+%<*gloss-hi.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-hi.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-hi.ldf}[polyglossia: module for hi (hindi)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{hindi}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-hi.ldf>
%<*gloss-hindi.ldf>
% \fi
% \clearpage
@@ -6510,6 +8769,7 @@ and may look very wrong.}
\ProvidesFile{gloss-hindi.ldf}[polyglossia: module for hindi]
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{hindi}{
+ bcp47=hi,
script=Devanagari,
scripttag=deva,
langtag=HIN,
@@ -6519,6 +8779,9 @@ and may look very wrong.}
%TODO nouppercase=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{hindi}{hi}
+
\ifx\l@hindi\@undefined%
\ifx\l@sanskrit\@undefined%
\xpg@nopatterns{Hindi}%
@@ -6542,7 +8805,11 @@ and may look very wrong.}
\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}}
@@ -6611,6 +8878,51 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-hindi.ldf>
+%<*gloss-hr.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-hr.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-hr.ldf}[polyglossia: module for hr (croatian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{croatian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-hr.ldf>
+%<*gloss-hsb.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-hsb.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-hsb.ldf}[polyglossia: module for hsb (sorbian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{sorbian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-hsb.ldf>
+%<*gloss-hu.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-hu.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-hu.ldf}[polyglossia: module for hu (hungarian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{hungarian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-hu.ldf>
%<*gloss-hungarian.ldf>
% \fi
% \clearpage
@@ -6620,6 +8932,7 @@ and may look very wrong.}
\ProvidesFile{gloss-hungarian.ldf}[polyglossia: module for hungarian]
\PolyglossiaSetup{hungarian}{
+ bcp47=hu,
babelname=magyar,
hyphennames={hungarian,magyar},
langtag=HUN,
@@ -6627,6 +8940,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{hungarian}{hu}
+
\frenchspacing
% Babel and backwards compat. alias
@@ -6670,7 +8986,13 @@ and may look very wrong.}
\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}%
@@ -6741,81 +9063,81 @@ and may look very wrong.}
% 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]{%
@@ -6826,18 +9148,21 @@ and may look very wrong.}
\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)
}
@@ -6848,50 +9173,50 @@ and may look very wrong.}
\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{%
@@ -6906,6 +9231,36 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-hungarian.ldf>
+%<*gloss-hy.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-hy.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-hy.ldf}[polyglossia: module for hy (armenian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{armenian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-hy.ldf>
+%<*gloss-ia.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ia.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ia.ldf}[polyglossia: module for ia (interlingua)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{interlingua}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ia.ldf>
%<*gloss-icelandic.ldf>
% \fi
% \clearpage
@@ -6914,12 +9269,16 @@ and may look very wrong.}
% \begin{macrocode}
\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}%
@@ -6956,6 +9315,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-icelandic.ldf>
+%<*gloss-id.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-id.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-id.ldf}[polyglossia: module for id (malay)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{malay}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-id.ldf>
%<*gloss-interlingua.ldf>
% \fi
% \clearpage
@@ -6964,6 +9338,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-interlingua.ldf}[polyglossia: module for interlingua]
\PolyglossiaSetup{interlingua}{
+ bcp47=ia,
hyphennames={interlingua},
hyphenmins={2,2},
langtag=INA,
@@ -6972,6 +9347,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{interlingua}{ia}
+
\def\captionsinterlingua{%
\def\refname{Referentias}%
\def\abstractname{Summario}%
@@ -7022,6 +9400,36 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-irish.ldf>
+%<*gloss-is.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-is.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-is.ldf}[polyglossia: module for is (icelandic)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{icelandic}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-is.ldf>
+%<*gloss-it.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-it.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-it.ldf}[polyglossia: module for it (italian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{italian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-it.ldf>
%<*gloss-italian.ldf>
% \fi
% \clearpage
@@ -7031,6 +9439,7 @@ and may look very wrong.}
% !TEX encoding = UTF-8 Unicode
\ProvidesFile{gloss-italian.ldf}[polyglossia: module for italian]
\PolyglossiaSetup{italian}{
+ bcp47=it,
hyphennames={italian},
hyphenmins={2,2},
langtag=ITA,
@@ -7039,10 +9448,16 @@ and may look very wrong.}
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
@@ -7163,6 +9578,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-italian.ldf>
+%<*gloss-ja.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ja.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ja.ldf}[polyglossia: module for ja (japanese)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{japanese}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ja.ldf>
%<*gloss-japanese.ldf>
% \fi
% \clearpage
@@ -7170,21 +9600,27 @@ and may look very wrong.}
% \subsection{gloss-japanese.ldf}
% \begin{macrocode}
\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}%
@@ -7224,33 +9660,33 @@ and may look very wrong.}
\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%
@@ -7260,7 +9696,7 @@ and may look very wrong.}
六百\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 九千%
@@ -7277,7 +9713,7 @@ and may look very wrong.}
\fi
}
-\def\@japanesenumber#1{
+\def\@japanesenumber#1{%
\@tempcnta=#1%
\ifnum\@tempcnta=\z@{〇}%
\else
@@ -7310,12 +9746,14 @@ and may look very wrong.}
\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
@@ -7334,14 +9772,14 @@ and may look very wrong.}
\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%
@@ -7368,8 +9806,8 @@ and may look very wrong.}
\else
\,\number\day\,%
\fi
- {日}
- }
+ {日}%
+ }%
}
\def\noextras@japanese{%
@@ -7388,6 +9826,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-japanese.ldf>
+%<*gloss-ka.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ka.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ka.ldf}[polyglossia: module for ka (georgian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{georgian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ka.ldf>
%<*gloss-kannada.ldf>
% \fi
% \clearpage
@@ -7420,6 +9873,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,
@@ -7429,6 +9883,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{%
@@ -7514,166 +9971,257 @@ and may look very wrong.}
%
% \subsection{gloss-khmer.ldf}
% \begin{macrocode}
-\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
-\PolyglossiaSetup{khmer}{
- script=Khmer,%
- scripttag=khmr,%
- langtag=KHM,%
- hyphennames={nohyphenation},%
- fontsetup=true,%
- localnumeral=khmernumerals%
-}
-\newif\if@khmer@numerals
-\def\tmp@khmer{khmer}
-\define@key{khmer}{numerals}[arabic]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue%
- \else\@khmer@numeralsfalse\fi%
-}
-\setkeys{khmer}{numerals}
-\def\captionskhmer{%
- \def\prefacename{អារម្ភកថា}%
- \def\refname{ឯកសារយោង}%
- \def\abstractname{សង្ខេប}%
- \def\bibname{គន្ថនិទ្ទេស}%
- \def\chaptername{ជំពូក}%
- \def\appendixname{សេចក្ដីបន្ថែម}%
- \def\contentsname{មាតិការ}%
- \def\listfigurename{បញ្ជីរូបភាព}%
- \def\listtablename{បញ្ជីតារាង}%
- \def\indexname{សន្ទស្សន៍}%
- \def\figurename{រូប}%
- \def\tablename{តារាង}%
- \def\partname{ផ្នែក}%
- \def\pagename{ទំព័រ}%
- \def\seename{មើល}%
- \def\alsoname{មើលបន្ថែម}%
- \def\enclname{ឯកសារភ្ជាប់}%
- \def\ccname{ចម្លងជួន}%
- \def\headtoname{ផ្ញើរទៅ}%
- \def\proofname{សម្រាយ}%
- \def\glossaryname{សទានុក្រម}%
-}
-\def\datekhmer{%
- \def\khmer@month{%
- \ifcase\month\or%
- មករា\or%
- កុម្ភៈ\or%
- មិនា\or%
- មេសា\or%
- ឧសភា\or%
- មិថុនា\or%
- កក្កដា\or%
- សីហា\or%
- កញ្ញា\or%
- តុលា\or%
- វិច្ឆិកា\or%
- ធ្នូ\fi}%
- \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}%
-}
-\def\khmerdigits#1{\expandafter\@khmer@digits #1@}
-\def\@khmer@digits#1{%
- \ifx @#1% then terminate
- \else\ifx0#1០%
- \else\ifx1#1១%
- \else\ifx2#1២%
- \else\ifx3#1៣%
- \else\ifx4#1៤%
- \else\ifx5#1៥%
- \else\ifx6#1៦%
- \else\ifx7#1៧%
- \else\ifx8#1៨%
- \else\ifx9#1៩%
- \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \expandafter\@khmer@digits%
- \fi
-}
-
-\newcommand{\khmernumerals}[2]{\khmernumber{#2}}
-
-\def\khmernumber#1{%
- \if@khmer@numerals%
- \khmerdigits{\number#1}%
- \else%
- \number#1%
- \fi}
-\def\khmer@globalnumbers{%
- \let\orig@arabic\@arabic%
- \let\@arabic\khmernumber%
- \renewcommand{\thefootnote}{\localnumeral*{footnote}}%
-}
-\def\nokhmer@globalnumbers{%
- \let\@arabic\orig@arabic%
-}
-\def\thepart{\arabic{part}}
-\def\@khmeralph#1{%
-\ifcase#1%
-\or ក\or ខ\or គ\or ឃ\or ង%
-\or ច\or ឆ\or ជ\or ឈ\or ញ%
-\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
-\or ត\or ថ\or ទ\or ធ\or ន%
-\or ប\or ផ\or ព\or ភ\or ម%
-\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
-\else\xpg@ill@value{#1}{@khmeralph}\fi}
-\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname}
-\def\@khmerAlph#1{%
-\ifcase#1%
-\or ក\or ខ\or គ\or ឃ\or ង%
-\or ច\or ឆ\or ជ\or ឈ\or ញ%
-\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
-\or ត\or ថ\or ទ\or ធ\or ន%
-\or ប\or ផ\or ព\or ភ\or ម%
-\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
-\else\xpg@ill@value{#1}{@khmeralph}\fi}
-\def\khmer@numbers{%
- \if@khmer@numerals
- \let\@alph\@khmeralph%
- \let\@Alph\@khmerAlph%
- \fi%
-}
-\def\nokhmer@numbers{%
- \let\@alph\latin@alph%
- \let\@Alph\latin@Alph%
-}
-\def\blockextras@khmer{%
- \XeTeXlinebreaklocale "kh" %
- \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt
-% \let\orig@baselinestretch\baselinestretch%
-% \renewcommand{\baselinestretch}{1.2}% not work
-}
-\def\noblockextras@khmer{%
- \XeTeXlinebreaklocale "en"%
-% \let\baselinestretch\orig@baselinestretch%
-}
-\@ifclassloaded{beamer}{%
- \usefonttheme{professionalfonts}%
- \def\factname{ស្វ័យសត្យ}%
- \def\lemmaname{បទគន្លិះ}%
- \def\theoremname{ទ្រឹស្ដីបទ}%
- \def\corollaryname{អនុសាធ្យ}%
- \def\problemname{ចំណោទ}%
- \def\solutionname{ដំណោះស្រាយ}%
- \def\definitionname{និយមន័យ}%
- \def\examplename{ឧទាហរណ៏}%
- \uselanguage{khmer}%
- \languagepath{khmer}%
- \deftranslation[to=khmer]{Fact}{\factname}%
- \deftranslation[to=khmer]{Lemma}{\lemmaname}%
- \deftranslation[to=khmer]{Theorem}{\theoremname}%
- \deftranslation[to=khmer]{Corollary}{\corollaryname}%
- \deftranslation[to=khmer]{Problem}{\problemname}%
- \deftranslation[to=khmer]{Solution}{\solutionname}%
- \deftranslation[to=khmer]{Definition}{\definitionname}%
- \deftranslation[to=khmer]{Definitions}{\definitionname}%
- \deftranslation[to=khmer]{Example}{\examplename}%
- \deftranslation[to=khmer]{Examples}{\examplename}%
- \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
- {\noexpand\headcommand{\noexpand\def\noexpand%
- \inserttotalframenumber{\localnumeral*{framenumber}}}}}}%
-}{}
+\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
+\PolyglossiaSetup{khmer}{
+ bcp47=km,
+ script=Khmer,%
+ scripttag=khmr,%
+ langtag=KHM,%
+ hyphennames={nohyphenation},%
+ fontsetup=true,%
+ localnumeral=khmernumerals%
+}
+\newif\if@khmer@numerals
+\def\tmp@khmer{khmer}
+\define@key{khmer}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue%
+ \else\@khmer@numeralsfalse\fi%
+}
+\setkeys{khmer}{numerals}
+\def\captionskhmer{%
+ \def\prefacename{អារម្ភកថា}%
+ \def\refname{ឯកសារយោង}%
+ \def\abstractname{សង្ខេប}%
+ \def\bibname{គន្ថនិទ្ទេស}%
+ \def\chaptername{ជំពូក}%
+ \def\appendixname{សេចក្ដីបន្ថែម}%
+ \def\contentsname{មាតិការ}%
+ \def\listfigurename{បញ្ជីរូបភាព}%
+ \def\listtablename{បញ្ជីតារាង}%
+ \def\indexname{សន្ទស្សន៍}%
+ \def\figurename{រូប}%
+ \def\tablename{តារាង}%
+ \def\partname{ផ្នែក}%
+ \def\pagename{ទំព័រ}%
+ \def\seename{មើល}%
+ \def\alsoname{មើលបន្ថែម}%
+ \def\enclname{ឯកសារភ្ជាប់}%
+ \def\ccname{ចម្លងជួន}%
+ \def\headtoname{ផ្ញើរទៅ}%
+ \def\proofname{សម្រាយ}%
+ \def\glossaryname{សទានុក្រម}%
+}
+\def\datekhmer{%
+ \def\khmer@month{%
+ \ifcase\month\or%
+ មករា\or%
+ កុម្ភៈ\or%
+ មិនា\or%
+ មេសា\or%
+ ឧសភា\or%
+ មិថុនា\or%
+ កក្កដា\or%
+ សីហា\or%
+ កញ្ញា\or%
+ តុលា\or%
+ វិច្ឆិកា\or%
+ ធ្នូ\fi}%
+ \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}%
+}
+\def\khmerdigits#1{\expandafter\@khmer@digits #1@}
+\def\@khmer@digits#1{%
+ \ifx @#1% then terminate
+ \else\ifx0#1០%
+ \else\ifx1#1១%
+ \else\ifx2#1២%
+ \else\ifx3#1៣%
+ \else\ifx4#1៤%
+ \else\ifx5#1៥%
+ \else\ifx6#1៦%
+ \else\ifx7#1៧%
+ \else\ifx8#1៨%
+ \else\ifx9#1៩%
+ \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\@khmer@digits%
+ \fi
+}
+
+\newcommand{\khmernumerals}[2]{\khmernumber{#2}}
+
+\def\khmernumber#1{%
+ \if@khmer@numerals%
+ \khmerdigits{\number#1}%
+ \else%
+ \number#1%
+ \fi}
+\def\khmer@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\khmernumber%
+ \renewcommand{\thefootnote}{\localnumeral*{footnote}}%
+}
+\def\nokhmer@globalnumbers{%
+ \let\@arabic\orig@arabic%
+}
+\def\thepart{\arabic{part}}
+\def\@khmeralph#1{%
+\ifcase#1%
+\or ក\or ខ\or គ\or ឃ\or ង%
+\or ច\or ឆ\or ជ\or ឈ\or ញ%
+\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
+\or ត\or ថ\or ទ\or ធ\or ន%
+\or ប\or ផ\or ព\or ភ\or ម%
+\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname}
+\def\@khmerAlph#1{%
+\ifcase#1%
+\or ក\or ខ\or គ\or ឃ\or ង%
+\or ច\or ឆ\or ជ\or ឈ\or ញ%
+\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
+\or ត\or ថ\or ទ\or ធ\or ន%
+\or ប\or ផ\or ព\or ភ\or ម%
+\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmer@numbers{%
+ \if@khmer@numerals
+ \let\@alph\@khmeralph%
+ \let\@Alph\@khmerAlph%
+ \fi%
+}
+\def\nokhmer@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+}
+\def\blockextras@khmer{%
+ \XeTeXlinebreaklocale "kh" %
+ \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt
+% \let\orig@baselinestretch\baselinestretch%
+% \renewcommand{\baselinestretch}{1.2}% not work
+}
+\def\noblockextras@khmer{%
+ \XeTeXlinebreaklocale "en"%
+% \let\baselinestretch\orig@baselinestretch%
+}
+\@ifclassloaded{beamer}{%
+ \usefonttheme{professionalfonts}%
+ \def\factname{ស្វ័យសត្យ}%
+ \def\lemmaname{បទគន្លិះ}%
+ \def\theoremname{ទ្រឹស្ដីបទ}%
+ \def\corollaryname{អនុសាធ្យ}%
+ \def\problemname{ចំណោទ}%
+ \def\solutionname{ដំណោះស្រាយ}%
+ \def\definitionname{និយមន័យ}%
+ \def\examplename{ឧទាហរណ៏}%
+ \uselanguage{khmer}%
+ \languagepath{khmer}%
+ \deftranslation[to=khmer]{Fact}{\factname}%
+ \deftranslation[to=khmer]{Lemma}{\lemmaname}%
+ \deftranslation[to=khmer]{Theorem}{\theoremname}%
+ \deftranslation[to=khmer]{Corollary}{\corollaryname}%
+ \deftranslation[to=khmer]{Problem}{\problemname}%
+ \deftranslation[to=khmer]{Solution}{\solutionname}%
+ \deftranslation[to=khmer]{Definition}{\definitionname}%
+ \deftranslation[to=khmer]{Definitions}{\definitionname}%
+ \deftranslation[to=khmer]{Example}{\examplename}%
+ \deftranslation[to=khmer]{Examples}{\examplename}%
+ \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
+ {\noexpand\headcommand{\noexpand\def\noexpand%
+ \inserttotalframenumber{\localnumeral*{framenumber}}}}}}%
+}{}
% \end{macrocode}
% \iffalse
%</gloss-khmer.ldf>
+%<*gloss-km.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-km.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-km.ldf}[polyglossia: module for km (khmer)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{khmer}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-km.ldf>
+%<*gloss-kmr-Arab.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-kmr-Arab.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-kmr-Arab.ldf}[polyglossia: module for kmr-Arab (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-kmr-Arab.ldf>
+%<*gloss-kmr-Latn.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-kmr-Latn.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-kmr-Latn.ldf}[polyglossia: module for kmr-Latn (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-kmr-Latn.ldf>
+%<*gloss-kmr.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-kmr.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-kmr.ldf}[polyglossia: module for kmr (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-kmr.ldf>
+%<*gloss-kn.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-kn.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-kn.ldf}[polyglossia: module for kn (kannada)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kannada}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-kn.ldf>
+%<*gloss-ko.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ko.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ko.ldf}[polyglossia: module for ko (korean)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{korean}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ko.ldf>
%<*gloss-korean.ldf>
% \fi
% \clearpage
@@ -7683,6 +10231,7 @@ and may look very wrong.}
\ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean]
\PolyglossiaSetup{korean}{
+ bcp47=ko,
script=Hangul,
scripttag=hang,
language=Korean,
@@ -7692,6 +10241,9 @@ and may look very wrong.}
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
@@ -7700,7 +10252,32 @@ and may look very wrong.}
\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
@@ -7713,7 +10290,7 @@ and may look very wrong.}
}
\def\captions@korean@hangul{%
\def\koreanTHEname{제}%
- \def\partname##1##2{제##1##2 편}%
+ \def\partname{편}%
\def\chaptername{장}%
\def\refname{참고문헌}%
\def\abstractname{요약}%
@@ -7731,10 +10308,11 @@ and may look very wrong.}
\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{要約}%
@@ -7752,6 +10330,217 @@ and may look very wrong.}
\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{%
@@ -7827,17 +10616,11 @@ and may look very wrong.}
\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
@@ -7871,6 +10654,51 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-korean.ldf>
+%<*gloss-ku-Arab.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ku-Arab.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ku-Arab.ldf}[polyglossia: module for ku-Arab (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ku-Arab.ldf>
+%<*gloss-ku-Latn.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ku-Latn.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ku-Latn.ldf}[polyglossia: module for ku-Latn (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ku-Latn.ldf>
+%<*gloss-ku.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ku.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ku.ldf}[polyglossia: module for ku (kurdish)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ku.ldf>
%<*gloss-kurdish.ldf>
% \fi
% \clearpage
@@ -7887,6 +10715,7 @@ and may look very wrong.}
\RequirePackage{hijrical}
\PolyglossiaSetup{kurdish}{
+ bcp47=ckb,
script=Arabic,
direction=RL,
scripttag=arab,
@@ -7896,6 +10725,17 @@ and may look very wrong.}
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}
@@ -7942,9 +10782,9 @@ and may look very wrong.}
\@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}%
@@ -7952,20 +10792,20 @@ and may look very wrong.}
\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
@@ -7997,7 +10837,8 @@ and may look very wrong.}
%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}%
@@ -8204,19 +11045,9 @@ and may look very wrong.}
\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
}
@@ -8266,6 +11097,81 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-kurdish.ldf>
+%<*gloss-kurmanji.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-kurmanji.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-kurmanji.ldf}[polyglossia: module for kurmanji kurdish]
+
+% We provide this gloss for babel compatibility.
+
+\xpg@load@master@language{kurdish}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-kurmanji.ldf>
+%<*gloss-la-x-classic.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-la-x-classic.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-la-xclassic.ldf}[polyglossia: module for la-xclassic (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-la-x-classic.ldf>
+%<*gloss-la-x-ecclesia.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-la-x-ecclesia.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-la-xecclesiastic.ldf}[polyglossia: module for la-xecclesiastic (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-la-x-ecclesia.ldf>
+%<*gloss-la-x-medieval.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-la-x-medieval.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-la-xmedieval.ldf}[polyglossia: module for la-xmedieval (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-la-x-medieval.ldf>
+%<*gloss-la.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-la.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-la.ldf}[polyglossia: module for la (latin)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-la.ldf>
%<*gloss-lao.ldf>
% \fi
% \clearpage
@@ -8280,6 +11186,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,
@@ -8291,6 +11198,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]{%
@@ -8299,7 +11209,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{%
@@ -8420,23 +11331,29 @@ and may look very wrong.}
%
% \subsection{gloss-latin.ldf}
% \begin{macrocode}
-\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
@@ -8469,8 +11386,7 @@ and may look very wrong.}
\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}
@@ -8486,11 +11402,23 @@ and may look very wrong.}
\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 }
+ }
}
}
@@ -8502,19 +11430,22 @@ and may look very wrong.}
\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:
}
}
@@ -8528,7 +11459,8 @@ and may look very wrong.}
\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
@@ -8559,14 +11491,15 @@ and may look very wrong.}
}
{
\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
@@ -8580,13 +11513,28 @@ and may look very wrong.}
\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:
}
@@ -8600,18 +11548,38 @@ and may look very wrong.}
{
\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:
}
@@ -8620,8 +11588,13 @@ and may look very wrong.}
{
\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:
}
@@ -8646,6 +11619,7 @@ and may look very wrong.}
\XeTeXcharclass `\⁇ \z@
\XeTeXcharclass `\⁈ \z@
\XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\‽ \z@
\XeTeXcharclass `\; \z@
\XeTeXcharclass `\: \z@
\XeTeXcharclass `\« \z@
@@ -8701,7 +11675,9 @@ and may look very wrong.}
}
}
{
- \msg_warning:nn {polyglossia} {latin / ineffective footnote option}
+ \iflatin@ecclesiasticfootnotes
+ \msg_warning:nn {polyglossia} {latin / ineffective footnote option}
+ \fi
}
}
@@ -8723,6 +11699,8 @@ and may look very wrong.}
%%%%% 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:.
@@ -8740,7 +11718,8 @@ and may look very wrong.}
\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}
}
@@ -8751,7 +11730,8 @@ and may look very wrong.}
\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:
}
@@ -8762,7 +11742,8 @@ and may look very wrong.}
\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:
}
@@ -8773,7 +11754,8 @@ and may look very wrong.}
\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:
}
@@ -8841,7 +11823,7 @@ and may look very wrong.}
The~Latin~hyphenation~variant~"#1"~is~undefined~\msg_line_context:.
}
-\define@key{latin}{hyphenation}
+\define@key {latin} {hyphenation}
{
\str_case:nnTF {#1}
{
@@ -8940,6 +11922,11 @@ and may look very wrong.}
{
}
+% 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
@@ -9322,7 +12309,7 @@ and may look very wrong.}
%% 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
@@ -9400,12 +12387,16 @@ and may look very wrong.}
% \begin{macrocode}
\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}%
@@ -9451,6 +12442,7 @@ and may look very wrong.}
\ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian]
\PolyglossiaSetup{lithuanian}{
+ bcp47=lt,
hyphennames={lithuanian},
hyphenmins={2,2},
langtag=LTH,
@@ -9458,6 +12450,9 @@ and may look very wrong.}
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{lithuanian}{lt}
+
\def\captionslithuanian{%
\def\prefacename{Pratarmė}%
\def\refname{Literatūra}%
@@ -9514,6 +12509,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-lithuanian.ldf>
+%<*gloss-lo.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-lo.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-lo.ldf}[polyglossia: module for lo (lao)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{lao}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-lo.ldf>
%<*gloss-lowersorbian.ldf>
% \fi
% \clearpage
@@ -9545,6 +12555,36 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-lsorbian.ldf>
+%<*gloss-lt.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-lt.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-lt.ldf}[polyglossia: module for lt (lithuanian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{lithuanian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-lt.ldf>
+%<*gloss-lv.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-lv.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-lv.ldf}[polyglossia: module for lv (latvian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{latvian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-lv.ldf>
%<*gloss-macedonian.ldf>
% \fi
% \clearpage
@@ -9553,6 +12593,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-macedonian.ldf}[polyglossia: module for macedonian]
\PolyglossiaSetup{macedonian}{
+ bcp47=mk,
script=Cyrillic,
scripttag=cyrl,
langtag=MKD,
@@ -9562,6 +12603,9 @@ and may look very wrong.}
fontsetup
}
+% BCP-47 compliant aliases
+\setlanguagealias*{macedonian}{mk}
+
\def\macedonian@Alph#1{%
\ifcase#1\or
А\or Б\or В\or Г\or Д\or Ѓ\or Е\or
@@ -9662,11 +12706,17 @@ and may look very wrong.}
\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}
@@ -9689,7 +12739,7 @@ and may look very wrong.}
\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
@@ -9707,7 +12757,7 @@ and may look very wrong.}
}%
}%
\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
@@ -9728,6 +12778,9 @@ and may look very wrong.}
\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}%
@@ -9853,6 +12906,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"
@@ -9861,6 +12915,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{malayalam}{ml}
+
\def\captionsmalayalam{%
\def\abstractname{സാരാംശം}%
\def\appendixname{ശിഷ്ടം}%
@@ -9911,6 +12968,7 @@ and may look very wrong.}
% \subsection{gloss-marathi.ldf}
% \begin{macrocode}
% 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]
@@ -9923,6 +12981,7 @@ and may look very wrong.}
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{marathi}{
+ bcp47=mr,
script=Devanagari,
scripttag=deva,
langtag=MAR,
@@ -9933,15 +12992,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}}
@@ -9950,55 +13019,155 @@ 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%
}
% \end{macrocode}
% \iffalse
%</gloss-marathi.ldf>
+%<*gloss-mk.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-mk.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-mk.ldf}[polyglossia: module for mk (macedonian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{macedonian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-mk.ldf>
+%<*gloss-ml.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ml.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-ml.ldf}[polyglossia: module for ml (malayalam)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{malayalam}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ml.ldf>
+%<*gloss-mn.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-mn.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-mn.ldf}[polyglossia: module for mn (mongolian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{mongolian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-mn.ldf>
%<*gloss-mongolian.ldf>
% \fi
% \clearpage
@@ -10010,6 +13179,7 @@ and may look very wrong.}
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{mongolian}{
+ bcp47=mn,
script=Cyrillic,
scripttag=cyrl,
langtag=MNG,
@@ -10021,6 +13191,9 @@ and may look very wrong.}
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
@@ -10028,15 +13201,32 @@ and may look very wrong.}
% 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}
@@ -10131,7 +13321,11 @@ and may look very wrong.}
\def\mongoliannumber#1{%
\ifcyrillic@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \mongolian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -10139,7 +13333,11 @@ and may look very wrong.}
\def\Mongoliannumber#1{%
\ifcyrillic@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \mongolian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -10148,24 +13346,29 @@ and may look very wrong.}
\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}
+% 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@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@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
@@ -10200,6 +13403,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-mongolian.ldf>
+%<*gloss-mr.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-mr.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-mr.ldf}[polyglossia: module for mr (marathi)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{marathi}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-mr.ldf>
%<*gloss-naustrian.ldf>
% \fi
% \clearpage
@@ -10215,6 +13433,21 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-naustrian.ldf>
+%<*gloss-nb.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-nb.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-nb.ldf}[polyglossia: module for nb (norwegian)]
+
+% We provide this as a bcp47-compliant alias
+
+\xpg@load@master@language{norwegian}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-nb.ldf>
%<*gloss-newzealand.ldf>
% \fi
% \clearpage
@@ -10253,6 +13486,7 @@ and may look very wrong.}
% \begin{macrocode}
\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,
@@ -10261,6 +13495,7 @@ and may look very wrong.}
direction=RL,
localnumeral=nkonumerals
}
+
\RequirePackage{nkonumbers}%
\newcommand{\nkonumerals}[2]{\nkonumber{#2}}
@@ -10361,6 +13596,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-norwegian.ldf}[polyglossia: module for norwegian]
\PolyglossiaSetup{norwegian}{
+ bcp47=nn,
hyphennames={nynorsk},
langtag=NYN,
hyphenmins={2,2},
@@ -10368,6 +13604,9 @@ and may look very wrong.}
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}
@@ -10377,20 +13616,24 @@ and may look very wrong.}
\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{%
@@ -10525,6 +13768,7 @@ and may look very wrong.}
\ProvidesFile{gloss-occitan.ldf}[2016/02/04 v0.3 polyglossia:
module for Occitan]
\PolyglossiaSetup{occitan}{
+ bcp47=oc,
hyphennames={occitan},
langtag=OCI,
hyphenmins={2,2},
@@ -10532,6 +13776,10 @@ and may look very wrong.}
indentfirst=true,
fontsetup=true,
}
+
+% BCP-47 compliant aliases
+\setlanguagealias*{occitan}{oc}
+
\define@boolkey{occitan}[occitan@]{babelshorthands}[true]{}
\ifsystem@babelshorthands
@@ -10687,6 +13935,7 @@ and may look very wrong.}
\RequirePackage{farsical}
\RequirePackage{hijrical}
\PolyglossiaSetup{persian}{
+ bcp47=fa,
babelname=farsi,
script=Arabic,
direction=RL,
@@ -10697,6 +13946,9 @@ and may look very wrong.}
localnumeral=farsinumerals
}
+% BCP-47 compliant aliases
+\setlanguagealias*{persian}{fa}
+
% Babel and backwards compat. alias
\setlanguagealias{persian}{farsi}
@@ -10723,7 +13975,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}
@@ -10764,28 +14017,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
}
@@ -10841,6 +14079,7 @@ and may look very wrong.}
\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,
@@ -10848,6 +14087,8 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{piedmontese}{pms}
\define@boolkey{piedmontese}[piedmontese@]{babelshorthands}[true]{}
@@ -10963,6 +14204,7 @@ and may look very wrong.}
% \begin{macrocode}
\ProvidesFile{gloss-polish.ldf}[polyglossia: module for polish]
\PolyglossiaSetup{polish}{
+ bcp47=pl,
hyphennames={polish},
hyphenmins={2,2},
langtag=PLK,
@@ -10970,6 +14212,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{polish}{pl}
+
\def\captionspolish{%
\def\prefacename{Przedmowa}%
\def\refname{Literatura}%
@@ -11047,6 +14292,7 @@ and may look very wrong.}
\ProvidesFile{gloss-portuguese.ldf}[polyglossia: module for portuguese]
\PolyglossiaSetup{portuguese}{
+ bcp47=pt-PT,
babelname=portuges,
hyphennames={portuges,portuguese},
hyphenmins={2,3},
@@ -11054,6 +14300,11 @@ and may look very wrong.}
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}
@@ -11063,11 +14314,11 @@ and may look very wrong.}
\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}%
@@ -11077,8 +14328,12 @@ and may look very wrong.}
}{\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{%
@@ -11164,12 +14419,16 @@ and may look very wrong.}
\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}%
@@ -11215,6 +14474,7 @@ and may look very wrong.}
\ProvidesFile{gloss-romansh.ldf}[polyglossia: module for romansh]
\makeatletter
\PolyglossiaSetup{romansh}{%
+ bcp47=rm,
hyphennames={romansh},
hyphenmins={2,2},
langtag=RMS,
@@ -11222,6 +14482,8 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{romansh}{rm}
\def\captionsromansh{%
\def\prefacename{Prefaziun}%
@@ -11268,6 +14530,7 @@ and may look very wrong.}
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{russian}{
+ bcp47=ru,
script=Cyrillic,
scripttag=cyrl,
langtag=RUS,
@@ -11280,11 +14543,16 @@ and may look very wrong.}
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{%
@@ -11296,13 +14564,29 @@ and may look very wrong.}
}%
\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
@@ -11310,9 +14594,12 @@ and may look very wrong.}
\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}
@@ -11496,7 +14783,11 @@ and may look very wrong.}
\def\russiannumber#1{%
\ifcyrillic@numerals
- \cyr@alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \russian@asbuk@alph{#1}%
+ \else
+ \cyr@alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -11504,7 +14795,11 @@ and may look very wrong.}
\def\Russiannumber#1{%
\ifcyrillic@numerals
- \cyr@Alph{#1}%
+ \ifcyrillic@asbuk@numerals
+ \russian@asbuk@Alph{#1}%
+ \else
+ \cyr@Alph{#1}%
+ \fi
\else
\number#1%
\fi%
@@ -11513,24 +14808,30 @@ and may look very wrong.}
\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
@@ -11538,8 +14839,8 @@ and may look very wrong.}
\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
}
@@ -11611,6 +14912,7 @@ and may look very wrong.}
\ProvidesFile{gloss-sami.ldf}[polyglossia: module for sami]
\PolyglossiaSetup{sami}{
+ bcp47=se,
babelname=samin,
hyphennames={samin},
hyphenmins={2,2},
@@ -11619,6 +14921,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{sami}{se}
+
% Babel and backwards compat. alias
\setlanguagealias{sami}{samin}
%\setlanguagealias[variant=northern]{sami}{samin}
@@ -11642,7 +14947,7 @@ and may look very wrong.}
%\def\sami@language{%
-% \polyglossia@setup@language@patterns{\sami@variant}
+% \polyglossia@setup@language@patterns{\sami@variant}%
%}%
\def\captionssami@northern{%
@@ -11731,6 +15036,7 @@ and may look very wrong.}
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{sanskrit}{
+ bcp47=sa-Deva,
langtag=SAN,
hyphennames={sanskrit,prakrit},
hyphenmins={1,3},
@@ -11739,6 +15045,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}%
@@ -11749,29 +15065,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
@@ -11787,6 +15101,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{%
@@ -11800,7 +15118,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}}
@@ -11810,17 +15129,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
}
@@ -11834,6 +15156,7 @@ and may look very wrong.}
\XeTeXcharclass `\⁇ \z@
\XeTeXcharclass `\⁈ \z@
\XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\‽ \z@
\XeTeXcharclass `\: \z@
\XeTeXcharclass `\; \z@
\XeTeXcharclass `\। \z@
@@ -11884,6 +15207,7 @@ and may look very wrong.}
\RequirePackage{xpg-cyrillicnumbers}
\PolyglossiaSetup{serbian}{
+ bcp47=sr-Latn,
langtag=SRB,
hyphennames={serbian},
hyphenmins={2,2},
@@ -11894,6 +15218,11 @@ and may look very wrong.}
%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}
@@ -11902,12 +15231,12 @@ and may look very wrong.}
\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???
@@ -11917,17 +15246,34 @@ and may look very wrong.}
\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
}
@@ -12012,19 +15358,27 @@ and may look very wrong.}
\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
@@ -12054,24 +15408,29 @@ and may look very wrong.}
\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}
+% 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\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\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%
+}
% \end{macrocode}
@@ -12101,12 +15460,16 @@ and may look very wrong.}
\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
@@ -12117,7 +15480,8 @@ and may look very wrong.}
\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}
@@ -12132,8 +15496,12 @@ and may look very wrong.}
}{}
\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{%
@@ -12320,13 +15688,13 @@ and may look very wrong.}
\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%
}
% \end{macrocode}
@@ -12356,6 +15724,7 @@ and may look very wrong.}
\ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for slovenian]
\PolyglossiaSetup{slovenian}{
+ bcp47=sl,
hyphennames={slovenian,slovene},
babelname=slovene,
hyphenmins={2,2},
@@ -12363,18 +15732,16 @@ and may look very wrong.}
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{%
@@ -12400,14 +15767,14 @@ and may look very wrong.}
\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
@@ -12415,17 +15782,22 @@ and may look very wrong.}
}
\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}
+
% \end{macrocode}
% \iffalse
%</gloss-slovenian.ldf>
@@ -12438,6 +15810,7 @@ and may look very wrong.}
\ProvidesFile{gloss-sorbian.ldf}[polyglossia: module for sorbian]
\PolyglossiaSetup{sorbian}{
+ bcp47=hsb,
language=Upper Sorbian,
babelname=uppersorbian,
hyphennames={usorbian,uppersorbian},
@@ -12446,6 +15819,9 @@ and may look very wrong.}
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}
@@ -12459,7 +15835,7 @@ and may look very wrong.}
\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
@@ -12479,7 +15855,7 @@ and may look very wrong.}
\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
@@ -12503,7 +15879,8 @@ and may look very wrong.}
\define@boolkey{sorbian}[sorbian@]{olddate}[true]{}
-\setkeys{sorbian}{variant}
+% Register default options
+\xpg@initialize@gloss@options{sorbian}{variant=upper,olddate=false}
\def\sorbian@language{%
@@ -12620,8 +15997,10 @@ and may look very wrong.}
\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,
@@ -12629,6 +16008,11 @@ and may look very wrong.}
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}
@@ -12638,11 +16022,11 @@ and may look very wrong.}
\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'}}
@@ -12677,6 +16061,10 @@ and may look very wrong.}
\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
@@ -12857,6 +16245,7 @@ and may look very wrong.}
\ProvidesFile{gloss-swedish.ldf}[polyglossia: module for swedish]
\PolyglossiaSetup{swedish}{
+ bcp47=sv,
hyphennames={swedish},
hyphenmins={2,2},
langtag=SVE,
@@ -12864,6 +16253,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{swedish}{sv}
+
\def\captionsswedish{%
\def\refname{Referenser}%
\def\abstractname{Sammanfattning}%
@@ -12937,6 +16329,7 @@ and may look very wrong.}
\RequirePackage{arabicnumbers}
\PolyglossiaSetup{syriac}{
+ bcp47=syr,
script=Syriac,
scripttag=syrc,
langtag=SYR,
@@ -12947,6 +16340,9 @@ and may look very wrong.}
%TODO localalph
}
+% BCP-47 compliant aliases
+\setlanguagealias*{syriac}{syr}
+
\def\syriacnumber#1{\@syriacnumber{#1}}%
\newif\if@eastern@numerals
@@ -12964,7 +16360,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}}
@@ -13048,33 +16445,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%
@@ -13131,6 +16517,7 @@ and may look very wrong.}
% Translations provided by Kevin & Siji, 01-11-2009
\PolyglossiaSetup{tamil}{
+ bcp47=ta,
script=Tamil,
scripttag=taml,
langtag=TAM,
@@ -13139,6 +16526,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{tamil}{ta}
+
\def\captionstamil{%
\def\abstractname{சாராம்சம்}%
\def\appendixname{பிற்சேர்க்கை}%பின்னிணைப்பு
@@ -13198,6 +16588,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,
@@ -13206,6 +16597,9 @@ and may look very wrong.}
fontsetup=true,
}
+% BCP-47 compliant aliases
+\setlanguagealias*{telugu}{te}
+
\def\captionstelugu{%
\def\refname{ఆధారాలు}%
\def\abstractname{సారాంశం}%
@@ -13275,6 +16669,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,
@@ -13285,6 +16680,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]{%
@@ -13293,7 +16691,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{หนังสืออ้างอิง}%
@@ -13416,6 +16815,7 @@ and may look very wrong.}
%%
\PolyglossiaSetup{tibetan}{
+ bcp47=bo,
script=Tibetan,
scripttag=tibt,
langtag=TIB,
@@ -13425,6 +16825,9 @@ and may look very wrong.}
%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]{%
@@ -13458,7 +16861,8 @@ and may look very wrong.}
\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"
@@ -13590,6 +16994,7 @@ and may look very wrong.}
\ProvidesFile{gloss-turkish.ldf}[polyglossia: module for turkish]
\RequirePackage{hijrical}
\PolyglossiaSetup{turkish}{
+ bcp47=tr,
hyphennames={turkish},
hyphenmins={2,2},
langtag=TRK,
@@ -13617,6 +17022,9 @@ and may look very wrong.}
\fi
}
+% BCP-47 compliant aliases
+\setlanguagealias*{turkish}{tr}
+
\def\noturkish@punctuation{%
\ifxetex
\XeTeXcharclass `\! \z@
@@ -13700,6 +17108,7 @@ and may look very wrong.}
\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,
@@ -13707,6 +17116,9 @@ and may look very wrong.}
fontsetup=true
}
+% BCP-47 compliant aliases
+\setlanguagealias*{turkmen}{tk}
+
\def\captionsturkmen{%
\def\prefacename{Sözbaşy}%
\def\refname{Çeşmeler}%
@@ -13751,32 +17163,57 @@ and may look very wrong.}
% 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}{%
@@ -13786,45 +17223,47 @@ and may look very wrong.}
}{}
\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{%
@@ -13851,7 +17290,8 @@ and may look very wrong.}
\def\headtoname{До}%
\def\proofname{Доведення}%
\def\glossaryname{Словник термінів}%
- }
+}
+
\def\dateukrainian{%
\def\today{\number\day~\ifcase\month\or
січня\or
@@ -13866,39 +17306,82 @@ and may look very wrong.}
жовтня\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%
@@ -13911,19 +17394,19 @@ and may look very wrong.}
}
\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
@@ -13985,6 +17468,7 @@ and may look very wrong.}
\RequirePackage{hijrical}
\PolyglossiaSetup{urdu}{
+ bcp47=ur,
script=Arabic,
direction=RL,
scripttag=arab,
@@ -13995,6 +17479,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]{%
@@ -14147,6 +17634,7 @@ and may look very wrong.}
%% Strings contributed by Daniel Owens < dhowens . pmbx . net >
\PolyglossiaSetup{vietnamese}{
+ bcp47=vi,
hyphennames={nohyphenation},
hyphenmins={2,2},
langtag=VIT,
@@ -14154,6 +17642,9 @@ and may look very wrong.}
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}%
@@ -14197,20 +17688,31 @@ and may look very wrong.}
\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}%
@@ -14441,6 +17943,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)
@@ -14887,14 +18390,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
@@ -15085,21 +18593,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()
@@ -15180,12 +18698,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)
@@ -15203,9 +18763,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
@@ -15215,9 +18772,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
@@ -15227,6 +18781,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
@@ -15312,13 +18876,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
@@ -15345,7 +18909,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
@@ -15440,19 +19004,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()
@@ -15767,7 +19337,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.46 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -15800,8 +19370,8 @@ Polyglossia makes it possible to automate the following tasks:
LICENSE
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2019 Arthur Reutenauer,
-Copyright (c) 2019 Bastien Roucariès, 2019 Jürgen Spitzmüller
+Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer,
+Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller
Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence
(https://opensource.org/licenses/MIT).
@@ -15815,6 +19385,69 @@ This is more efficient than contacting the maintainer by email as it allows me
to track the issues and follow progress.
%</../README>
%<*Changelog>
+1.47 (29-01-2020)
+
+New features:
+ * IETF BCP-47 compliant language tags can now be used for loading and switching
+ languages alternatively to language names (#226).
+ * New commands \languageid{<type>} and \mainlanguageid{<type>}.
+ * New test \iflanguageidloaded.
+ * New list \xpg@bcp@loaded.
+ * New environment {lang}{<lang>} (equivalent to {<lang>}, but also available with
+ \setlanguagealias* which does not define dedicated alias environments).
+ * New gloss option totalhyphenmin (corresponds to LuaTeX's \hyphenationmin) (#111).
+ * New test \iflanguageoption{<lang>}{<key>}{<val>} (#364).
+ * Restore simple alphabetic numbering for \asbuk and \Asbuk in Belarusian, Mongolian,
+ Russian, Serbian, and Ukrainian (#377).
+ * New command \AsbukTrad and \asbukTrad for Belarusian, Mongolian, Russian, Serbian,
+ and Ukrainian which uses traditional alphanumerical numbering.
+ * New numerals option "cyrillic-trad" and "cyrillic-alph" to differentiate simple
+ alphabetic and traditional alpnanumerical Cyrillic numbering.
+ * \selectbackgroundlanguage and \resetdefaultlanguage now also support language
+ aliases.
+ * New macro \charifavailable{<char code>}{<substitution>}.
+ * Add French language variant "swiss".
+ * Implement babelshorthands for Croatian.
+ * Implement \localnumeral for Japanese.
+
+Bug fixes:
+ * Fix font family issue in headers (#355).
+ * Fix whitespace issues in \text<lang> (#356).
+ * Fix option-less \babelname in multi-variant languages (#357).
+ * Fix some spacing inconsistencies with French, Latin, and Sanskrit (#358).
+ * Fix issues with babelshorthands and graphics package (#368).
+ * Fix some captions and improve numbering in Marathi (#370).
+ * Fix Hungarian swapstrings feature (#373).
+ * Fix lua punctuation code problem (#374).
+ * Fix Bengali changecounternumbering option (#381).
+ * Fix whitespace issue in Japanese (#387).
+ * Fix \text<lang> command with multiple paragraphs.
+ * Actually implement documented german spelling variant '1996' (= 'new').
+ * Fix Slovenian localalph option.
+ * Fix Czech and Slovak splithyphens with typewriter fonts.
+ * farsical.sty: fix spacing issue with some month names.
+ * Fix directionalty of numbers in Hebrew with XeTeX.
+ * Improve interoperatability with biblatex (some language variants did not work yet).
+
+Interface and defaults changes:
+ * Some boolean options had 'false' value by default, which meant if you passed
+ them without value, the logic was reversed. This has been changed, leading to
+ change of behavior should you have used one of these options without value (#363).
+ Concerned are the following options:
+ - babelshorthands in language belarusian, mongolian, ukrainian, and russian
+ ('babelshorthands' now equals 'babelshorthand=true', no longer 'babelshorthands=false')
+ - localalph in language slovenian ('localalph' now equals 'localalph=true')
+ - latesthyphen in language german ('latesthyphen' now equals 'latesthyphen=true')
+ - fullyear in package hebrewcal ('fullyear' now equals 'fullyear=true')
+ * The command \setlanguagealias* (introduced in v1.46) does no longer define
+ dedicated alias environments.
+ * The babelnames for latin variants have been corrected to classiclatin, ecclesiasticlatin
+ and medievallatin. This is how the hyphenation patterns and babel \extras are named, even
+ though the variants can currently be selected in babel only via appended "dot modifier".
+ * In accordance with the respective l3kernel change, \str_lower_case:n has been renamed to
+ \str_lowercase:n where used in polyglossia.sty. Thus polyglossia 1.47 requires l3kernel
+ 2020-01-12 at least.
+
1.46 (15-11-2019)
New features:
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}{%