summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-13 22:15:54 +0000
committerKarl Berry <karl@freefriends.org>2013-05-13 22:15:54 +0000
commit1ff28b17fa5479687257ee4525e3a06c8aa0a2c7 (patch)
tree22d0f15f3680a26ce6a158e96b25bf1908471b9e /Master
parente26fdd32ad8dc28823e2f351c31afa0dad690da9 (diff)
polyglossia (13may13)
git-svn-id: svn://tug.org/texlive/trunk@30442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/README (renamed from Master/texmf-dist/doc/xelatex/polyglossia/README)29
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex (renamed from Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex)4
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-thai.tex (renamed from Master/texmf-dist/doc/xelatex/polyglossia/example-thai.tex)5
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/examples.tex (renamed from Master/texmf-dist/doc/xelatex/polyglossia/examples.tex)12
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdfbin0 -> 129521 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex (renamed from Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex)183
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdfbin67620 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdfbin23337 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/examples.pdfbin148335 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdfbin150729 -> 0 bytes
-rw-r--r--Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx (renamed from Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx)3663
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/arabicnumbers.sty (renamed from Master/texmf-dist/tex/xelatex/polyglossia/arabicnumbers.sty)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def (renamed from Master/texmf-dist/tex/xelatex/polyglossia/babel-hebrewalph.def)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/babelsh.def462
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/cal-util.def (renamed from Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/devanagaridigits.sty (renamed from Master/texmf-dist/tex/xelatex/polyglossia/devanagaridigits.sty)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/farsical.sty (renamed from Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-armenian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-asturian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bahasai.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bahasam.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-bengali.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-brazil.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf)33
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-farsi.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf140
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-friulan.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-friulan.ldf)3
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-greek-new.ldf410
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-irish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf)1
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-kannada.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-lao.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-lithuanian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-lsorbian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-malayalam.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-marathi.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-norsk.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-nynorsk.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-occitan.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf115
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf)2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-portuges.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-romansh.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf)2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-samin.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-scottish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf)2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf)2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-tamil.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-telugu.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf138
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkmen.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-urdu.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-usorbian.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-vietnamese.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf (renamed from Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty (renamed from Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/hijrical.sty (renamed from Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty)0
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia-frpt.lua210
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua77
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty (renamed from Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty)54
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/xgreek-fixes.def (renamed from Master/texmf-dist/tex/xelatex/polyglossia/xgreek-fixes.def)0
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/babelsh.def308
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf118
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds67
101 files changed, 2934 insertions, 3108 deletions
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README
index 2e9bc624861..104d02bc657 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/README
+++ b/Master/texmf-dist/doc/latex/polyglossia/README
@@ -1,14 +1,16 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.2.1 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.3 ¦
¦ ¦
- ¦ Modern multilingual typesetting with XeLaTeX ¦
+ ¦ Modern multilingual typesetting ¦
+ ¦ with XeLaTeX and LuaLaTeX ¦
¦ ¦
¦----------------------------------------------¦
-This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 68 different languages.
+This package provides a complete Babel replacement for users of XeLaTeX and
+(at an early stage) LuaLaTeX. This version includes support for 74 different
+languages.
Polyglossia makes it possible to automate the following tasks:
@@ -30,7 +32,8 @@ Polyglossia makes it possible to automate the following tasks:
Several features of Babel that do not make sense in the XeTeX world (like font
encodings, shorthands, etc) are not supported. For German however, several
-shorthands do make sense and can be activated with the language option babelshorthands=true.
+shorthands do make sense and can be activated with the language option
+babelshorthands=true.
Polyglossia is distributed in the traditional way with *.dtx and *.ins files,
and also comes with a TDS-conformant ready-to-unpack zip file.
@@ -51,6 +54,12 @@ http://github.com/reutenauer/polyglossia/issues
CHANGES
+1.3 (11-05-2013)
+ * Several bugfixes.
+ * Sync with Babel 3.9.
+ * Added support for LuaTeX.
+ * Added support for Tibetan (end of lines are experimental).
+
1.2.0e (28-04-2012)
* Fixed a number of outstanding and not very interesting bugs.
* Added gloss files for Romansh and Friulan, contributed by Claudio
@@ -203,13 +212,3 @@ CHANGES
1.0
* Initial release on CTAN
-
-
- ------------------------------
- Arthur Reutenauer, April 2012
- <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
-
- Original author:
- François Charette
- <firmicus ατ gmx δοτ net>
- ------------------------------
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex
index 1cd3266346f..6d685b9ae8a 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex
@@ -1,9 +1,9 @@
\documentclass[a4paper]{book}%
\usepackage[no-math]{fontspec}
\usepackage{xltxtra,url,amsmath}
-\setromanfont{Linux Libertine O}
+\setmainfont{Linux Libertine O}
\defaultfontfeatures{Scale=MatchLowercase}
-\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Scheherazade}%
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}%
\newfontfamily\arabicfonttt[Script=Arabic,Scale=.75]{DejaVu Sans Mono}
\newfontfamily\farsifont[Script=Arabic,Scale=1.1,WordSpace=2]{IranNastaliq}
\usepackage[quiet,nolocalmarks]{polyglossia}
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.tex b/Master/texmf-dist/doc/latex/polyglossia/example-thai.tex
index 13995fd3d9c..b443c36fc90 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.tex
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-thai.tex
@@ -4,10 +4,7 @@
\usepackage{polyglossia}
\setdefaultlanguage[numerals=thai]{thai}
\setotherlanguage{english}
-\setromanfont{Norasi}
-\defaultfontfeatures{Scale=MatchLowercase}
-\setmonofont{Inconsolata}
-\setsansfont{Lucida Sans Unicode}
+\setmainfont{Norasi}
\begin{document}
\begin{center}
\abstractname
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/examples.tex b/Master/texmf-dist/doc/latex/polyglossia/examples.tex
index 9cb164c5b71..ee3381face1 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/examples.tex
+++ b/Master/texmf-dist/doc/latex/polyglossia/examples.tex
@@ -11,15 +11,15 @@
\setotherlanguage[spelling=new,latesthyphen=true,babelshorthands=true]{german}
\setotherlanguages{latin,russian,turkish,polish,latvian,sanskrit,ukrainian,farsi,syriac,divehi,hebrew,amharic}
\setotherlanguage[calendar=gregorian,numerals=western]{urdu}
-\setromanfont{Linux Libertine O}
-\defaultfontfeatures{Scale=MatchLowercase,RawFeature={+locl}}
+\setmainfont{Linux Libertine O}
+\defaultfontfeatures{Scale=MatchLowercase}
\setmonofont{Inconsolata}
-\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}%
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem}
-\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
+\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}
\newfontfamily\sanskritfont[Script=Devanagari]{Sanskrit 2003}
-\newfontfamily\thaifont[Script=Thai]{Norasi}%{Arial Unicode MS}
-\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{TITUS Cyberbit Basic}%this font does not have OT script tags, but it still seems to work
+\newfontfamily\thaifont[Script=Thai]{Norasi}
+\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{FreeSerif}
\newfontfamily\ethiopicfont[Script=Ethiopic]{Abyssinica SIL}
\parskip 1.33\baselineskip
%\newcommand\showhyphmin{\fbox{\the\lefthyphenmin\ \the\righthyphenmin}}
diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
new file mode 100644
index 00000000000..3354bb52de7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
index 1ee2809bd28..0e84fa1f184 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
@@ -1,14 +1,10 @@
\documentclass[11pt]{ltxdoc}
-\usepackage[dvipdfm]{color}
-\usepackage{xltxtra}
+\usepackage{color}
\usepackage{xspace,fancyvrb}
\usepackage[neverdecrease]{paralist}
\definecolor{myblue}{rgb}{0.02,0.04,0.48}
\definecolor{lightblue}{rgb}{0.61,.8,.8}
\definecolor{myred}{rgb}{0.65,0.04,0.07}
-\definecolor{darkgray}{gray}{0.3}
-\definecolor{lightgray}{gray}{0.6}
-\definecolor{mygreen}{rgb}{0,.43,0}
\usepackage[
bookmarks=true,
colorlinks=true,
@@ -17,14 +13,16 @@
citecolor=myblue,
hyperindex=false,
hyperfootnotes=false,
- pdftitle={Polyglossia: A Babel replacement for XeLaTeX},
- pdfauthor={F Charette <firmicus · gmx · net>},
- pdfkeywords={xetex, xelatex, multilingual, babel, hyphenation}
+ pdftitle={Polyglossia: A Babel replacement for XeLaTeX and LuaLaTeX},
+ pdfauthor={F Charette, A Reutenauer},
+ pdfkeywords={xetex, xelatex, luatex, lualatex, multilingual, babel, hyphenation}
]{hyperref}
\usepackage[babelshorthands]{polyglossia}
-%\usepackage{farsical} <<< needs to be disabled otherwise we have too many counters!
+\usepackage{farsical}
\setmainlanguage[variant=british,ordinalmonthday=false]{english}
\setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan}
+\usepackage{metalogo}
+\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}}
@@ -40,43 +38,26 @@
\def\etc{\@ifnextchar.{\textit{etc}}{\textit{etc.}\@\xspace}}
%% Sidenotes << copied from fontspec.dtx
-\newcommand\warn[2]{%
- \edef\thisversion{#1}%
- \ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{red}\fi
- $\leftarrow$}%
- \marginpar{\raggedleft
- \small%
- \ifx\thisversion\fileversion\color{red}\fi
- \notefont #1:~#2}}
-
\newcommand\new[1]{%
\edef\thisversion{#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
- \notefont #1}}
+ \textsf{#1}}}
\newcommand\displaycmd[2]{%
\\\DescribeMacro{#2}\centerline{\cmd{#1}}}
\renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}%
{\end{compactitem}}
\renewenvironment{enumerate}{\begin{compactenum}}{\end{compactenum}}
-%% Sidenote font
-\newfontfamily\notefont[Scale=MatchLowercase]{Lucida Sans Unicode}
-%%%
-
%% fontspec declarations:
-\setromanfont[Mapping=tex-text]{Linux Libertine O}
-\defaultfontfeatures{Scale=MatchLowercase}
-\setmonofont{DejaVu Sans Mono}
-\setsansfont{Lucida Sans Unicode}
-\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
-\newfontfamily\farsifont[Script=Arabic]{Farsi Simple Bold}
+\setmainfont{Linux Libertine O}
+\setsansfont{Linux Biolinum O}
+\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem}
-\newfontfamily\hebrewfont[Script=Hebrew]{SBL Hebrew}
-
-\newcommand\Babel{\pkg{Babel}\xspace}
+\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}
\linespread{1.05}
\frenchspacing
@@ -88,10 +69,9 @@
\begin{document}
\GetFileInfo{polyglossia.sty}
-\title{\textcolor{lightblue}{\huge
-\fontspec{GFS Ambrosia}
-Π$\;\,$ο$\;\,$λ$\;\,$υ$\;\,$γ$\;\,$λ$\;\,$ω$\;\,$σ$\;\,$σ$\;\,$ι$\;\,$α}\\[16pt]
-\color{myblue}Polyglossia: A Babel Replacement for \XeLaTeX}
+\title{\textcolor{lightblue}{\Huge\fontspec[Script=Greek,Language=Polytonic Greek,LetterSpace=40]{GFS Ambrosia} Πολυγλωσσια}
+\\[16pt]
+\color{myblue}Polyglossia: A Babel Replacement for \XeLaTeX\ and \LuaLaTeX}
\author{\scshape\color{myblue}François Charette\\\color{myblue}Current maintainer: \scshape Arthur Reutenauer}
\date{\filedate \qquad \fileversion\\
\footnotesize (\textsc{pdf} file generated on \today)}
@@ -110,9 +90,10 @@
\section{Introduction}
-Polyglossia is a package for facilitating multilingual typesetting with \XeLaTeX.
-Basically, it can be used as a replacement of \Babel for performing the
-following tasks automatically:
+Polyglossia is a package for facilitating multilingual typesetting with
+\XeLaTeX\ and (at an early stage) \LuaLaTeX. Basically, it
+can be used as a replacement of \pkg{babel} for performing the following
+tasks automatically:
\begin{enumerate}
\item Loading the appropriate hyphenation patterns.
@@ -135,16 +116,16 @@ following tasks automatically:
available separately).
\end{enumerate}
-Several features of \Babel that do not make sense in the \XeTeX\ world (like font
+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
-with the fundamental features of \Babel while being cleaner, light-weight,
+with the fundamental features of \pkg{babel} while being cleaner, light-weight,
and modern. The package \pkg{antomega} has been very beneficial in our attempt to
reach this objective.
\paragraph{Requirements:} The current version of \pkg{polyglossia} makes use of some convenient
macros defined in the \pkg{etoolbox} package by Philipp Lehmann. Being designed
-specifically for \XeLaTeX, it obviously also relies on \pkg{fontspec} by Will
+for \XeLaTeX\ and \LuaLaTeX, it obviously also relies on \pkg{fontspec} by Will
Robertson. For languages written from right to left, it needs the package \pkg{bidi}
by Vafa Khalighi (\textarabic{وفا خليقي}). Polyglossia also bundles three packages for calendaric
computations (\pkg{hebrewcal}, \pkg{hijrical}, and \pkg{farsical}).
@@ -156,26 +137,26 @@ You can determine the default language by means of the command:
\displaycmd{\setdefaultlanguage[⟨options⟩]\{lang\}}{\setdefaultlanguage}
(or equivalently \Cmd\setmainlanguage).
Secondary languages can be loaded with
- \displaycmd{\setotherlanguage[⟨options⟩]\{lang\}}{\setotherlanguage}.
+ \displaycmd{\setotherlanguage[⟨options⟩]\{lang\}.}{\setotherlanguage}
These commands have the advantage of being explicit and of allowing you to set
language-specific options.\footnote{ %
More on language-specific options below.}
It is also possible to load a series of secondary languages at once using
- \displaycmd{\setotherlanguages\{lang1,lang2,lang3,…\}}{\setotherlanguages}.
+ \displaycmd{\setotherlanguages\{lang1,lang2,lang3,…\}.}{\setotherlanguages}
Language-specific options can be set or changed at any time by means of
- \displaycmd{\setkeys\{⟨lang⟩\}\{opt1=value1,opt2=value2,…\}}{\setkeys}.
+ \displaycmd{\setkeys\{⟨lang⟩\}\{opt1=value1,opt2=value2,…\}.}{\setkeys}
\subsection{The “Babel way”}
\new{v1.2.0}
{\color{red}\bfseries Warning}: \pkg{polyglossia} no longer supports loading
language definition files as package options!
-%As with \Babel, \pkg{polyglossia} also allows you to load language definition files
+%As with \pkg{babel}, \pkg{polyglossia} also allows you to load language definition files
%as package options. In most cases, option \texttt{⟨lang⟩} will load the file
%\file{gloss-⟨lang⟩.ldf}. Note however that the \textit{first} language listed in \\
%\centerline{\cmd{\usepackage[lang1,lang2,…]{polyglossia}}}
%will be the default language for the document, which
-%is the opposite convention of \Babel.
+%is the opposite convention of \pkg{babel}.
%Note also that this method may not work in some cases, and should be
%considered deprecated.
@@ -262,15 +243,15 @@ albanian & croatian & \TX{hebrew} & norsk & swedish \\
amharic & czech & \TX{hindi} & nynorsk & \TX{syriac} \\
\TX{arabic} & danish & icelandic & occitan & tamil \\
armenian & divehi & interlingua & polish & telugu \\
-asturian & \TX{dutch} & irish & portuges & \TX{thai} \\
-bahasai & \TX{english} & \TX{italian} & romanian & turkish \\
-bahasam & \TX{esperanto} & \TX{lao} & \TX{russian} & turkmen \\
-basque & estonian & latin & samin & ukrainian \\
-\TX{bengali} & \TX{farsi} & latvian & \TX{sanskrit}& urdu \\
-brazil[ian] & finnish & lithuanian & scottish & \TX{usorbian} \\
-breton & french & \TX{lsorbian} & \TX{serbian} & vietnamese \\
-bulgarian & galician & \TX{magyar} & slovak & welsh \\
-\TX{catalan} & \TX{german} & malayalam & slovenian & \\
+asturian & \TX{dutch} & irish & portuges & tibetan \\
+bahasai & \TX{english} & \TX{italian} & romanian & \TX{thai} \\
+bahasam & \TX{esperanto} & \TX{lao} & \TX{russian} & turkish \\
+basque & estonian & latin & samin & turkmen \\
+\TX{bengali} & \TX{farsi} & latvian & \TX{sanskrit}& ukrainian \\
+brazil[ian] & finnish & lithuanian & scottish & urdu \\
+breton & french & \TX{lsorbian} & \TX{serbian} & \TX{usorbian} \\
+bulgarian & galician & \TX{magyar} & slovak & vietnamese \\
+\TX{catalan} & \TX{german} & malayalam & slovenian & welsh \\
coptic & \TX{greek} & marathi & spanish & \\
\hline
\end{tabular}
@@ -290,7 +271,7 @@ Lao, Malayalam, Marathi, Tamil, Telugu, and Turkmen.\footnote{ %
Polyglossia can also be loaded with the option
-‘babelshorthands’\new{v1.1.1}, which globally activates \Babel
+‘babelshorthands’\new{v1.1.1}, which globally activates \pkg{babel}
shorthands whenever available. Currently shorthands are implemented for
Catalan, Dutch, German, Italian, and Russian: see these respective
languages for details.
@@ -336,25 +317,6 @@ of Homer’s \textit{Iliad}:
Note that for Arabic one cannot use the environment ¦arabic¦,
as \cmd\arabic\ is defined internally by \LaTeX. In this case
we need to use the environment ¦Arabic¦ instead\DescribeEnv{Arabic}.
-This is the beginning of Ibn Khaldūn’s \textit{Muqaddima}:
-
-% TODO: convince XeTeX to typeset right-to-left, even in verbatim.
-% The individual words are set correctly, but the whole paragraph is
-% left-to-right!
-\begin{Verbatim}[formatcom={\color{myblue}\addfontfeature{Script=Arabic}}]
-\begin{Arabic}
-اعلم أنّ فنّ التاريخ فنّ عزيز المذهب، جمّ الفوائد، شريف الغاية؛ إذ هو
-يوقفنا على أحوال الماضين من الأمم في أخلاقهم، والأنبياء في سيرهم، والملوك
-في دولهم وسياستهم؛ حتّى تتمّ فائدة الإقتداء في ذلك لمن يرومه في أحوال
-الدين والدنيا.
-\end{Arabic}
-\end{Verbatim}
-
-\begin{Arabic}
-اعلم أنّ فنّ التاريخ فنّ عزيز المذهب، جمّ الفوائد، شريف الغاية؛ إذ هو يوقفنا على
-أحوال الماضين من الأمم في أخلاقهم، والأنبياء في سيرهم، والملوك في دولهم
-وسياستهم؛ حتّى تتمّ فائدة الإقتداء في ذلك لمن يرومه في أحوال الدين والدنيا.
-\end{Arabic}
\subsection{Other commands}
The following commands are probably of lesser interest to the end user, but
@@ -368,33 +330,26 @@ ought to be mentioned here.
to another one in the middle of a document: \textit{this may have adverse effects}!
\item \Cmd\normalfontlatin: in an environment where \cmd\normalfont\ has been redefined
- to a non-latin script, this will call the font defined with \cmd\setromanfont\ etc.
+ to a non-latin script, this will call the font defined with \cmd\setmainfont\ etc.
Likewise it is possible to use \Cmd\rmfamilylatin, \Cmd\sffamilylatin,
and \Cmd\ttfamilylatin.
-\item Some macros defined in \Babel’s \file{hyphen.cfg} (and thus usually
- compiled into the xelatex format) are redefined, but keep a similar
+\item 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, namely \Cmd\selectlanguage, \Cmd\foreignlanguage,
and the environment ¦otherlanguage¦\DescribeEnv{otherlanguage}.
\end{itemize}
%
-Since the \XeLaTeX\ format incorporates \Babel’s \file{hyphen.cfg},
+Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg},
the low-level commands for hyphenation and language switching
defined there are also accessible.
-%%\footnote{ %
-%% The file \file{hyphen\_cfg} (available on the
-%% \href{http://scripts.sil.org/svn-view/xetex/TRUNK/texmf/tex/xelatex/polyglossia/hyphen\_cfg}{\XeTeX\ subversion repository})
-%% is meant to eventually replace \Babel’s \file{hyphen.cfg}. If you want
-%% to experiment with it, rename it into \file{hyphen.cfg}, copy it to
-%% \texttt{…/tex/xelatex/polyglossia/} and rebuild the xelatex format.}
-
\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¦.
-For instance, if the default roman font defined by \cmd\setromanfont\
+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⟩\}}. }
Note that polyglossia will use the font thus defined as is.
@@ -435,13 +390,13 @@ The default value of each option is given in italic.
\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}
- 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{ج}.
+ 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}
\textbf{Commands}:
\begin{itemize}
\item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
- \item \Cmd\aemph to emphasize Arabic text with ¦\overline¦:\new{v1.2.0}
- ¦\textarabic{مثال: \aemph{اب}}¦ yields \textarabic{مثال: \aemph{اب}}.
+ \item \Cmd\aemph to emphasize text with ¦\overline¦.\new{v1.2.0}
+ ¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}.
This command is also available for Farsi, Urdu, etc.
\end{itemize}
@@ -459,7 +414,7 @@ The default value of each option is given in italic.
\end{itemize}
\textbf{Commands}:
\begin{itemize}
- \item \Cmd{\l.l} and \Cmd{\L.L} behave as in \Babel to type a geminated l, as in \textit{co\l.laborar}. \new{v1.1.1}
+ \item \Cmd{\l.l} and \Cmd{\L.L} behave as in \pkg{babel} to type a geminated l, as in \textit{co\l.laborar}. \new{v1.1.1}
In polyglossia the same can also be achieved with \Cmd{\l·l} and \Cmd{\L·L}.\footnote{ %
NB: · is the glyph U+00B7 MIDDLE DOT.}
\end{itemize}
@@ -468,7 +423,7 @@ The default value of each option is given in italic.
\textbf{Options:}
\begin{itemize}
\item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
- if this is turned on, all shorthands defined in \Babel
+ if this is turned on, all shorthands defined in \pkg{babel}
for fine-tuning the hyphenation of Dutch words are activated.
\begin{itemize}
\item ¦"-¦ for an explicit hyphen sign, allowing hyphenation in the rest of the word
@@ -491,7 +446,7 @@ The default value of each option is given in italic.
\subsection{esperanto}\label{esperanto}
\textbf{Commands}:
\begin{itemize}
- \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \Babel documentation)
+ \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \pkg{babel} documentation)
\end{itemize}
\subsection{farsi}\label{farsi}
@@ -527,7 +482,7 @@ The default value of each option is given in italic.
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 \Babel
+ if this is turned on, all shorthands defined in \pkg{babel}
for fine-tuning the hyphenation of German words are activated.
\begin{itemize}
\item ¦"ck¦ for ¦ck¦ to be hyphenated as ¦k-k¦
@@ -611,14 +566,14 @@ The default value of each option is given in italic.
\subsection{lsorbian and usorbian}\label{lsorbian}\label{usorbian}
\textbf{Commands}:
\begin{itemize}
- \item \Cmd\oldtoday : see the \Babel documentation.
+ \item \Cmd\oldtoday : see the \pkg{babel} documentation.
\end{itemize}
\subsection{magyar}\label{magyar}
\textbf{Commands}:
\begin{itemize}
\item \Cmd\ontoday\ (= \Cmd\ondatemagyar): special forms of \cmd\today\
- (see the \Babel documentation).
+ (see the \pkg{babel} documentation).
\end{itemize}
@@ -671,7 +626,7 @@ that comes with this package.
\section{Modifying or extending captions and date formats}
To redefine internal macros, you can use the command ¦\gappto¦ from the package
-\pkg{etoolbox}. For compatibility with \Babel the command ¦\addto¦ is also available
+\pkg{etoolbox}. For compatibility with \pkg{babel} the command ¦\addto¦ is also available
with the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
you can do this:
\begin{verbatim}
@@ -682,12 +637,12 @@ you can do this:
Several scripts have their own versions of the decimal digits commonly called
‘Arabic numerals’. With the appropriate language option set, \pkg{polyglossia}
-will automatically convert the output of internal LaTeX counters to their
+will automatically convert the output of internal \LaTeX\ counters to their
localized forms, for instance to display page, chapter and section numbers.
In previous versions this conversion was achieved my means of TECKit fontmappings.
-If needed they can be activated with the fontspec option
-¦Mapping=arabicdigits¦ (or ¦farsidigits¦ or ¦thaidigits¦).
+If needed they can be activated with the fontspec ¦Mapping¦ option,
+using ¦arabicdigits¦, ¦farsidigits¦ or ¦thaidigits¦.
For instance if \cmd\arabicfont\ is defined with the option ¦Mapping=arabicdigits¦,
then by typing ¦\textarabic{2010}¦ one will obtain \textarabic{٢٠١٠}.
@@ -714,34 +669,34 @@ The Greek numerals are obtained with \Cmd\greeknumeral (or \Cmd\Greeknumeral\ in
Example: ¦\greeknumeral{1863}¦ yields \textgreek{\greeknumeral{1863}}.
The Arabic \textit{abjad} numbers can be generated with the command \Cmd\abjad.
-Example: ¦\abjad{1863}¦ yields {\arabicfont\abjad{1863}}.
+Example: ¦\abjad{1863}¦ yields \textarabic{\abjad{1863}}.
In the Maghrib the conventions are somewhat different, and the maghribi forms
of the \textit{abjad} numerals are obtained with the \Cmd\abjadmaghribi\ command.
-Example: ¦\abjadmaghribi{1863}¦ yields {\arabicfont\abjadmaghribi{1863}}.
+Example: ¦\abjadmaghribi{1863}¦ yields \textarabic{\abjadmaghribi{1863}}.
The code for Hebrew numerals, which was incorrect in previous versions, was
-ported from the implementation in \Babel with v1.1.1\new{v1.1.1}, and the
-user interface is identical to the one in \Babel.
+ported from the implementation in \pkg{babel} with v1.1.1\new{v1.1.1}, and the
+user interface is identical to the one in \pkg{babel}.
The commands \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal\ behave exactly
-as they do in \Babel: the second command prints the number with \textit{gereshayim} before
+as they do in \pkg{babel}: the second command prints the number with \textit{gereshayim} before
the last letter, and the latter uses in addition the final forms of Hebrew letters.
Examples:
-¦\hebrewnumeral{1750}¦ yields {\hebrewfont\hebrewnumeral{1750}}.
-¦\Hebrewnumeral{1750}¦ yields {\hebrewfont\Hebrewnumeral{1750}}.
-¦\Hebrewnumeralfinal{1750}¦ yields {\hebrewfont\Hebrewnumeralfinal{1750}}.
+¦\hebrewnumeral{1750}¦ yields \texthebrew{\hebrewnumeral{1750}},
+¦\Hebrewnumeral{1750}¦ yields \texthebrew{\Hebrewnumeral{1750}},
+and ¦\Hebrewnumeralfinal{1750}¦ yields \texthebrew{\Hebrewnumeralfinal{1750}}.
Support is also provided for Syriac abjad numerals, which can be generated
with \Cmd\abjadsyriac.\footnote{ %
A fine guide to numerals in Syriac can be found at \link{http://www.garzo.co.uk/documents/syriac-numerals.pdf}.}
-Example: ¦\abjadsyriac{463}¦ yields {\syriacfont\abjadsyriac{463}}.
+Example: ¦\abjadsyriac{463}¦ yields \textsyriac{\abjadsyriac{463}}.
\section{Calendars}
\subsection{Hebrew calendar (hebrewcal.sty)}
The package \file{hebrewcal.sty} is almost a verbatim copy of \file{hebcal.sty}
-that comes with \Babel.
+that comes with \pkg{babel}.
The command \Cmd\Hebrewtoday\ formats the current date in the Hebrew calendar
(depending of the current writing direction this will automatically set either
in Hebrew script or in roman transliteration).
@@ -763,7 +718,7 @@ provide a localized version of ¦\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\{<lang>\}\{<code>\}.}{\DefineHijriDateFormat}
The command ¦\Hijritoday¦ also accepts an optional argument to add or subtract a correction
(in days) to the date computed by the arithmetical algorithm.\footnote{ %
@@ -783,7 +738,7 @@ itself a slight modification of ¦ftoday.sty¦ in Farsi\TeX.\footnote{ %
Reingold \& Gershowitz (ref.~n.~\ref{reingold}).}
Here we have renamed the command \cmd\ftoday\ to
\Cmd\Jalalitoday.
-%Example: today is \Jalalitoday.
+Example: today is \Jalalitoday.
%\section{Varia}
@@ -793,7 +748,7 @@ Here we have renamed the command \cmd\ftoday\ to
\pkg{Polyglossia} is notable for being a recycle box of previous contributions
by other people. I take this opportunity to thank the following individuals,
whose splendid work has made my task almost trivial in comparision: Johannes
-Braams and the numerous contributors to the \Babel{} package (in particular
+Braams and the numerous contributors to the \pkg{babel}{} package (in particular
Boris Lavva and others for its Hebrew support), Alexej Kryukov (\pkg{antomega}), Will
Robertson (\pkg{fontspec}), Apostolos Syropoulos (\pkg{xgreek}), Youssef Jabri
(\pkg{arabi}), and Vafa Khalighi (\pkg{xepersian} and \pkg{bidi}).
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf
deleted file mode 100644
index 1c4a5557049..00000000000
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf
deleted file mode 100644
index 0bea2e7afe3..00000000000
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf
deleted file mode 100644
index 3d733daed9f..00000000000
--- a/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf
deleted file mode 100644
index d4db13e82b2..00000000000
--- a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
index 0a756444561..dba795045a2 100644
--- a/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
@@ -2,7 +2,8 @@
% polyglossia.dtx generated using mkpolyglossiadtx.pl
% (derived from makedtx.pl version 0.94b (c) Nicola Talbot)
%
-% Created on 2012/4/29 23:15
+% To extract the files, use xetex polyglossia.dtx or luatex polyglossia.dtx
+%
%<*internal>
\iffalse
%</internal>
@@ -10,14 +11,16 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.2.1 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.3 ¦
¦ ¦
- ¦ Modern multilingual typesetting with XeLaTeX ¦
+ ¦ Modern multilingual typesetting ¦
+ ¦ with XeLaTeX and LuaLaTeX ¦
¦ ¦
¦----------------------------------------------¦
-This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 68 different languages.
+This package provides a complete Babel replacement for users of XeLaTeX and
+(at an early stage) LuaLaTeX. This version includes support for 74 different
+languages.
Polyglossia makes it possible to automate the following tasks:
@@ -39,7 +42,8 @@ Polyglossia makes it possible to automate the following tasks:
Several features of Babel that do not make sense in the XeTeX world (like font
encodings, shorthands, etc) are not supported. For German however, several
-shorthands do make sense and can be activated with the language option babelshorthands=true.
+shorthands do make sense and can be activated with the language option
+babelshorthands=true.
Polyglossia is distributed in the traditional way with *.dtx and *.ins files,
and also comes with a TDS-conformant ready-to-unpack zip file.
@@ -60,6 +64,12 @@ http://github.com/reutenauer/polyglossia/issues
CHANGES
+1.3 (11-05-2013)
+ * Several bugfixes.
+ * Sync with Babel 3.9.
+ * Added support for LuaTeX.
+ * Added support for Tibetan (end of lines are experimental).
+
1.2.0e (28-04-2012)
* Fixed a number of outstanding and not very interesting bugs.
* Added gloss files for Romansh and Friulan, contributed by Claudio
@@ -212,16 +222,6 @@ CHANGES
1.0
* Initial release on CTAN
-
-
- ------------------------------
- Arthur Reutenauer, April 2012
- <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
-
- Original author:
- François Charette
- <firmicus ατ gmx δοτ net>
- ------------------------------
%</README>
%<*internal>
\fi
@@ -233,19 +233,21 @@ CHANGES
%<*batchfile>
\input docstrip.tex
\keepsilent
+\let\MetaPrefix\relax
\preamble
____________________________
The polyglossia package
(C) 2008–2010 François Charette
- (C) 2012 Arthur Reutenauer
+ (C) 2010-2013 Arthur Reutenauer
+ (C) 2013 Elie Roux
License information appended
\endpreamble
\postamble
- Copyright (C) 2012 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
+ Copyright (C) 2013 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
@@ -261,15 +263,8 @@ CHANGES
\endpostamble
+\let\MetaPrefix\DoubleperCent
\askforoverwritefalse
-\generate{\file{polyglossia.sty}{\from{polyglossia.dtx}{polyglossia.sty}}}
-\generate{\file{farsical.sty}{\from{polyglossia.dtx}{farsical.sty}}}
-\generate{\file{hebrewcal.sty}{\from{polyglossia.dtx}{hebrewcal.sty}}}
-\generate{\file{hijrical.sty}{\from{polyglossia.dtx}{hijrical.sty}}}
-\generate{\file{babel-hebrewalph.def}{\from{polyglossia.dtx}{babel-hebrewalph.def}}}
-\generate{\file{babelsh.def}{\from{polyglossia.dtx}{babelsh.def}}}
-\generate{\file{cal-util.def}{\from{polyglossia.dtx}{cal-util.def}}}
-\generate{\file{xgreek-fixes.def}{\from{polyglossia.dtx}{xgreek-fixes.def}}}
\generate{\file{gloss-albanian.ldf}{\from{polyglossia.dtx}{gloss-albanian.ldf}}}
\generate{\file{gloss-amharic.ldf}{\from{polyglossia.dtx}{gloss-amharic.ldf}}}
\generate{\file{gloss-arabic.ldf}{\from{polyglossia.dtx}{gloss-arabic.ldf}}}
@@ -298,6 +293,7 @@ CHANGES
\generate{\file{gloss-friulan.ldf}{\from{polyglossia.dtx}{gloss-friulan.ldf}}}
\generate{\file{gloss-galician.ldf}{\from{polyglossia.dtx}{gloss-galician.ldf}}}
\generate{\file{gloss-german.ldf}{\from{polyglossia.dtx}{gloss-german.ldf}}}
+\generate{\file{gloss-greek-new.ldf}{\from{polyglossia.dtx}{gloss-greek-new.ldf}}}
\generate{\file{gloss-greek.ldf}{\from{polyglossia.dtx}{gloss-greek.ldf}}}
\generate{\file{gloss-hebrew.ldf}{\from{polyglossia.dtx}{gloss-hebrew.ldf}}}
\generate{\file{gloss-hindi.ldf}{\from{polyglossia.dtx}{gloss-hindi.ldf}}}
@@ -317,6 +313,7 @@ CHANGES
\generate{\file{gloss-norsk.ldf}{\from{polyglossia.dtx}{gloss-norsk.ldf}}}
\generate{\file{gloss-nynorsk.ldf}{\from{polyglossia.dtx}{gloss-nynorsk.ldf}}}
\generate{\file{gloss-occitan.ldf}{\from{polyglossia.dtx}{gloss-occitan.ldf}}}
+\generate{\file{gloss-piedmontese.ldf}{\from{polyglossia.dtx}{gloss-piedmontese.ldf}}}
\generate{\file{gloss-polish.ldf}{\from{polyglossia.dtx}{gloss-polish.ldf}}}
\generate{\file{gloss-portuges.ldf}{\from{polyglossia.dtx}{gloss-portuges.ldf}}}
\generate{\file{gloss-romanian.ldf}{\from{polyglossia.dtx}{gloss-romanian.ldf}}}
@@ -334,6 +331,7 @@ CHANGES
\generate{\file{gloss-tamil.ldf}{\from{polyglossia.dtx}{gloss-tamil.ldf}}}
\generate{\file{gloss-telugu.ldf}{\from{polyglossia.dtx}{gloss-telugu.ldf}}}
\generate{\file{gloss-thai.ldf}{\from{polyglossia.dtx}{gloss-thai.ldf}}}
+\generate{\file{gloss-tibetan.ldf}{\from{polyglossia.dtx}{gloss-tibetan.ldf}}}
\generate{\file{gloss-turkish.ldf}{\from{polyglossia.dtx}{gloss-turkish.ldf}}}
\generate{\file{gloss-turkmen.ldf}{\from{polyglossia.dtx}{gloss-turkmen.ldf}}}
\generate{\file{gloss-ukrainian.ldf}{\from{polyglossia.dtx}{gloss-ukrainian.ldf}}}
@@ -346,6 +344,10 @@ CHANGES
\generate{\file{devanagaridigits.map}{\from{polyglossia.dtx}{devanagaridigits.map}}}
\generate{\file{farsidigits.map}{\from{polyglossia.dtx}{farsidigits.map}}}
\generate{\file{thaidigits.map}{\from{polyglossia.dtx}{thaidigits.map}}}
+\def\MetaPrefix{-- }
+\generate{\file{polyglossia-frpt.lua}{\from{polyglossia.dtx}{polyglossia-frpt.lua}}}
+\generate{\file{polyglossia.lua}{\from{polyglossia.dtx}{polyglossia.lua}}}
+\let\MetaPrefix\DoubleperCent
%</batchfile>
%<batchfile>\endbatchfile
%<*internal>
@@ -360,16 +362,12 @@ CHANGES
%
%<*driver>
\documentclass[11pt]{ltxdoc}
-\usepackage[dvipdfm]{color}
-\usepackage{xltxtra}
+\usepackage{color}
\usepackage{xspace,fancyvrb}
\usepackage[neverdecrease]{paralist}
\definecolor{myblue}{rgb}{0.02,0.04,0.48}
\definecolor{lightblue}{rgb}{0.61,.8,.8}
\definecolor{myred}{rgb}{0.65,0.04,0.07}
-\definecolor{darkgray}{gray}{0.3}
-\definecolor{lightgray}{gray}{0.6}
-\definecolor{mygreen}{rgb}{0,.43,0}
\usepackage[
bookmarks=true,
colorlinks=true,
@@ -378,14 +376,16 @@ CHANGES
citecolor=myblue,
hyperindex=false,
hyperfootnotes=false,
- pdftitle={Polyglossia: A Babel replacement for XeLaTeX},
- pdfauthor={F Charette <firmicus · gmx · net>},
- pdfkeywords={xetex, xelatex, multilingual, babel, hyphenation}
+ pdftitle={Polyglossia: A Babel replacement for XeLaTeX and LuaLaTeX},
+ pdfauthor={F Charette, A Reutenauer},
+ pdfkeywords={xetex, xelatex, luatex, lualatex, multilingual, babel, hyphenation}
]{hyperref}
\usepackage[babelshorthands]{polyglossia}
-%\usepackage{farsical} <<< needs to be disabled otherwise we have too many counters!
+\usepackage{farsical}
\setmainlanguage[variant=british,ordinalmonthday=false]{english}
\setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan}
+\usepackage{metalogo}
+\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}}
@@ -401,43 +401,26 @@ CHANGES
\def\etc{\@ifnextchar.{\textit{etc}}{\textit{etc.}\@\xspace}}
%% Sidenotes << copied from fontspec.dtx
-\newcommand\warn[2]{%
- \edef\thisversion{#1}%
- \ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{red}\fi
- $\leftarrow$}%
- \marginpar{\raggedleft
- \small%
- \ifx\thisversion\fileversion\color{red}\fi
- \notefont #1:~#2}}
-
\newcommand\new[1]{%
\edef\thisversion{#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
- \notefont #1}}
+ \textsf{#1}}}
\newcommand\displaycmd[2]{%
\\\DescribeMacro{#2}\centerline{\cmd{#1}}}
\renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}%
{\end{compactitem}}
\renewenvironment{enumerate}{\begin{compactenum}}{\end{compactenum}}
-%% Sidenote font
-\newfontfamily\notefont[Scale=MatchLowercase]{Lucida Sans Unicode}
-%%%
-
%% fontspec declarations:
-\setromanfont[Mapping=tex-text]{Linux Libertine O}
-\defaultfontfeatures{Scale=MatchLowercase}
-\setmonofont{DejaVu Sans Mono}
-\setsansfont{Lucida Sans Unicode}
-\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
-\newfontfamily\farsifont[Script=Arabic]{Farsi Simple Bold}
+\setmainfont{Linux Libertine O}
+\setsansfont{Linux Biolinum O}
+\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem}
-\newfontfamily\hebrewfont[Script=Hebrew]{SBL Hebrew}
-
-\newcommand\Babel{\pkg{Babel}\xspace}
+\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}
\linespread{1.05}
\frenchspacing
@@ -460,10 +443,9 @@ CHANGES
%
% \GetFileInfo{polyglossia.sty}
%
-% \title{\textcolor{lightblue}{\huge
-% \fontspec{GFS Ambrosia}
-% Π$\;\,$ο$\;\,$λ$\;\,$υ$\;\,$γ$\;\,$λ$\;\,$ω$\;\,$σ$\;\,$σ$\;\,$ι$\;\,$α}\\[16pt]
-% \color{myblue}Polyglossia: A Babel Replacement for \XeLaTeX}
+% \title{\textcolor{lightblue}{\Huge\fontspec[Script=Greek,Language=Polytonic Greek,LetterSpace=40]{GFS Ambrosia} Πολυγλωσσια}
+% \\[16pt]
+% \color{myblue}Polyglossia: A Babel Replacement for \XeLaTeX\ and \LuaLaTeX}
% \author{\scshape\color{myblue}François Charette\\\color{myblue}Current maintainer: \scshape Arthur Reutenauer}
% \date{\filedate \qquad \fileversion\\
% \footnotesize (\textsc{pdf} file generated on \today)}
@@ -482,9 +464,10 @@ CHANGES
%
% \section{Introduction}
%
-% Polyglossia is a package for facilitating multilingual typesetting with \XeLaTeX.
-% Basically, it can be used as a replacement of \Babel for performing the
-% following tasks automatically:
+% Polyglossia is a package for facilitating multilingual typesetting with
+% \XeLaTeX\ and (at an early stage) \LuaLaTeX. Basically, it
+% can be used as a replacement of \pkg{babel} for performing the following
+% tasks automatically:
%
% \begin{enumerate}
% \item Loading the appropriate hyphenation patterns.
@@ -507,16 +490,16 @@ CHANGES
% available separately).
% \end{enumerate}
%
-% Several features of \Babel that do not make sense in the \XeTeX\ world (like font
+% 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
-% with the fundamental features of \Babel while being cleaner, light-weight,
+% with the fundamental features of \pkg{babel} while being cleaner, light-weight,
% and modern. The package \pkg{antomega} has been very beneficial in our attempt to
% reach this objective.
%
% \paragraph{Requirements:} The current version of \pkg{polyglossia} makes use of some convenient
% macros defined in the \pkg{etoolbox} package by Philipp Lehmann. Being designed
-% specifically for \XeLaTeX, it obviously also relies on \pkg{fontspec} by Will
+% for \XeLaTeX\ and \LuaLaTeX, it obviously also relies on \pkg{fontspec} by Will
% Robertson. For languages written from right to left, it needs the package \pkg{bidi}
% by Vafa Khalighi (\textarabic{وفا خليقي}). Polyglossia also bundles three packages for calendaric
% computations (\pkg{hebrewcal}, \pkg{hijrical}, and \pkg{farsical}).
@@ -528,26 +511,26 @@ CHANGES
% \displaycmd{\setdefaultlanguage[⟨options⟩]\{lang\}}{\setdefaultlanguage}
% (or equivalently \Cmd\setmainlanguage).
% Secondary languages can be loaded with
-% \displaycmd{\setotherlanguage[⟨options⟩]\{lang\}}{\setotherlanguage}.
+% \displaycmd{\setotherlanguage[⟨options⟩]\{lang\}.}{\setotherlanguage}
% These commands have the advantage of being explicit and of allowing you to set
% language-specific options.\footnote{ %
% More on language-specific options below.}
% It is also possible to load a series of secondary languages at once using
-% \displaycmd{\setotherlanguages\{lang1,lang2,lang3,…\}}{\setotherlanguages}.
+% \displaycmd{\setotherlanguages\{lang1,lang2,lang3,…\}.}{\setotherlanguages}
% Language-specific options can be set or changed at any time by means of
-% \displaycmd{\setkeys\{⟨lang⟩\}\{opt1=value1,opt2=value2,…\}}{\setkeys}.
+% \displaycmd{\setkeys\{⟨lang⟩\}\{opt1=value1,opt2=value2,…\}.}{\setkeys}
%
%
% \subsection{The “Babel way”}
% \new{v1.2.0}
% {\color{red}\bfseries Warning}: \pkg{polyglossia} no longer supports loading
% language definition files as package options!
-% ^^AAs with \Babel, \pkg{polyglossia} also allows you to load language definition files
+% ^^AAs with \pkg{babel}, \pkg{polyglossia} also allows you to load language definition files
% ^^Aas package options. In most cases, option \texttt{⟨lang⟩} will load the file
% ^^A\file{gloss-⟨lang⟩.ldf}. Note however that the \textit{first} language listed in \\
% ^^A\centerline{\cmd{\usepackage[lang1,lang2,…]{polyglossia}}}
% ^^Awill be the default language for the document, which
-% ^^Ais the opposite convention of \Babel.
+% ^^Ais the opposite convention of \pkg{babel}.
% ^^ANote also that this method may not work in some cases, and should be
% ^^Aconsidered deprecated.
%
@@ -634,15 +617,15 @@ CHANGES
% amharic & czech & \TX{hindi} & nynorsk & \TX{syriac} \\
% \TX{arabic} & danish & icelandic & occitan & tamil \\
% armenian & divehi & interlingua & polish & telugu \\
-% asturian & \TX{dutch} & irish & portuges & \TX{thai} \\
-% bahasai & \TX{english} & \TX{italian} & romanian & turkish \\
-% bahasam & \TX{esperanto} & \TX{lao} & \TX{russian} & turkmen \\
-% basque & estonian & latin & samin & ukrainian \\
-% \TX{bengali} & \TX{farsi} & latvian & \TX{sanskrit}& urdu \\
-% brazil[ian] & finnish & lithuanian & scottish & \TX{usorbian} \\
-% breton & french & \TX{lsorbian} & \TX{serbian} & vietnamese \\
-% bulgarian & galician & \TX{magyar} & slovak & welsh \\
-% \TX{catalan} & \TX{german} & malayalam & slovenian & \\
+% asturian & \TX{dutch} & irish & portuges & tibetan \\
+% bahasai & \TX{english} & \TX{italian} & romanian & \TX{thai} \\
+% bahasam & \TX{esperanto} & \TX{lao} & \TX{russian} & turkish \\
+% basque & estonian & latin & samin & turkmen \\
+% \TX{bengali} & \TX{farsi} & latvian & \TX{sanskrit}& ukrainian \\
+% brazil[ian] & finnish & lithuanian & scottish & urdu \\
+% breton & french & \TX{lsorbian} & \TX{serbian} & \TX{usorbian} \\
+% bulgarian & galician & \TX{magyar} & slovak & vietnamese \\
+% \TX{catalan} & \TX{german} & malayalam & slovenian & welsh \\
% coptic & \TX{greek} & marathi & spanish & \\
% \hline
% \end{tabular}
@@ -662,7 +645,7 @@ CHANGES
%
%
% Polyglossia can also be loaded with the option
-% ‘babelshorthands’\new{v1.1.1}, which globally activates \Babel
+% ‘babelshorthands’\new{v1.1.1}, which globally activates \pkg{babel}
% shorthands whenever available. Currently shorthands are implemented for
% Catalan, Dutch, German, Italian, and Russian: see these respective
% languages for details.
@@ -708,25 +691,6 @@ CHANGES
% Note that for Arabic one cannot use the environment ¦arabic¦,
% as \cmd\arabic\ is defined internally by \LaTeX. In this case
% we need to use the environment ¦Arabic¦ instead\DescribeEnv{Arabic}.
-% This is the beginning of Ibn Khaldūn’s \textit{Muqaddima}:
-%
-% ^^A TODO: convince XeTeX to typeset right-to-left, even in verbatim.
-% ^^A The individual words are set correctly, but the whole paragraph is
-% ^^A left-to-right!
-% \begin{Verbatim}[formatcom={\color{myblue}\addfontfeature{Script=Arabic}}]
-% \begin{Arabic}
-% اعلم أنّ فنّ التاريخ فنّ عزيز المذهب، جمّ الفوائد، شريف الغاية؛ إذ هو
-% يوقفنا على أحوال الماضين من الأمم في أخلاقهم، والأنبياء في سيرهم، والملوك
-% في دولهم وسياستهم؛ حتّى تتمّ فائدة الإقتداء في ذلك لمن يرومه في أحوال
-% الدين والدنيا.
-% \end{Arabic}
-% \end{Verbatim}
-%
-% \begin{Arabic}
-% اعلم أنّ فنّ التاريخ فنّ عزيز المذهب، جمّ الفوائد، شريف الغاية؛ إذ هو يوقفنا على
-% أحوال الماضين من الأمم في أخلاقهم، والأنبياء في سيرهم، والملوك في دولهم
-% وسياستهم؛ حتّى تتمّ فائدة الإقتداء في ذلك لمن يرومه في أحوال الدين والدنيا.
-% \end{Arabic}
%
% \subsection{Other commands}
% The following commands are probably of lesser interest to the end user, but
@@ -740,33 +704,26 @@ CHANGES
% to another one in the middle of a document: \textit{this may have adverse effects}!
%
% \item \Cmd\normalfontlatin: in an environment where \cmd\normalfont\ has been redefined
-% to a non-latin script, this will call the font defined with \cmd\setromanfont\ etc.
+% to a non-latin script, this will call the font defined with \cmd\setmainfont\ etc.
% Likewise it is possible to use \Cmd\rmfamilylatin, \Cmd\sffamilylatin,
% and \Cmd\ttfamilylatin.
%
-% \item Some macros defined in \Babel’s \file{hyphen.cfg} (and thus usually
-% compiled into the xelatex format) are redefined, but keep a similar
+% \item 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, namely \Cmd\selectlanguage, \Cmd\foreignlanguage,
% and the environment ¦otherlanguage¦\DescribeEnv{otherlanguage}.
% \end{itemize}
% ^^A
-% Since the \XeLaTeX\ format incorporates \Babel’s \file{hyphen.cfg},
+% Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg},
% the low-level commands for hyphenation and language switching
% defined there are also accessible.
-% ^^A\footnote{ %
-% ^^A The file \file{hyphen\_cfg} (available on the
-% ^^A \href{http://scripts.sil.org/svn-view/xetex/TRUNK/texmf/tex/xelatex/polyglossia/hyphen\_cfg}{\XeTeX\ subversion repository})
-% ^^A is meant to eventually replace \Babel’s \file{hyphen.cfg}. If you want
-% ^^A to experiment with it, rename it into \file{hyphen.cfg}, copy it to
-% ^^A \texttt{…/tex/xelatex/polyglossia/} and rebuild the xelatex format.}
-%
%
% \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¦.
-% For instance, if the default roman font defined by \cmd\setromanfont\
+% 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⟩\}}. }
% Note that polyglossia will use the font thus defined as is.
@@ -807,13 +764,13 @@ CHANGES
% \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}
-% 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{ج}.
+% 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}
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
-% \item \Cmd\aemph to emphasize Arabic text with ¦\overline¦:\new{v1.2.0}
-% ¦\textarabic{مثال: \aemph{اب}}¦ yields \textarabic{مثال: \aemph{اب}}.
+% \item \Cmd\aemph to emphasize text with ¦\overline¦.\new{v1.2.0}
+% ¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}.
% This command is also available for Farsi, Urdu, etc.
% \end{itemize}
%
@@ -831,7 +788,7 @@ CHANGES
% \end{itemize}
% \textbf{Commands}:
% \begin{itemize}
-% \item \Cmd{\l.l} and \Cmd{\L.L} behave as in \Babel to type a geminated l, as in \textit{co\l.laborar}. \new{v1.1.1}
+% \item \Cmd{\l.l} and \Cmd{\L.L} behave as in \pkg{babel} to type a geminated l, as in \textit{co\l.laborar}. \new{v1.1.1}
% In polyglossia the same can also be achieved with \Cmd{\l·l} and \Cmd{\L·L}.\footnote{ %
% NB: · is the glyph U+00B7 MIDDLE DOT.}
% \end{itemize}
@@ -840,7 +797,7 @@ CHANGES
% \textbf{Options:}
% \begin{itemize}
% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
-% if this is turned on, all shorthands defined in \Babel
+% if this is turned on, all shorthands defined in \pkg{babel}
% for fine-tuning the hyphenation of Dutch words are activated.
% \begin{itemize}
% \item ¦"-¦ for an explicit hyphen sign, allowing hyphenation in the rest of the word
@@ -863,7 +820,7 @@ CHANGES
% \subsection{esperanto}\label{esperanto}
% \textbf{Commands}:
% \begin{itemize}
-% \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \Babel documentation)
+% \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \pkg{babel} documentation)
% \end{itemize}
%
% \subsection{farsi}\label{farsi}
@@ -899,7 +856,7 @@ CHANGES
% 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 \Babel
+% if this is turned on, all shorthands defined in \pkg{babel}
% for fine-tuning the hyphenation of German words are activated.
% \begin{itemize}
% \item ¦"ck¦ for ¦ck¦ to be hyphenated as ¦k-k¦
@@ -983,14 +940,14 @@ CHANGES
% \subsection{lsorbian and usorbian}\label{lsorbian}\label{usorbian}
% \textbf{Commands}:
% \begin{itemize}
-% \item \Cmd\oldtoday : see the \Babel documentation.
+% \item \Cmd\oldtoday : see the \pkg{babel} documentation.
% \end{itemize}
%
% \subsection{magyar}\label{magyar}
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\ontoday\ (= \Cmd\ondatemagyar): special forms of \cmd\today\
-% (see the \Babel documentation).
+% (see the \pkg{babel} documentation).
% \end{itemize}
%
%
@@ -1043,7 +1000,7 @@ CHANGES
% \section{Modifying or extending captions and date formats}
%
% To redefine internal macros, you can use the command ¦\gappto¦ from the package
-% \pkg{etoolbox}. For compatibility with \Babel the command ¦\addto¦ is also available
+% \pkg{etoolbox}. For compatibility with \pkg{babel} the command ¦\addto¦ is also available
% with the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
% you can do this:
% \begin{verbatim}
@@ -1054,12 +1011,12 @@ CHANGES
%
% Several scripts have their own versions of the decimal digits commonly called
% ‘Arabic numerals’. With the appropriate language option set, \pkg{polyglossia}
-% will automatically convert the output of internal LaTeX counters to their
+% will automatically convert the output of internal \LaTeX\ counters to their
% localized forms, for instance to display page, chapter and section numbers.
%
% In previous versions this conversion was achieved my means of TECKit fontmappings.
-% If needed they can be activated with the fontspec option
-% ¦Mapping=arabicdigits¦ (or ¦farsidigits¦ or ¦thaidigits¦).
+% If needed they can be activated with the fontspec ¦Mapping¦ option,
+% using ¦arabicdigits¦, ¦farsidigits¦ or ¦thaidigits¦.
% For instance if \cmd\arabicfont\ is defined with the option ¦Mapping=arabicdigits¦,
% then by typing ¦\textarabic{2010}¦ one will obtain \textarabic{٢٠١٠}.
%
@@ -1086,34 +1043,34 @@ CHANGES
% Example: ¦\greeknumeral{1863}¦ yields \textgreek{\greeknumeral{1863}}.
%
% The Arabic \textit{abjad} numbers can be generated with the command \Cmd\abjad.
-% Example: ¦\abjad{1863}¦ yields {\arabicfont\abjad{1863}}.
+% Example: ¦\abjad{1863}¦ yields \textarabic{\abjad{1863}}.
% In the Maghrib the conventions are somewhat different, and the maghribi forms
% of the \textit{abjad} numerals are obtained with the \Cmd\abjadmaghribi\ command.
-% Example: ¦\abjadmaghribi{1863}¦ yields {\arabicfont\abjadmaghribi{1863}}.
+% Example: ¦\abjadmaghribi{1863}¦ yields \textarabic{\abjadmaghribi{1863}}.
%
% The code for Hebrew numerals, which was incorrect in previous versions, was
-% ported from the implementation in \Babel with v1.1.1\new{v1.1.1}, and the
-% user interface is identical to the one in \Babel.
+% ported from the implementation in \pkg{babel} with v1.1.1\new{v1.1.1}, and the
+% user interface is identical to the one in \pkg{babel}.
% The commands \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal\ behave exactly
-% as they do in \Babel: the second command prints the number with \textit{gereshayim} before
+% as they do in \pkg{babel}: the second command prints the number with \textit{gereshayim} before
% the last letter, and the latter uses in addition the final forms of Hebrew letters.
% Examples:
-% ¦\hebrewnumeral{1750}¦ yields {\hebrewfont\hebrewnumeral{1750}}.
-% ¦\Hebrewnumeral{1750}¦ yields {\hebrewfont\Hebrewnumeral{1750}}.
-% ¦\Hebrewnumeralfinal{1750}¦ yields {\hebrewfont\Hebrewnumeralfinal{1750}}.
+% ¦\hebrewnumeral{1750}¦ yields \texthebrew{\hebrewnumeral{1750}},
+% ¦\Hebrewnumeral{1750}¦ yields \texthebrew{\Hebrewnumeral{1750}},
+% and ¦\Hebrewnumeralfinal{1750}¦ yields \texthebrew{\Hebrewnumeralfinal{1750}}.
%
%
% Support is also provided for Syriac abjad numerals, which can be generated
% with \Cmd\abjadsyriac.\footnote{ %
% A fine guide to numerals in Syriac can be found at \link{http://www.garzo.co.uk/documents/syriac-numerals.pdf}.}
-% Example: ¦\abjadsyriac{463}¦ yields {\syriacfont\abjadsyriac{463}}.
+% Example: ¦\abjadsyriac{463}¦ yields \textsyriac{\abjadsyriac{463}}.
%
%
% \section{Calendars}
%
% \subsection{Hebrew calendar (hebrewcal.sty)}
% The package \file{hebrewcal.sty} is almost a verbatim copy of \file{hebcal.sty}
-% that comes with \Babel.
+% that comes with \pkg{babel}.
% The command \Cmd\Hebrewtoday\ formats the current date in the Hebrew calendar
% (depending of the current writing direction this will automatically set either
% in Hebrew script or in roman transliteration).
@@ -1135,7 +1092,7 @@ CHANGES
% 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\{<lang>\}\{<code>\}.}{\DefineHijriDateFormat}
%
% The command ¦\Hijritoday¦ also accepts an optional argument to add or subtract a correction
% (in days) to the date computed by the arithmetical algorithm.\footnote{ %
@@ -1155,7 +1112,7 @@ CHANGES
% Reingold \& Gershowitz (ref.~n.~\ref{reingold}).}
% Here we have renamed the command \cmd\ftoday\ to
% \Cmd\Jalalitoday.
-% ^^AExample: today is \Jalalitoday.
+% Example: today is \Jalalitoday.
%
%
% ^^A\section{Varia}
@@ -1165,7 +1122,7 @@ CHANGES
% \pkg{Polyglossia} is notable for being a recycle box of previous contributions
% by other people. I take this opportunity to thank the following individuals,
% whose splendid work has made my task almost trivial in comparision: Johannes
-% Braams and the numerous contributors to the \Babel{} package (in particular
+% Braams and the numerous contributors to the \pkg{babel}{} package (in particular
% Boris Lavva and others for its Hebrew support), Alexej Kryukov (\pkg{antomega}), Will
% Robertson (\pkg{fontspec}), Apostolos Syropoulos (\pkg{xgreek}), Youssef Jabri
% (\pkg{arabi}), and Vafa Khalighi (\pkg{xepersian} and \pkg{bidi}).
@@ -1191,2235 +1148,6 @@ CHANGES
% \StopEventually{}
% \section{Implementation}
% \iffalse
-%<*polyglossia.sty>
-% \fi
-% \clearpage
-%
-% \subsection{polyglossia.sty}
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2012/04/29 v1.2.1
- Babel replacement for XeLaTeX]
-\RequirePackage{etoolbox}
-\RequirePackage{makecmds}
-\RequirePackage{xkeyval}[2008/08/13]
-\RequirePackage{fontspec}[2010/06/08]% v2.0
-% fontspec now uses LaTeX3 packages such as expl3, so we need this:
-\ExplSyntaxOn
-
-\ifcsundef{newXeTeXintercharclass}{%
- \xpg@error{Your~ xelatex~ format~ appears~ to~ be~ outdated!^^J
-~~~~Please~ update~ your~ system~ and~ recreate~ it~ with~ fmtutil.}
- }{}
-
-%% This is for compatibility with Babel-aware package:
-\cslet{ver@babel.sty}{\@empty} % this "fakes" babel
-\def\languageshorthands#1{\relax} %this is for scrlttr2 class
-\AtEndPreamble{\let\bbl@set@language\xpg@set@language} %for biblatex
-\AtEndPreamble{\let\bbl@main@language\xpg@main@language} %for biblatex
-
-%% for \docvslist (etoolbox)
-\providecommand*{\do}[1]{}%
-
-%% custom message macros
-\providecommand*{\xpg@error}[1]{%
- \PackageError{polyglossia}{#1}{}%
-}
-
-\providecommand*{\xpg@warning}[1]{%
- \PackageWarning{polyglossia}{#1}%
-}
-
-\providecommand*{\xpg@info}[1]{%
- \PackageInfo{polyglossia}%
- {#1\@gobble}%
-} %% the \@gobble is to prevent displaying the line nr
-
-%TODO change all instances of \xpg@nopatterns in gloss-*.ldf files
-\providecommand*{\xpg@nopatterns@fallback}[2][nohyphenation]{%
- \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#2'\MessageBreak
- I~ will~ use~ \string\language=\string\l@ #1\space instead}%
- \expandafter\adddialect\csname l@#2\expandafter\endcsname\csname l@#1\endcsname\relax}
-
- \providecommand*{\xpg@nopatterns}[1]{%
- \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#1'\MessageBreak
- I~ will~ use~ \string\language=\string\l@nohyphenation\space instead}%
- %%TODO? \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
- }
-
-\def\xpg@ill@value#1#2{%
- \xpg@warning{Illegal~ value~ (#1)~ for~ #2}}
-
-%% use macro if defined, else warn that it is not
-\def\csuse@warn#1{%
- \ifcsundef{#1}{\xpg@warning{ \expandafter\string\csname #1\endcsname\space is~ not~ defined}}%
- {\csname #1\endcsname}}
-
-%% ensure directionality if bidi is loaded, else ignore
-\def\@@ensure@dir#1{\ifcsundef{@ensure@dir}{#1}{\@ensure@dir{#1}}}
-\def\@@ensure@maindir#1{\ifcsundef{@ensure@maindir}{#1}{\@ensure@maindir{#1}}}
-
-%% compatibility with babel
-\let\addto\gappto% gappto is defined in etoolbox
-
-%% == Utility macros ==
-%% They are needed because \MakeUppercase and \MakeLowercase are protected,
-%% but we need to change case while defining csnames when setting up fonts for
-%% non-Latin scripts. For instance with "Script=Arabic" we need to lowercase
-%% "Arabic" to create \arabicfont.
-\def\xpg@uppercasefirst#1{\expandafter\xpg@@uppercasefirst #1}
-\def\xpg@@uppercasefirst#1{%
- \if a#1A\else
- \if b#1B\else
- \if c#1C\else
- \if d#1D\else
- \if e#1E\else
- \if f#1F\else
- \if g#1G\else
- \if h#1H\else
- \if i#1I\else
- \if j#1J\else
- \if k#1K\else
- \if l#1L\else
- \if m#1M\else
- \if n#1N\else
- \if o#1O\else
- \if p#1P\else
- \if q#1Q\else
- \if r#1R\else
- \if s#1S\else
- \if t#1T\else
- \if u#1U\else
- \if v#1V\else
- \if w#1W\else
- \if x#1X\else
- \if y#1Y\else
- \if z#1Z\else
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-
-\def\xpg@lowercasefirst#1{\expandafter\xpg@@lowercasefirst #1}
-\def\xpg@@lowercasefirst#1{%
- \if A#1a\else
- \if B#1b\else
- \if C#1c\else
- \if D#1d\else
- \if E#1e\else
- \if F#1f\else
- \if G#1g\else
- \if H#1h\else
- \if I#1i\else
- \if J#1j\else
- \if K#1k\else
- \if L#1l\else
- \if M#1m\else
- \if N#1n\else
- \if O#1o\else
- \if P#1p\else
- \if Q#1q\else
- \if R#1r\else
- \if S#1s\else
- \if T#1t\else
- \if U#1u\else
- \if V#1v\else
- \if W#1w\else
- \if X#1x\else
- \if Y#1y\else
- \if Z#1z\else
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-
-%% NEW EXPERIMENTAL SETUP INTERFACE FOR GLOSS FILES
-%% options currently available:
-%% language : the name of the language (as understood by fontspec)
-%% hyphennames : the different hyphenation patterns to try (comma separated list)
-%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback, with \xpg@nopatterns@fallback - i.e. with a warning: e.g. sanskrit for hindi, or catalan for asturian.
-%% script : the name of the script (as understood by fontspec) – default is Latin
-%% direction : the direction of the script: LR or RL
-%% scripttag : the OpenType tag for the script
-%% langtag : the OpenType tag for the language
-%% hyphenmins : the hyphenmins for this language (comma-sep list of two integers)
-%% frenchspacing : boolean
-%% indentfirst : boolean
-%% fontsetup : boolean
-%% TODO: nouppercase : boolean (for scripts like Arabic, Devanagari, etc which have no concept of uppercase/lowercase)
-%% TODO: localalph = {<alph_csname>,<Alph_csname>}
-%% TODO: localnumber = <csname>
-%% or even better localdigits = {0123456789} for fully automatic setup
-
-\newcommand*\PolyglossiaSetup[2]{%
- %define booleans etoolbox style and set defaults
- %% TODO ? \providetoggle{#1@setup@done}%
- \providetoggle{#1@RL}%
- \providetoggle{#1@latin}\toggletrue{#1@latin}%
- \providetoggle{#1@scriptlangequal}% whether lang and script names are same: e.g. Hebrew, Arabic
- \providebool{#1@fontsetup}%
- \providebool{#1@indentfirst}%
- \providebool{#1@frenchspacing}%
- % we initialize these so that we can use \gappto below
- \csgdef{init@extras@#1}{}%
- \csgdef{init@noextras@#1}{}% we don't use this yet: remove?
- \csgdef{xpg@langname@#1}{\xpg@uppercasefirst{#1}}%
- %needed for docvslist with hyphennames key:
- \renewcommand*{\do}[1]{%
- \ifcsdef{l@#1}{}{%
- \ifstrequal{#1}{##1}{}%
- {\ifcsdef{l@##1}%
- {\csletcs{l@#1}{l@##1}\listbreak}%
- {}%
- }%
- }%
- }%
- %define all keys:
- \xpg@define@keys{#1}%
- \setkeys[xpg@setup]{#1}{#2}%
- % here we do the fontsetup:
- \ifbool{#1@fontsetup}%
- {\xpg@fontsetup@auto{#1}}%
- {\xpg@info{Skipping~ automatic~ font~ setup~ for~ language~ #1}}%
- %% TODO? \toggletrue{#1@setup@done}%
- % reinit \do
- \renewcommand*{\do}[1]{\setotherlanguage{##1}}%
-}
-
-\def\xpg@first#1,#2{#1}
-\def\xpg@second#1,#2{#2}
-
-\def\xpg@define@keys#1{%
- \define@key[xpg@setup]{#1}{script}{%
- \ifstrequal{##1}{Latin}%
- {\toggletrue{#1@latin}}%
- {\togglefalse{#1@latin}}%
- \csgdef{xpg@scriptname@#1}{##1}%
- \csgdef{xpg@scriptname@#1@lc}{\xpg@lowercasefirst{##1}}}%
- \define@key[xpg@setup]{#1}{scripttag}{%
- \csgdef{xpg@scripttag@#1}{##1}}%
- \define@key[xpg@setup]{#1}{language}{%
- \csgdef{xpg@langname@#1}{##1}}%
- \define@key[xpg@setup]{#1}{langtag}{%
- \csgdef{xpg@langtag@#1}{##1}}%
- \define@key[xpg@setup]{#1}{hyphennames}[{#1}]{%
- \docsvlist{##1}%
- % if l@#1 does not yet exist,
- % we assign it to nohyphenation
- % we do this here in case the hyphennames key was omitted
- \ifcsundef{l@#1}%
- {\xpg@nopatterns{\csname xpg@langname@#1\endcsname}%
- \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}{}%
- \csdef{#1@language}{\language=\csname l@#1\endcsname}%
- }%
- \define@choicekey+[xpg@setup]{#1}{direction}[\val\nr]{LR,RL}[LR]%
- {\ifcase\nr\relax
- \togglefalse{#1@RL}%
- \or
- \toggletrue{#1@RL}%
- \ifcsundef{RTL}{\RequirePackage{bidi}}{}%
- \fi}%
- {\xpg@warning{#1: Invalid value \val\space for key "direction"}}%
- \define@key[xpg@setup]{#1}{hyphenmins}[{2,3}]%
- {\begingroup\edef\x{\endgroup
- \noexpand\setlocalhyphenmins{#1}{\xpg@first##1}{\xpg@second##1}}\x}
- \define@boolkey[xpg@setup]{#1}[#1@]{frenchspacing}[true]{%
- \ifbool{#1@frenchspacing}%
- {\csgappto{init@extras@#1}{\frenchspacing}}%
- {\csgappto{init@extras@#1}{\nonfrenchspacing}}}%
- \define@boolkey[xpg@setup]{#1}[#1@]{indentfirst}[true]{%
- \ifbool{#1@indentfirst}%
- {\csgappto{init@extras@#1}{\french@indent}}%
- {\csgappto{init@extras@#1}{\nofrench@indent}}}%
-% \define@choicekey*+[xpg@setup]{#1}{fontsetup}[\val\nr]{none,custom,auto}[none]%
-% %{\csgdef{#1@fontsetup}{\val}}%
-% {\xpg@fontsetup{\val}{#1}}%
-% {\xpg@warning{Invalid value \val\space for key "fontsetup" in module "#1"}}%
- \define@boolkey[xpg@setup]{#1}[#1@]{fontsetup}[true]{}%
- %TODO assign csnames corr. to localized alph and Alph
- % \define@key[xpg@setup]{#1}{localalph}[{#1@alph,#1@Alph}]{%
- % \cslet{xpg@localalph@#1}{\expandafter\csname\xpg@first##1\endcsname}%
- % \cslet{xpg@localAlph@#1}{\expandafter\csname\xpg@second##1\endcsname}%
- %}%
- %TODO same thing with localdigits
-}
-
-%\def\xpg@fontsetup#1{\xpg@csifdef@warn{xpg@fontsetup@#1}}
-%\def\xpg@fontsetup@none#1{\csgdef{#1@font}{\ifcsdef{#1font}{\csname #1font\endcsname}{}}} %<-- simplistic
-%\def\xpg@fontsetup@custom#1{\csuse{#1@font}}
-
-\def\xpg@fontsetup@auto#1{\iftoggle{#1@latin}%
- {\xpg@fontsetup@latin{#1}}%
- {\xpg@fontsetup@nonlatin{#1}}%
-}
-
-\def\xpg@addfontfeature@lang#1#2{% #1 is langtag, #2 is langname
- % Turkish is a special case: tag can be TRK or TUR
- \edef\tmp@Turkish{Turkish}%
- \edef\tmp@@langname{#2}%
- % \ifstrequal{#2}{Turkish}%
- \ifx\tmp@@langname\tmp@Turkish
- \fontspec_if_language:nTF {TRK}%
- {\addfontfeature{Language=Turkish}}%
- {\fontspec_if_language:nTF {TUR}%
- {\addfontfeature{Language=Turkish}}%
- {}}%
- % else not Turkish
- \else
- \edef\tmp@@langparam{Language=#2}%
- \expandafter\expandafter\expandafter\fontspec_if_language:nTF \expandafter{#1}%
- {\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@langparam}}%
- {}%
- \fi
-}
-
-\def\xpg@addfontfeature@script#1#2{% #1 is scripttag, #2 is scriptname
- \edef\tmp@@scriptparam{Script=#2}%
- \expandafter\expandafter\expandafter\fontspec_if_script:nTF \expandafter{#1}%
- {\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@scriptparam}}%
- {\xpg@error{^^J
- The~ current~ roman~ font~ does~ not~ contain~ the~ \expandafter\noexpand#2 ~ script!^^J
- Please~ define~ \expandafter\string\csname \xpg@lowercasefirst{#2}font\endcsname\space with~ \string\newfontfamily}}%
-}
-
-\def\xpg@fontsetup@latin#1{%
- \begingroup
- \csgdef{#1@font@rm}{%
- \ifcsdef{#1font}{\csname #1font\endcsname}%
- {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}%
- \edef\tmp@langname{\csuse{xpg@langname@#1}}%
- \rmfamilylatin%
- \ifcsvoid{xpg@langtag@#1}{}{%
- \ifcsvoid{xpg@langname@#1}{}{%
- \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}%
- }}}%
- \csgdef{#1@font@sf}{%
- \ifcsdef{#1fontsf}{\csname #1fontsf\endcsname}%
- {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}%
- \edef\tmp@langname{\csuse{xpg@langname@#1}}%
- \sffamilylatin%
- \ifcsvoid{xpg@langtag@#1}{}{%
- \ifcsvoid{xpg@langname@#1}{}{%
- \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}%
- }}}%
- \csgdef{#1@font@tt}{%
- \ifcsdef{#1fonttt}{\csname #1fonttt\endcsname}%
- {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}%
- \edef\tmp@langname{\csuse{xpg@langname@#1}}%
- \ttfamilylatin%
- \ifcsvoid{xpg@langtag@#1}{}{%
- \ifcsvoid{xpg@langname@#1}{}{%
- \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}%
- }}}%
- \endgroup
-}
-
-\def\xpg@fontsetup@nonlatin#1{%
- \begingroup
- \edef\tmp@langname@lc{#1}% eg ukrainian
- \edef\tmp@scriptname@lc{\csuse{xpg@scriptname@#1@lc}}% eg cyrillic
- \ifx\tmp@scriptname@lc\tmp@langname@lc
- \toggletrue{#1@scriptlangequal}%
- \else
- \togglefalse{#1@scriptlangequal}%
- \fi
- \csgdef{#1@font@rm}{%
- \ifcsdef{#1font}%
- {\@nameuse{#1font}}%
- {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl
- \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic
- \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR
- \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian
- \providetoggle{#1@use@script@font}%
- \iftoggle{#1@scriptlangequal}%
- {\rmfamilylatin}%
- {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} font\endcsname% eg \cyrillicfont
- \toggletrue{#1@use@script@font}%
- \expandafter\csname\csuse{xpg@scriptname@#1@lc} font\endcsname
- \else
- \rmfamilylatin
- \fi}
- \iftoggle{#1@use@script@font}{}{%
- \ifcsvoid{xpg@scripttag@#1}{}{%
- \ifcsvoid{xpg@scriptname@#1}{}{%
- \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}%
- \ifcsvoid{xpg@langtag@#1}{}{%
- \ifcsvoid{xpg@langname@#1}{}{%
- \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}%
- }}%
- \csgdef{#1@font@sf}{%
- \ifcsdef{#1fontsf}%
- {\@nameuse{#1fontsf}}%
- {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl
- \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic
- \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR
- \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian
- \providetoggle{#1@use@script@fontsf}%
- \iftoggle{#1@scriptlangequal}%
- {\sffamilylatin}%
- {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} fontsf\endcsname% eg \cyrillicfontsf
- \toggletrue{#1@use@script@fontsf}%
- \expandafter\csname\csuse{xpg@scriptname@#1@lc} fontsf\endcsname
- \else
- \sffamilylatin
- \fi}
- \iftoggle{#1@use@script@fontsf}{}{%
- \ifcsvoid{xpg@scripttag@#1}{}{%
- \ifcsvoid{xpg@scriptname@#1}{}{%
- \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}%
- \ifcsvoid{xpg@langtag@#1}{}{%
- \ifcsvoid{xpg@langname@#1}{}{%
- \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}%
- }}%
- \csgdef{#1@font@tt}{%
- \ifcsdef{#1fonttt}%
- {\@nameuse{#1fonttt}}%
- {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl
- \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic
- \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR
- \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian
- \providetoggle{#1@use@script@fonttt}%
- \iftoggle{#1@scriptlangequal}%
- {\ttfamilylatin}%
- {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} fonttt\endcsname% eg \cyrillicfonttt
- \toggletrue{#1@use@script@fonttt}%
- \expandafter\csname\csuse{xpg@scriptname@#1@lc} fonttt\endcsname
- \else
- \ttfamilylatin
- \fi}
- \iftoggle{#1@use@script@fonttt}{}{%
- \ifcsvoid{xpg@scripttag@#1}{}{%
- \ifcsvoid{xpg@scriptname@#1}{}{%
- \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}%
- \ifcsvoid{xpg@langtag@#1}{}{%
- \ifcsvoid{xpg@langname@#1}{}{%
- \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}%
- }}%
- \endgroup
-}
-
-%%% END OF PolyglossiaSetup
-
-%% ensure localization of \markright and \markboth commands
-%%% THIS IS NOW DISABLED BY DEFAULT
-\define@boolkey{polyglossia}[xpg@]{localmarks}[false]{%
- \ifbool{xpg@localmarks}{%
- \xpg@info{Option:~ localmarks}%
- \def\local@marks##1{%
- \def\markboth####1####2{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \unrestored@protected@xdef\@themark
- {{\foreignlanguage{##1}{%
- \protect\@@ensure@maindir{####1}}}%
- {\foreignlanguage{##1}{%
- \protect\@@ensure@maindir{####2}}}}%
- \@temptokena \expandafter{\@themark}%
- \mark{\the\@temptokena}%
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi}%
- \def\markright####1{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \expandafter\@markright\@themark
- {\foreignlanguage{##1}{\protect\@@ensure@maindir{####1}}}%
- \@temptokena \expandafter{\@themark}%
- \mark{\the\@temptokena}%
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi}%
- \def\@markright####1####2####3{\@temptokena{\protect\@@ensure@maindir{####1}}%
- \unrestored@protected@xdef\@themark{{\the\@temptokena}%
- {\protect\@@ensure@maindir{####3}}}}}%
- }{% else
- \def\local@marks##1{}%
- }%
-}
-\setkeys{polyglossia}{localmarks=false}
-
-% to reset the intercharclass of a character to "normal"
-\newXeTeXintercharclass\xpg@normalclass %TODO
-
-%% when no patterns are available, we use \l@nohyphenation, assigned to 255
-%% (suggestion by Enrico Gregorio)
-\@ifundefined{l@nohyphenation}{\chardef\l@nohyphenation=255 }{}
-
-%we call this macro when a gloss file is not found for a given language
-\def\xpg@nogloss#1{%
- \xpg@warning{File~ gloss-#1.ldf~ does~ not~ exist!^^J
- I~ will~ nevertheless~ try~ to~ use~ hyphenation~ patterns~ for~ #1.}%
- \PolyglossiaSetup{#1}{hyphenmins,hyphennames={#1},fontsetup=true}%
- % the above amounts to:
- %\ifcsundef{l@#1}%
- % {\expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}%
- % {\setlocalhyphenmins{#1}{2}{3}}%
- %\csdef{#1@language}{\language=\csname l@#1\endcsname}%
-}
-
-\newcommand{\xpg@input}[1]{%
- \chardef\xpg@atcatcode\catcode`\@
- \makeatletter
- \input{#1}\catcode`\@=\xpg@atcatcode}
-
-\newcommand{\setdefaultlanguage}[2][]{%
- \IfFileExists{gloss-#2.ldf}%
- {\ifcsundef{#2@loaded}%
- {\xpg@input{gloss-#2.ldf}%
- \xpg@info{Default~ language~ is~ #2}%
- \def\languagename{#2}%
- % This is needed because \arabic is a built-in LaTeX command:
- % so now we have \begin{Arabic}... instead of \begin{arabic}...
- \ifstrequal{#2}{arabic}%
- {\newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
- {\end{otherlanguage}}}%
- {\newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
- {\end{otherlanguage}}}%
- \expandafter\newcommand\csname text#2\endcsname[2][]{%
- \ifcsdef{RTL}%
- {\iftoggle{#2@RL}%
- {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}%
- {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
- }% else bidi not loaded
- {\iftoggle{#2@RL}%
- {\xpg@error{Language~ #2~ is~ right-to-left,~ but~ bidi~ package~ was~ not~ loaded!}}%
- {\foreignlanguage[####1]{#2}{####2}}%
- }%
- }%
- \csletcs{local#2}{text#2}%
- \csgdef{#2@loaded}{}%
- \gdef\xpg@main@language{#2}%
- }%
- {\xpg@warning{gloss-#2.ldf~ is~ already~ loaded!}}%:
- %% The following settings are for the default language and script:
- \iftoggle{#2@RL}{\@RTLmaintrue}{}% this tells bidi.sty that the document is RTL
- \AtBeginDocument{%
- \selectlanguage[#1]{#2}%
- \selectbackgroundlanguage{#2}}%
- }%
- %ELSE
- {\xpg@nogloss{#2}}%
-}
-
-\let\setmainlanguage=\setdefaultlanguage
-
-\newcommand{\resetdefaultlanguage}[2][]{%
- \ifcsundef{#2@loaded}{%
- \xpg@error{gloss-#2.ldf~ is~ not~ loaded!}}%
- {\csuse{no\xpg@main@language @globalnumbers}% disable globalnumbers of previously defined default language
- \csuse{noextras@\xpg@main@language}%
- \csuse{init@noextras@\xpg@main@language}%
- \def\languagename{#2}%
- \iftoggle{#2@RL}{\@rlmaintrue\@rl@footnotetrue}{}%
- \selectlanguage[#1]{#2}%
- \selectbackgroundlanguage{#2}}}
-
-\expandafter\ifx\familydefault\sfdefault
- \def\familytype{sf}
-\else\expandafter\ifx\familydefault\ttdefault
- \def\familytype{tt}
-\else
- \def\familytype{rm}
-\fi\fi
-% 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}}
-% This saves the normalfont for the latin script since we may change normalfont in other scripts
-\let\normalfontlatin=\normalfont%
-\let\rmfamilylatin=\rmfamily%
-\let\sffamilylatin=\sffamily%
-\let\ttfamilylatin=\ttfamily%
-
-\def\resetfontlatin{%
- \let\rmfamily=\rmfamilylatin%
- \let\sffamily=\sffamilylatin%
- \let\ttfamily=\ttfamilylatin%
- \let\normalfont=\normalfontlatin}
-
-\def\selectfontfamilylatin{%
- \def\tmp@tt{tt}\def\tmp@sf{sf}%
- \ifx\familytype\tmp@tt%
- \ttfamilylatin%
- \else\ifx\familytype\tmp@sf%
- \sffamilylatin%
- \else\rmfamilylatin\fi\fi}
-
-\def\xpg@select@fontfamily#1{%
- \def\tmp@tt{tt}\def\tmp@sf{sf}%
- \ifx\familytype\tmp@tt
- \csuse@warn{#1@font@tt}%
- \else\ifx\familytype\tmp@sf
- \csuse@warn{#1@font@sf}%
- \else\csuse@warn{#1@font@rm}\fi\fi}
-
-\def\xpg@set@normalfont#1{%
- \letcs{\rmfamily}{#1@font@rm}%
- \letcs{\sffamily}{#1@font@sf}%
- \letcs{\ttfamily}{#1@font@tt}%
- \gdef\normalfont{\protect\xpg@select@fontfamily{#1}}%
- \gdef\reset@font{\protect\normalfont}%
-}
-
-\let\@@fterindentfalse\@afterindentfalse
-\def\french@indent{\let\@afterindentfalse\@afterindenttrue
- \@afterindenttrue}
-\def\nofrench@indent{\let\@afterindentfalse\@@fterindentfalse
- \@afterindentfalse}
-
-\newcommand{\selectbackgroundlanguage}[1]{%
- \iftoggle{#1@latin}{}{\xpg@set@normalfont{#1}}%
- \csuse{#1@globalnumbers}%
- }
-
-\newcommand{\setotherlanguage}[2][]{%
- \IfFileExists{gloss-#2.ldf}%
- {\ifcsundef{#2@loaded}%
- {\xpg@input{gloss-#2.ldf}%
- \setkeys{#2}{#1}%
- \edef\@tmpa{arabic}%
- \edef\@tmpb{#2}%
- \ifx\@tmpb\@tmpa%
- \newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
- {\end{otherlanguage}}%
- \else
- \newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
- {\end{otherlanguage}}%
- \fi
- \expandafter\newcommand\csname text#2\endcsname[2][]{%
- \ifcsdef{RTL}%
- {\iftoggle{#2@RL}%
- {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}%
- {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
- }% else bidi not loaded
- {\iftoggle{#2@RL}%
- {\xpg@error{Language~ #2~ is~ right-to-left,~ but~ bidi~ package~ was~ not~ loaded!}}%
- {\foreignlanguage[####1]{#2}{####2}}%
- }%
- }%
- \csletcs{local#2}{text#2}%
- \csgdef{#2@loaded}{}%
- }%
- {\xpg@warning{gloss-#2.ldf~ is~ already~ loaded!}}%
- }%
- %ELSE
- {\xpg@nogloss{#2}}%
-}
-
-\newcommand\setotherlanguages[1]{%
- \renewcommand*{\do}[1]{\setotherlanguage{##1}}%
- \docsvlist{#1}}%
-
-\def\common@language{% FIXME is this really needed???
- \language=\z@
- \lefthyphenmin=\tw@
- \righthyphenmin=\thr@@}
-
-\def\noextrascurrent#1{\csuse{noextras@#1}}
-
-\def\xpg@initial@setup{\ifcsundef{languagename}{}%
- {\noextrascurrent{\languagename}}%
- \common@language}
-
-\AtBeginDocument{\xpg@initial@setup}
-
-\providecommand{\foreignlanguage}{}
-
-\renewcommand{\foreignlanguage}[3][]{%
- \ifcsundef{#2@loaded}%
- {\xpg@nogloss{#2}}%
- {{\select@@language{#2}%
- \setkeys{#2}{#1}%
- \use@localhyphenmins{#2}%
- \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}%
- \csuse{inlineextras@#2}%
- #3}%
- }%
-}
-
-% otherlanguage* is the environment equivalent of \foreignlanguage
-\expandafter\providecommand\csname otherlanguage*\endcsname{}
-\renewenvironment{otherlanguage*}[2][]{%
- \ifcsundef{#2@loaded}%
- {\xpg@nogloss{#2}}%
- {\select@@language{#2}%
- \setkeys{#2}{#1}%
- \use@localhyphenmins{#2}%
- \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}%
- \csuse{inlineextras@#2}\csuse{date#2}%
- }%
-}{}
-
-%Hook that other package authors can use
-%(for instance biblatex):
-\newcommand*{\xpg@hook@setlanguage}{}
-
-\providecommand{\selectlanguage}{}
-\renewcommand{\selectlanguage}[2][]{%
- \ifcsundef{#2@loaded}%
- {\xpg@nogloss{#2}}%
- {\def\xpg@pop@language{%
- \xpg@set@language{\languagename}%
- \xpg@hook@setlanguage%
- \let\emp@langname\@undefined}%
- \aftergroup\xpg@pop@language%
- \setkeys{#2}{#1}%
- \xpg@set@language{#2}%
- }%
-}
-
-\newcommand{\xpg@set@language}[1]{%
- \select@language{#1}%
- \if@filesw%
- \protected@write\@auxout{}{\protect\select@language{#1}}%
- \addtocontents{toc}{\protect\select@language{#1}}%
- \addtocontents{lof}{\protect\select@language{#1}}%
- \addtocontents{lot}{\protect\select@language{#1}}%
- \fi
-}
-
-\def\select@language#1{%
- \xpg@initial@setup%
- \select@@language{#1}%
- \ifcsundef{setRL}{}%
- {\iftoggle{#1@RL}{\setRL}{\setLR}}%
- \csuse{captions#1}%
- \local@marks{#1}%
- \csuse{init@extras@#1}%
- \csuse{blockextras@#1}%
-}
-
-% Common code for `\select@language' and `\foreignlanguage'.
-\newcommand{\select@@language}[1]{%
- \edef\languagename{#1}%
- \xpg@select@fontfamily{#1}%
- \csuse@warn{#1@language}%
- \csuse{date#1}%
- \csuse{#1@numbers}%
- \use@localhyphenmins{#1}%
-}
-
-
-\let\xpg@pop@language\relax
-
-\provideenvironment{otherlanguage}{}{}
-
-\renewenvironment{otherlanguage}[2][]
- {\selectlanguage[#1]{#2}}
- {}
-
-\newcommand{\setlocalhyphenmins}[3]{%
- \expandafter\ifx\csname l@#1\endcsname\relax%
- \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unknown~ language~ #1}%
- \else
- \expandafter\ifx\csname l@#1\endcsname\l@nohyphenation%
- \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unhyphenated~ language~ #1}%
- \else
- \providehyphenmins{#1}{#2#3}%
- \fi
- \fi}
-
-\def\use@localhyphenmins#1{%
- \ifcsundef{#1hyphenmins}{}%
- {\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}}
-
-\define@boolkey{polyglossia}[system@]{babelshorthands}[false]{}
-
-\AtEndPreamble{\@ifpackageloaded{bidi}{\newcommand*{\aemph}[1]{$\overline{\hboxR{#1}}$}}{}}
-
-%% Package Options %%
-\DeclareOption{nolocalmarks}{\setkeys{polyglossia}{localmarks=false}}
-\DeclareOption{localmarks}{\setkeys{polyglossia}{localmarks=true}}
-\DeclareOption{babelshorthands}{\setkeys{polyglossia}{babelshorthands=true}}
-\DeclareOption{quiet}{%
- \gdef\@latex@info#1{\relax}% no latex info
- \gdef\@font@info#1{\relax}% no latex font info
- \gdef\@font@warning#1{\relax}% no latex font warnings
- \gdef\zf@PackageInfo#1{\relax}% no fontspec info
- \gdef\xpg@info#1{\relax}}% no polyglossia info
-%
-% FIXME these should also be loaded \AtEndOfPackage !!!
-\def\xpg@option#1#2{%
- \ifcsundef{xpg@main@language}{\setdefaultlanguage}{\setotherlanguage}%
- [#1]{#2}}
-%\DeclareOption{USenglish}{\xpg@option{variant=american}{english}}
-%\DeclareOption{american}{\xpg@option{variant=american}{english}}
-%\DeclareOption{UKenglish}{\xpg@option{variant=british}{english}}
-%\DeclareOption{british}{\xpg@option{variant=british}{english}}
-%\DeclareOption{australian}{\xpg@option{variant=australian}{english}}
-%\DeclareOption{newzealand}{\xpg@option{variant=newzealand}{english}}
-%\DeclareOption{ngerman}{\xpg@option{spelling=new}{german}}
-%\DeclareOption{polygreek}{\xpg@option{variant=poly}{greek}}
-%\DeclareOption{monogreek}{\xpg@option{variant=mono}{greek}}
-%\DeclareOption{ancientgreek}{\xpg@option{variant=ancient}{greek}}
-%%% TODO add warning message that this approach is deprecated <<<<<<<<<<<<<<
-%\DeclareOption*{%
-% \edef\@temp{%
-% \noexpand\ifcsundef{xpg@main@language}%
-% \noexpand\setdefaultlanguage
-% \noexpand\setotherlanguage
-% {\CurrentOption}%
-% }%
-% \expandafter\AtEndOfPackage\expandafter{\@temp}%
-%}
-\ExplSyntaxOff
-\ProcessOptions*
-% \end{macrocode}
-% \iffalse
-%</polyglossia.sty>
-%<*farsical.sty>
-% \fi
-% \clearpage
-%
-% \subsection{farsical.sty}
-% \begin{macrocode}
-\ProvidesPackage{farsical}
- [2008/07/02 v0.1 %
- Farsi (jalali) calendar]
-\RequirePackage{bidi,calc,arabicnumbers}
-
-%TODO - rewrite completely using calc
-%% - use Reingold & Dershowitz ME
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Modified from Arabiftoday.sty which is part of the Arabi package:
-%%% Copyright (C) 2006 Youssef Jabri
-%%% itself a modification of the code in the FarsiTeX system:
-%%% Copyright (C) 1996 Hassan Abolhassani
-%%% Copyright (C) 1996-2001 Roozbeh Pournader <roozbeh@sharif.edu>
-%%% Copyright (C) 2000-2001 Behdad Esfahbod <behdad@bamdad.org>
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifJALALI@leap \newif\ifJALALI@kabiseh
-\newcount\JALALI@i \newcount\JALALI@y \newcount\JALALI@m \newcount\JALALI@d
-\newcount\JALALI@latini \newcount\JALALI@farsii
-\newcount\JALALI@latinii \newcount\JALALI@farsiii
-\newcount\JALALI@latiniii \newcount\JALALI@farsiiii
-\newcount\JALALI@latiniv \newcount\JALALI@farsiiv
-\newcount\JALALI@latinv \newcount\JALALI@farsiv
-\newcount\JALALI@latinvi \newcount\JALALI@farsivi
-\newcount\JALALI@latinvii \newcount\JALALI@farsivii
-\newcount\JALALI@latinviii \newcount\JALALI@farsiviii
-\newcount\JALALI@latinix \newcount\JALALI@farsiix
-\newcount\JALALI@latinx \newcount\JALALI@farsix
-\newcount\JALALI@latinxi \newcount\JALALI@farsixi
-\newcount\JALALI@latinxii \newcount\JALALI@farsixii
- \newcount\JALALI@farsixiii
-
-\newcount\JALALI@temp
-\newcount\JALALI@temptwo
-\newcount\JALALI@tempthree
-\newcount\JALALI@yModHundred
-\newcount\JALALI@thirtytwo
-\newcount\JALALI@dn
-\newcount\JALALI@sn
-\newcount\JALALI@mminusone
-
-% \ftoday renamed to \Jalalitoday - FC
-\def\Jalalitoday{%
-\JALALI@y=\year \JALALI@m=\month \JALALI@d=\day
-%
-\JALALI@temp=\JALALI@y
-\divide\JALALI@temp by 100\relax
-\multiply\JALALI@temp by 100\relax
-\JALALI@yModHundred=\JALALI@y
-\advance\JALALI@yModHundred by -\JALALI@temp\relax
-%
-\ifodd\JALALI@yModHundred
- \JALALI@leapfalse
-\else
- \JALALI@temp=\JALALI@yModHundred
- \divide\JALALI@temp by 2\relax
- \ifodd\JALALI@temp\JALALI@leapfalse
- \else
- \ifnum\JALALI@yModHundred=0%
- \JALALI@temp=\JALALI@y
- \divide\JALALI@temp by 400\relax
- \multiply\JALALI@temp by 400\relax
- \ifnum\JALALI@y=\JALALI@temp\JALALI@leaptrue\else\JALALI@leapfalse\fi
- \else\JALALI@leaptrue
- \fi
- \fi
-\fi
-%
-\JALALI@latini=31\relax
-\ifJALALI@leap
- \JALALI@latinii = 29\relax
-\else
- \JALALI@latinii = 28\relax
-\fi
-\JALALI@latiniii = 31\relax
-\JALALI@latiniv = 30\relax
-\JALALI@latinv = 31\relax
-\JALALI@latinvi = 30\relax
-\JALALI@latinvii = 31\relax
-\JALALI@latinviii = 31\relax
-\JALALI@latinix = 30\relax
-\JALALI@latinx = 31\relax
-\JALALI@latinxi = 30\relax
-\JALALI@latinxii = 31\relax
-%
-\JALALI@thirtytwo=32\relax
-%
-\JALALI@temp=\JALALI@y
-\advance\JALALI@temp by -17\relax
-\JALALI@temptwo=\JALALI@temp
-\divide\JALALI@temptwo by 33\relax
-\multiply\JALALI@temptwo by 33\relax
-\advance\JALALI@temp by -\JALALI@temptwo
-\ifnum\JALALI@temp=\JALALI@thirtytwo\JALALI@kabisehfalse
-\else
- \JALALI@temptwo=\JALALI@temp
- \divide\JALALI@temptwo by 4\relax
- \multiply\JALALI@temptwo by 4\relax
- \advance\JALALI@temp by -\JALALI@temptwo
- \ifnum\JALALI@temp=\z@\JALALI@kabisehtrue\else\JALALI@kabisehfalse\fi
-\fi
-%
-% --BE
-% In fact farsii is equal to the Leap years from a fixed year to the last
-% year minus the Kabise years from a fixed year to the last year plus a const.
-%
-\JALALI@tempthree=\JALALI@y % Number of Leap years
-\advance\JALALI@tempthree by -1
-\JALALI@temp=\JALALI@tempthree % T := (MY-1) div 4
-\divide\JALALI@temp by 4\relax
-\JALALI@temptwo=\JALALI@tempthree % T := T - ((MY-1) div 100)
-\divide\JALALI@temptwo by 100\relax
-\advance\JALALI@temp by -\JALALI@temptwo
-\JALALI@temptwo=\JALALI@tempthree % T := T + ((MY-1) div 400)
-\divide\JALALI@temptwo by 400\relax
-\advance\JALALI@temp by \JALALI@temptwo
-\advance\JALALI@tempthree by -611 % Number of Kabise years
-\JALALI@temptwo=\JALALI@tempthree % T := T - ((SY+10) div 33) * 8
-\divide\JALALI@temptwo by 33\relax
-\multiply\JALALI@temptwo by 8\relax
-\advance\JALALI@temp by -\JALALI@temptwo
-\JALALI@temptwo=\JALALI@tempthree %
-\divide\JALALI@temptwo by 33\relax
-\multiply\JALALI@temptwo by 33\relax
-\advance\JALALI@tempthree by -\JALALI@temptwo
-\ifnum\JALALI@tempthree=32\advance\JALALI@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
-\divide\JALALI@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
-\advance\JALALI@temp by -\JALALI@tempthree
-\advance\JALALI@temp by -137 % T := T - 137 Adjust the value
-\JALALI@farsii=31
-\advance\JALALI@farsii by -\JALALI@temp % now 31 - T is the farsii
-%
-\JALALI@farsiii = 30\relax
-\ifJALALI@kabiseh
- \JALALI@farsiiii = 30\relax
-\else
- \JALALI@farsiiii = 29\relax
-\fi
-\JALALI@farsiiv = 31\relax
-\JALALI@farsiv = 31\relax
-\JALALI@farsivi = 31\relax
-\JALALI@farsivii = 31\relax
-\JALALI@farsiviii= 31\relax
-\JALALI@farsiix = 31\relax
-\JALALI@farsix = 30\relax
-\JALALI@farsixi = 30\relax
-\JALALI@farsixii = 30\relax
-\JALALI@farsixiii= 30\relax
-%
-\JALALI@dn= 0\relax
-\JALALI@sn= 0\relax
-\JALALI@mminusone=\JALALI@m
-\advance\JALALI@mminusone by -1\relax
-%
-\JALALI@i=0\relax
-\ifnum\JALALI@i < \JALALI@mminusone
-\loop
-\advance \JALALI@i by 1\relax
-\advance\JALALI@dn by \csname JALALI@latin\romannumeral\the\JALALI@i\endcsname
-\ifnum\JALALI@i<\JALALI@mminusone \repeat
-\fi
-\advance \JALALI@dn by \JALALI@d
-%
-\JALALI@i=1\relax
-\JALALI@sn = \JALALI@farsii
-\ifnum \JALALI@sn<\JALALI@dn
-\loop
-\advance \JALALI@i by 1\relax
-\advance\JALALI@sn by \csname JALALI@farsi\romannumeral\the\JALALI@i\endcsname
-\ifnum \JALALI@sn<\JALALI@dn \repeat
-\fi
-\ifnum \JALALI@i < 4
- \JALALI@m = 9 \advance\JALALI@m by \JALALI@i
- \advance \JALALI@y by -622\relax
-\else
- \JALALI@m = \JALALI@i \advance \JALALI@m by -3\relax
- \advance \JALALI@y by -621\relax
-\fi
-\advance\JALALI@sn by -\csname JALALI@farsi\romannumeral\the\JALALI@i%
-\endcsname
-\ifnum\JALALI@i = 1
- \JALALI@d = \JALALI@dn \advance \JALALI@d by 30 \advance\JALALI@d by -\JALALI@farsii
-\else
- \JALALI@d = \JALALI@dn \advance \JALALI@d by -\JALALI@sn
-\fi
-%% DATE FORMATTING
-\if@RTL{\farsidigits{\number\JALALI@d}\space%
-\Jalalimonth{\JALALI@m}\space\farsidigits{\number\JALALI@y}}%
-\else
-\number\JALALI@d\space\JalalimonthEnglish{\JALALI@m}%
-\space\number\JALALI@y%
-\fi}
-%%%
-\def\Jalalimonth#1{\ifcase#1\or فروردین\or
-اردیبهشت\or خرداد\or تیر\or مرداد\or شهریور%
-\or مهر\or آبان\or آذر\or دی\or بهمن\or اسفند%
-\fi}
-\def\JalalimonthEnglish#1{\ifcase#1%
-\or Farvardīn\or Ordībehesht\or Khordād\or Tīr
-\or Mordād\or Shahrīvar\or Mihr\or Ābān\or Āzar
-\or Dai\or Bahman\or Esfand\fi}
-% \end{macrocode}
-% \iffalse
-%</farsical.sty>
-%<*hebrewcal.sty>
-% \fi
-% \clearpage
-%
-% \subsection{hebrewcal.sty}
-% \begin{macrocode}
-\ProvidesPackage{hebrewcal}
- [2012/04/29 v2.5 %
- Hebrew calendar for polyglossia (adapted from hebcal.sty in Babel)]
-\RequirePackage{xkeyval}
-\RequirePackage{bidi}
-
-\newif\if@xpg@hebrewcal@marcheshvan
-\DeclareOption{marcheshvan}{\@xpg@hebrewcal@marcheshvantrue}
-\ifx\if@xpg@hebrew@marcheshvan\undefined
- \newif\if@xpg@hebrew@marcheshvan
- \@xpg@hebrew@marcheshvanfalse
-\fi
-
-%% TODO rewrite this on the basis of Reingold & Dershowitz
-%% on the model of hijrical (using calc)
-
-\@ifundefined{@Remainder}{\input{cal-util.def}}{}
-
-\define@boolkey{hebrew}[@hebrew@]{fullyear}[false]{}
-\setkeys{hebrew}{fullyear}
-
-\newcount\hebrewday \newcount\hebrewmonth \newcount\hebrewyear
-\def\hebrewdate#1#2#3{%
- \HebrewFromGregorian{#1}{#2}{#3}%
- {\hebrewday}{\hebrewmonth}{\hebrewyear}%
- \if@RTL%
- \@FormatForHebrew{\hebrewday}{\hebrewmonth}{\hebrewyear}%
- \else%
- \@FormatForEnglish{\hebrewday}{\hebrewmonth}{\hebrewyear}%
- \fi}
-\def\hebrewtoday{\hebrewdate{\day}{\month}{\year}}
-% The command name is capitalised in the doc, and this is consistent
-% with other names such as \Hijritoday and \Jalalitoday.
-\let\Hebrewtoday=\hebrewtoday
-\def\hebrewsetreg{%
- \HebrewFromGregorian{\day}{\month}{\year}%
- {\hebrewday}{\hebrewmonth}{\hebrewyear}}
-\def\HebrewYearName#1{{%
- \@tempcnta=#1\divide\@tempcnta by 1000\multiply\@tempcnta by 1000
- \ifnum#1=\@tempcnta\relax % divisible by 1000: disambiguate
- \hebrewnumeral{#1}\ (לפ"ג)%
- \else % not divisible by 1000
- \ifnum#1<1000\relax % first millennium: disambiguate
- \hebrewnumeral{#1}\ (לפ"ג)%
- \else
- \ifnum#1<5000
- \hebrewnumeral{#1}%
- \else
- \ifnum#1<6000 % current millenium, print without thousands
- \@tempcnta=#1\relax
- \if@hebrew@fullyear\else\advance\@tempcnta by -5000\fi
- \hebrewnumeral{\@tempcnta}%
- \else % #1>6000
- \hebrewnumeral{#1}%
- \fi
- \fi
- \fi
- \fi}}
-\def\HebrewMonthName#1#2{%
- \ifnum #1 = 7 %
- \@CheckLeapHebrewYear{#2}%
- \if@HebrewLeap אדר\ ב'%
- \else אדר%
- \fi%
- \else%
- \ifcase#1%
- % nothing for 0
- \or תשרי%
- \or\if@xpg@hebrewcal@marcheshvan מרחשון\else\if@xpg@hebrew@marcheshvan מרחשון\else חשון\fi\fi%
- \or כסלו%
- \or טבת%
- \or שבט%
- \or אדר\ א'%
- \or אדר\ ב'%
- \or ניסן%
- \or אייר%
- \or סיון%
- \or תמוז%
- \or אב%
- \or אלול%
- \fi%
- \fi}
-\def\@FormatForHebrew#1#2#3{%
- \hebrewnumeral{#1}~ב\HebrewMonthName{#2}{#3}~%
- \HebrewYearName{#3}}
-\def\HebrewMonthNameInEnglish#1#2{%
- \ifnum #1 = 7%
- \@CheckLeapHebrewYear{#2}%
- \if@HebrewLeap Adar II\else Adar\fi%
- \else%
- \ifcase #1%
- % nothing for 0
- \or Tishrei%
- % \or\if@xpg@hebrewcal@marcheshvan Marcheshvan\else\if@xpg@hebrew@marcheshvan Marcheshvan\else Heshvan\fi\fi%
- \or\if@xpg@hebrewcal@marcheshvan Marcheshvan\else\if@xpg@hebrew@marcheshvan Marcheshvan\else Heshvan\fi\fi%
- \or Kislev%
- \or Tebeth%
- \or Shebat%
- \or Adar I%
- \or Adar II%
- \or Nisan%
- \or Iyar%
- \or Sivan%
- \or Tammuz%
- \or Av%
- \or Elul%
- \fi
- \fi}
-\def\@FormatForEnglish#1#2#3{%
- \HebrewMonthNameInEnglish{#2}{#3} \number#1,\ \number#3}
-\newcount\@common
-\newif\if@HebrewLeap
-\def\@CheckLeapHebrewYear#1{%
- {%
- \countdef\tmpa = 0% % \tmpa==\count0
- \countdef\tmpb = 1% % \tmpb==\count1
- \tmpa = #1%
- \multiply \tmpa by 7%
- \advance \tmpa by 1%
- \@Remainder{\tmpa}{19}{\tmpb}%
- \ifnum \tmpb < 7% % \tmpb = (7*year+1)%19
- \global\@HebrewLeaptrue%
- \else%
- \global\@HebrewLeapfalse%
- \fi}}
-\def\@HebrewElapsedMonths#1#2{%
- {%
- \countdef\tmpa = 0% % \tmpa==\count0
- \countdef\tmpb = 1% % \tmpb==\count1
- \countdef\tmpc = 2% % \tmpc==\count2
- \tmpa = #1% %
- \advance \tmpa by -1% %
- #2 = \tmpa% % #2 = \tmpa = year-1
- \divide #2 by 19% % Number of complete Meton cycles
- \multiply #2 by 235% % #2 = 235*((year-1)/19)
- \@Remainder{\tmpa}{19}{\tmpb}% \tmpa = years%19-years this cycle
- \tmpc = \tmpb% %
- \multiply \tmpb by 12% %
- \advance #2 by \tmpb% % add regular months this cycle
- \multiply \tmpc by 7% %
- \advance \tmpc by 1% %
- \divide \tmpc by 19% % \tmpc = (1+7*((year-1)%19))/19 -
- \advance #2 by \tmpc% % add leap months
- \global\@common = #2}%
- #2 = \@common}
-\def\@HebrewElapsedDays#1#2{%
- {%
- \countdef\tmpa = 0% % \tmpa==\count0
- \countdef\tmpb = 1% % \tmpb==\count1
- \countdef\tmpc = 2% % \tmpc==\count2
- \@HebrewElapsedMonths{#1}{#2}%
- \tmpa = #2% %
- \multiply \tmpa by 13753% %
- \advance \tmpa by 5604% % \tmpa=MonthsElapsed*13758 + 5604
- \@Remainder{\tmpa}{25920}{\tmpc}% \tmpc == ConjunctionParts
- \divide \tmpa by 25920%
- \multiply #2 by 29%
- \advance #2 by 1%
- \advance #2 by \tmpa% % #2 = 1 + MonthsElapsed*29 +
- \@Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek
- \ifnum \tmpc < 19440%
- \ifnum \tmpc < 9924%
- \else% % New moon at 9 h. 204 p. or later
- \ifnum \tmpa = 2% % on Tuesday ...
- \@CheckLeapHebrewYear{#1}% of a common year
- \if@HebrewLeap%
- \else%
- \advance #2 by 1%
- \fi%
- \fi%
- \fi%
- \ifnum \tmpc < 16789%
- \else% % New moon at 15 h. 589 p. or later
- \ifnum \tmpa = 1% % on Monday ...
- \advance #1 by -1%
- \@CheckLeapHebrewYear{#1}% at the end of leap year
- \if@HebrewLeap%
- \advance #2 by 1%
- \fi%
- \fi%
- \fi%
- \else%
- \advance #2 by 1% % new moon at or after midday
- \fi%
- \@Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek
- \ifnum \tmpa = 0% % if Sunday ...
- \advance #2 by 1%
- \else% %
- \ifnum \tmpa = 3% % Wednesday ...
- \advance #2 by 1%
- \else%
- \ifnum \tmpa = 5% % or Friday
- \advance #2 by 1%
- \fi%
- \fi%
- \fi%
- \global\@common = #2}%
- #2 = \@common}
-\def\@DaysInHebrewYear#1#2{%
- {%
- \countdef\tmpe = 12% % \tmpe==\count12
- \@HebrewElapsedDays{#1}{\tmpe}%
- \advance #1 by 1%
- \@HebrewElapsedDays{#1}{#2}%
- \advance #2 by -\tmpe%
- \global\@common = #2}%
- #2 = \@common}
-\def\@HebrewDaysInPriorMonths#1#2#3{%
- {%
- \countdef\tmpf= 14% % \tmpf==\count14
- #3 = \ifcase #1% % Days in prior month of regular year
- 0 \or% % no month number 0
- 0 \or% % Tishri
- 30 \or% % Heshvan
- 59 \or% % Kislev
- 89 \or% % Tebeth
- 118 \or% % Shebat
- 148 \or% % Adar I
- 148 \or% % Adar II
- 177 \or% % Nisan
- 207 \or% % Iyar
- 236 \or% % Sivan
- 266 \or% % Tammuz
- 295 \or% % Av
- 325 \or% % Elul
- 400% % Dummy
- \fi%
- \@CheckLeapHebrewYear{#2}%
- \if@HebrewLeap% % in leap year
- \ifnum #1 > 6% % if month after Adar I
- \advance #3 by 30% % add 30 days
- \fi%
- \fi%
- \@DaysInHebrewYear{#2}{\tmpf}%
- \ifnum #1 > 3%
- \ifnum \tmpf = 353% %
- \advance #3 by -1% %
- \fi% % Short Kislev
- \ifnum \tmpf = 383% %
- \advance #3 by -1% %
- \fi% %
- \fi%
- \ifnum #1 > 2%
- \ifnum \tmpf = 355% %
- \advance #3 by 1% %
- \fi% % Long Heshvan
- \ifnum \tmpf = 385% %
- \advance #3 by 1% %
- \fi% %
- \fi%
- \global\@common = #3}%
- #3 = \@common}
-\def\@FixedFromHebrew#1#2#3#4{%
- {%
- #4 = #1%
- \@HebrewDaysInPriorMonths{#2}{#3}{#1}%
- \advance #4 by #1% % Add days in prior months this year
- \@HebrewElapsedDays{#3}{#1}%
- \advance #4 by #1% % Add days in prior years
- \advance #4 by -1373429% % Subtract days before Gregorian
- \global\@common = #4}% % 01.01.0001
- #4 = \@common}
-\def\@GregorianDaysInPriorMonths#1#2#3{%
- {%
- #3 = \ifcase #1%
- 0 \or% % no month number 0
- 0 \or%
- 31 \or%
- 59 \or%
- 90 \or%
- 120 \or%
- 151 \or%
- 181 \or%
- 212 \or%
- 243 \or%
- 273 \or%
- 304 \or%
- 334%
- \fi%
- \@CheckIfGregorianLeap{#2}%
- \if@GregorianLeap%
- \ifnum #1 > 2% % if month after February
- \advance #3 by 1% % add leap day
- \fi%
- \fi%
- \global\@common = #3}%
- #3 = \@common}
-\def\@GregorianDaysInPriorYears#1#2{%
- {%
- \countdef\tmpc = 4% % \tmpc==\count4
- \countdef\tmpb = 2% % \tmpb==\count2
- \tmpb = #1% %
- \advance \tmpb by -1% %
- \tmpc = \tmpb% % \tmpc = \tmpb = year-1
- \multiply \tmpc by 365% % Days in prior years =
- #2 = \tmpc% % = 365*(year-1) ...
- \tmpc = \tmpb% %
- \divide \tmpc by 4% % \tmpc = (year-1)/4
- \advance #2 by \tmpc% % ... plus Julian leap days ...
- \tmpc = \tmpb% %
- \divide \tmpc by 100% % \tmpc = (year-1)/100
- \advance #2 by -\tmpc% % ... minus century years ...
- \tmpc = \tmpb% %
- \divide \tmpc by 400% % \tmpc = (year-1)/400
- \advance #2 by \tmpc% % ... plus 4-century years.
- \global\@common = #2}%
- #2 = \@common}
-\def\@AbsoluteFromGregorian#1#2#3#4{%
- {%
- \countdef\tmpd = 0% % \tmpd==\count0
- #4 = #1% % days so far this month
- \@GregorianDaysInPriorMonths{#2}{#3}{\tmpd}%
- \advance #4 by \tmpd% % add days in prior months
- \@GregorianDaysInPriorYears{#3}{\tmpd}%
- \advance #4 by \tmpd% % add days in prior years
- \global\@common = #4}%
- #4 = \@common}
-\def\HebrewFromGregorian#1#2#3#4#5#6{%
- {%
- \countdef\tmpx= 17% % \tmpx==\count17
- \countdef\tmpy= 18% % \tmpy==\count18
- \countdef\tmpz= 19% % \tmpz==\count19
- #6 = #3% %
- \global\advance #6 by 3761% approximation from above
- \@AbsoluteFromGregorian{#1}{#2}{#3}{#4}%
- \tmpz = 1 \tmpy = 1%
- \@FixedFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}%
- \ifnum \tmpx > #4% %
- \global\advance #6 by -1% Hyear = Gyear + 3760
- \@FixedFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}%
- \fi% %
- \advance #4 by -\tmpx% % Days in this year
- \advance #4 by 1% %
- #5 = #4% %
- \divide #5 by 30% % Approximation for month from below
- \loop% % Search for month
- \@HebrewDaysInPriorMonths{#5}{#6}{\tmpx}%
- \ifnum \tmpx < #4%
- \advance #5 by 1%
- \tmpy = \tmpx%
- \repeat%
- \global\advance #5 by -1%
- \global\advance #4 by -\tmpy}}
-\ProcessOptions*
-% \end{macrocode}
-% \iffalse
-%</hebrewcal.sty>
-%<*hijrical.sty>
-% \fi
-% \clearpage
-%
-% \subsection{hijrical.sty}
-% \begin{macrocode}
-\ProvidesPackage{hijrical}
- [2010/07/12 v0.2 %
- Islamic calendar]
-\RequirePackage{calc}
-\RequirePackage{arabicnumbers}
-\@ifpackageloaded{bidi}{}{\newif\if@RTL\@RTLfalse}
-\@ifpackageloaded{l3calc}{\PackageError{hijrical}{\MessageBreak
-Package l3calc is loaded, which replaces the functionality of
-calc. Computation of Hijri dates will not work properly with
-% FIXME by Arthur: François couldn’t possibly mean ‘l3calc’ on the
-% following line :-) Find out if he meant ‘calc’.
-l3calc! The latest version of expl3 on CTAN no longer loads
-l3calc. Please update expl3!
-}{}}{}
-
-\@ifundefined{@Remainder}{\input{cal-util.def}}{}
-
-%% The following functions are straightforward implementation
-%% of Reingold & Dershowitz, Calendrical Calculations, The Millenium Edition
-%%
-
-\def\@FixedFromHijri#1#2#3#4{% year,month,day,counter
-\@ifundefined{c@#4}{\newcounter{#4}}{}%
-\setcounter{tmpA}{#2/2}% see errata of Reingold+Dershowitz
-%\message{tmpA is \thetmpA}%
-\setcounter{tmpB}{(3+11*#1)/30}%
-%\message{tmpB is \thetmpB}%
-\setcounter{#4}{227014+(#1-1)*354+\value{tmpB}+(29*(#2-1))+\value{tmpA}+#3}%
-}
-
-\newcounter{Hijriday}\newcounter{Hijrimonth}\newcounter{Hijriyear}
-
-\def\HijriFromGregorian#1#2#3{% year,month,day
-\@FixedFromGregorian{#1}{#2}{#3}{RDdate}%
-\setcounter{Hijriyear}{(30*(\value{RDdate}-227015)+10646)/10631}%
-\@FixedFromHijri{\value{Hijriyear}}{1}{1}{tmpx}%
-%\message{tmpx is \thetmpx}%
-\setcounter{tmpB}{\value{RDdate}-\value{tmpx}}%
-%\message{tmpB is \thetmpB}%
-\setcounter{Hijrimonth}{((11*\value{tmpB})+330)/325}%
-\@FixedFromHijri{\value{Hijriyear}}{\value{Hijrimonth}}{1}{tmpy}%
-%\message{tmpy is \thetmpy}%
-\setcounter{Hijriday}{1+\value{RDdate}-\value{tmpy}}%
-}
-
-%\HijriFromGregorian{\year}{\month}{\day}%
-
-%\def\PlainHijritoday{%
-%\theHijriday.\theHijrimonth.\theHijriyear}
-
-\def\Hijridate#1#2#3{%
- \HijriFromGregorian{#1}{#2}{#3}%
- \FormatHijriDate}
-
-% added option \Hijritoday[n] (default 0) for adjusting the date + n days
-\@ifundefined{@hijri@correction}{\gdef\@hijri@correction{0}}{}
-\newcommand\Hijritoday[1][\@hijri@correction]{%
- \@ifundefined{c@adj@day}{\global\newcounter{adj@day}}{}%
- \setcounter{adj@day}{\the\day+#1}%
- \Hijridate{\year}{\month}{\value{adj@day}}}
-%\def\Hijritoday{\Hijridate{\year}{\month}{\day}}
-\let\hijritoday=\Hijritoday
-%FIXME necessary?
-%\def\Hijrisetreg{%
-% \HijriFromGregorian{\year}{\month}{\day}}
-
-\def\HijriMonthTranslit#1{\ifcase#1\or Muḥarram\or Ṣafar\or Rabīʿ I\or Rabīʿ II\or%
-Jumādā I\or Jumādā II\or Rajab\or Shaʿbān\or Ramaḍān\or%
-Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
-
-\def\HijriMonthArabic#1{\ifcase#1\or محرم\or صفر\or ربيع الأول\or ربيع الآخر\or%
-جمادى الأولى\or جمادى الآخرة\or رجب\or شعبان\or رمضان\or%
-شوال\or ذو القعدة\or ذو الحجة\fi}
-
-%% This macro is now locale-aware!
-\def\FormatHijriDate{%
- \@ifundefined{FormatHijriDate@\languagename}%
- {\if@RTL\FormatHijriDate@defaultRTL\else\FormatHijriDate@defaultLTR\fi}%
- {\csname FormatHijriDate@\languagename\endcsname}}
-
-\newcommand\DefineFormatHijriDate[2]{%
- \@namedef{FormatHijriDate@#1}{#2}}
-
-% we provide this as a reasonable default.
-% Further definitions are in polyglossia’s language definition files.
-\DefineFormatHijriDate{defaultRTL}{\@ensure@RTL{%
-\arabicdigits{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\arabicdigits{\value{Hijriyear}}}}
-
-\DefineFormatHijriDate{defaultLTR}{%
-\number\value{Hijriday}\space\HijriMonthTranslit{\value{Hijrimonth}}\space\number\value{Hijriyear}}
-% \end{macrocode}
-% \iffalse
-%</hijrical.sty>
-%<*babel-hebrewalph.def>
-% \fi
-% \clearpage
-%
-% \subsection{babel-hebrewalph.def}
-% \begin{macrocode}
-\ProvidesFile{babel-hebrewalph.def}
- [2010/03/02 %
- Babel definitions for Hebrew numerals^^J
- Adapted from hebrew.ldf (2005/03/30 v2.3h)]
-\newif\if@gim@apost % whether we print apostrophes (gereshayim)
-\newif\if@gim@final % whether we use final or initial letters
-\newrobustcmd*{\hebrewnumeral}[1] % no apostrophe, no final letters
- {{\@gim@finalfalse\@gim@apostfalse\@hebrew@numeral{#1}}}
-\newrobustcmd*{\Hebrewnumeral}[1] % apostrophe, no final letters
- {{\@gim@finalfalse\@gim@aposttrue\@hebrew@numeral{#1}}}
-\newrobustcmd*{\Hebrewnumeralfinal}[1] % apostrophe, final letters
- {{\@gim@finaltrue\@gim@aposttrue\@hebrew@numeral{#1}}}
-\newcommand*{\@hebrew@numeral}[1]{%
- \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for Hebrew numeral}%
- \else
- \@tempcnta=#1\@tempcntb=#1\relax
- \divide\@tempcntb by 1000
- \ifnum\@tempcntb=0\gim@nomil\@tempcnta\relax
- \else{\@gim@apostfalse\@gim@finalfalse\@hebrew@numeral\@tempcntb}׳%
- \multiply\@tempcntb by 1000\relax
- \advance\@tempcnta by -\@tempcntb\relax
- \gim@nomil\@tempcnta\relax
- \fi
- \fi
-}
-\def\hebrew@alph@zero{}
-\newcommand*{\gim@nomil}[1]{\@tempcnta=#1\@gim@prevfalse
- \@tempcntb=\@tempcnta\divide\@tempcntb by 100\relax % hundreds digit
- \ifcase\@tempcntb % print nothing if no hundreds
- \or\gim@print{100}{ק}%
- \or\gim@print{200}{ר}%
- \or\gim@print{300}{ש}%
- \or\gim@print{400}{ת}%
- \or ת\@gim@prevtrue\gim@print{500}{ק}%
- \or ת\@gim@prevtrue\gim@print{600}{ר}%
- \or ת\@gim@prevtrue\gim@print{700}{ש}%
- \or ת\@gim@prevtrue\gim@print{800}{ת}%
- \or ת\@gim@prevtrue ת\gim@print{900}{ק}%
- \fi
- \@tempcntb=\@tempcnta\divide\@tempcntb by 10\relax % tens digit
- \ifcase\@tempcntb % print nothing if no tens
- \or % number between 10 and 19
- \ifnum\@tempcnta = 16 \gim@print {9}{ט}% tet-zayin
- \else\ifnum\@tempcnta = 15 \gim@print {9}{ט}% tet-vav
- \else \gim@print{10}{י}%
- \fi % \@tempcnta = 15
- \fi % \@tempcnta = 16
- \or\gim@print{20}{\if@gim@final ך\else כ\fi}%
- \or\gim@print{30}{ל}%
- \or\gim@print{40}{\if@gim@final ם\else מ\fi}%
- \or\gim@print{50}{\if@gim@final ן\else נ\fi}%
- \or\gim@print{60}{ס}%
- \or\gim@print{70}{ע}%
- \or\gim@print{80}{\if@gim@final ף\else פ\fi}%
- \or\gim@print{90}{\if@gim@final ץ\else צ\fi}%
- \fi
- \ifcase\@tempcnta
- \hebrew@alph@zero% empty but can be defined if desired
- \or\gim@print{1}{א}%
- \or\gim@print{2}{ב}%
- \or\gim@print{3}{ג}%
- \or\gim@print{4}{ד}%
- \or\gim@print{5}{ה}%
- \or\gim@print{6}{ו}%
- \or\gim@print{7}{ז}%
- \or\gim@print{8}{ח}%
- \or\gim@print{9}{ט}%
- \fi
-}
-\newif\if@gim@prev % flag if a previous letter has been typeset
-\newcommand*{\gim@print}[2]{% #2 is a letter, #1 is its value.
- \advance\@tempcnta by -#1\relax% deduct the value from the remainder
- \ifnum\@tempcnta=0% if this is the last letter
- \if@gim@prev\if@gim@apost ״\fi#2%
- \else#2\if@gim@apost ׳\fi\fi%
- \else{\@gim@finalfalse#2}\@gim@prevtrue\fi}
-\def\Alphfinal#1{\expandafter\@Alphfinal\csname c@#1\endcsname}%
-\providecommand*{\@Alphfinal}[1]{\protect\Hebrewnumeralfinal{\number#1}}
-% \end{macrocode}
-% \iffalse
-%</babel-hebrewalph.def>
-%<*babelsh.def>
-% \fi
-% \clearpage
-%
-% \subsection{babelsh.def}
-% \begin{macrocode}
-\ifx\initiate@active@char\@undefined
-\else
- \bbl@afterfi\endinput
-\fi
-\ProvidesFile{babelsh.def}
- [2009/05/07 %
- Babel common definitions for shorthands^^J
- Taken verbatim from babel.def (2008/07/06 v3.8l)]
-\def\bbl@add@special#1{\begingroup
- \def\do{\noexpand\do\noexpand}%
- \def\@makeother{\noexpand\@makeother\noexpand}%
- \edef\x{\endgroup
- \def\noexpand\dospecials{\dospecials\do#1}%
- \expandafter\ifx\csname @sanitize\endcsname\relax \else
- \def\noexpand\@sanitize{\@sanitize\@makeother#1}%
- \fi}%
- \x}
-\def\bbl@remove@special#1{\begingroup
- \def\x##1##2{\ifnum`#1=`##2\noexpand\@empty
- \else\noexpand##1\noexpand##2\fi}%
- \def\do{\x\do}%
- \def\@makeother{\x\@makeother}%
- \edef\x{\endgroup
- \def\noexpand\dospecials{\dospecials}%
- \expandafter\ifx\csname @sanitize\endcsname\relax \else
- \def\noexpand\@sanitize{\@sanitize}%
- \fi}%
- \x}
-\long\def\bbl@afterelse#1\else#2\fi{\fi#1}
-\long\def\bbl@afterfi#1\fi{\fi#1}
-\def\initiate@active@char#1{%
- \expandafter\ifx\csname active@char\string##1\endcsname\relax
- \bbl@afterfi{\@initiate@active@char{#1}}%
- \fi}
-\begingroup
- \catcode`\~\active
- \def\x{\endgroup
- \def\@initiate@active@char##1{%
- \ifcat\noexpand##1\noexpand~\relax
- \@ifundefined{normal@char\string##1}{%
- \expandafter\let\csname normal@char\string##1\endcsname##1%
- \expandafter\gdef
- \expandafter##1%
- \expandafter{%
- \expandafter\active@prefix\expandafter##1%
- \csname normal@char\string##1\endcsname}}{}%
- \else
- \@activated{##1}%
- \@namedef{normal@char\string##1}{##1}%
- \ifx##1'%
- \let\prim@s\bbl@prim@s
- \@namedef{normal@char\string##1}{%
- \textormath{##1}{^\bgroup\prim@s}}%
- \fi
- \ifx##1^%
- \gdef\bbl@act@caret{%
- \ifmmode
- \csname normal@char\string^\endcsname
- \else
- \bbl@afterfi
- {\if@safe@actives
- \bbl@afterelse\csname normal@char\string##1\endcsname
- \else
- \bbl@afterfi\csname user@active\string##1\endcsname
- \fi}%
- \fi}
- \fi
- %%\@ifpackagewith{babel}{KeepShorthandsActive}{}{%
- \edef\bbl@tempa{\catcode`\noexpand##1\the\catcode`##1}%
- \expandafter\AtEndOfPackage\expandafter{\bbl@tempa}%
- %%}%
- \@tempcnta=\lccode`\~
- \lccode`~=`##1%
- \lowercase{%
- \catcode`~\active
- \expandafter\bbl@add@special
- \csname \string##1\endcsname
- \AtBeginDocument{%
- \catcode`##1\active
- \if@filesw
- \immediate\write\@mainaux{%
- \string\catcode`##1\string\active}%
- \fi}%
- \expandafter\gdef
- \expandafter~%
- \expandafter{%
- \expandafter\active@prefix\expandafter##1%
- \csname normal@char\string##1\endcsname}}%
- \lccode`\~\@tempcnta
- \fi
- \ifx##1^%
- \@namedef{active@char\string##1}{\bbl@act@caret}%
- \else
- \@namedef{active@char\string##1}{%
- \if@safe@actives
- \bbl@afterelse\csname normal@char\string##1\endcsname
- \else
- \bbl@afterfi\csname user@active\string##1\endcsname
- \fi}%
- \fi
- \@namedef{user@active\string##1}{%
- \expandafter\ifx
- \csname \user@group @sh@\string##1@\endcsname
- \relax
- \bbl@afterelse\bbl@sh@select\user@group##1%
- {user@active@arg\string##1}{language@active\string##1}%
- \else
- \bbl@afterfi\csname \user@group @sh@\string##1@\endcsname
- \fi}%
- \long\@namedef{user@active@arg\string##1}####1{%
- \expandafter\ifx
- \csname \user@group @sh@\string##1@\string####1@\endcsname
- \relax
- \bbl@afterelse
- \csname language@active\string##1\endcsname####1%
- \else
- \bbl@afterfi
- \csname \user@group @sh@\string##1@\string####1@%
- \endcsname
- \fi}%
- \@namedef{\user@group @sh@\string##1@@}{%
- \csname normal@char\string##1\endcsname}
- \@namedef{language@active\string##1}{%
- \expandafter\ifx
- \csname \language@group @sh@\string##1@\endcsname
- \relax
- \bbl@afterelse\bbl@sh@select\language@group##1%
- {language@active@arg\string##1}{system@active\string##1}%
- \else
- \bbl@afterfi
- \csname \language@group @sh@\string##1@\endcsname
- \fi}%
- \long\@namedef{language@active@arg\string##1}####1{%
- \expandafter\ifx
- \csname \language@group @sh@\string##1@\string####1@\endcsname
- \relax
- \bbl@afterelse
- \csname system@active\string##1\endcsname####1%
- \else
- \bbl@afterfi
- \csname \language@group @sh@\string##1@\string####1@%
- \endcsname
- \fi}%
- \@namedef{system@active\string##1}{%
- \expandafter\ifx
- \csname \system@group @sh@\string##1@\endcsname
- \relax
- \bbl@afterelse\bbl@sh@select\system@group##1%
- {system@active@arg\string##1}{normal@char\string##1}%
- \else
- \bbl@afterfi\csname \system@group @sh@\string##1@\endcsname
- \fi}%
- \long\@namedef{system@active@arg\string##1}####1{%
- \expandafter\ifx
- \csname \system@group @sh@\string##1@\string####1@\endcsname
- \relax
- \bbl@afterelse\csname normal@char\string##1\endcsname####1%
- \else
- \bbl@afterfi
- \csname \system@group @sh@\string##1@\string####1@\endcsname
- \fi}%
- \@namedef{user@sh@\string##1@\string\protect@}{%
- \csname user@active\string##1\endcsname}%
- }%
- }\x
-\def\bbl@sh@select#1#2{%
- \expandafter\ifx\csname#1@sh@\string#2@sel\endcsname\relax
- \bbl@afterelse\bbl@scndcs
- \else
- \bbl@afterfi\csname#1@sh@\string#2@sel\endcsname
- \fi
-}
-\def\active@prefix#1{%
- \ifx\protect\@typeset@protect
- \else
- \ifx\protect\@unexpandable@protect
- \bbl@afterelse\bbl@afterfi\noexpand#1\@gobble
- \else
- \bbl@afterfi\bbl@afterfi\protect#1\@gobble
- \fi
- \fi}
-\newif\if@safe@actives
-\@safe@activesfalse
-\def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi}
-\def\bbl@activate#1{%
- \expandafter\def
- \expandafter#1\expandafter{%
- \expandafter\active@prefix
- \expandafter#1\csname active@char\string#1\endcsname}%
-}
-\def\bbl@deactivate#1{%
- \expandafter\def
- \expandafter#1\expandafter{%
- \expandafter\active@prefix
- \expandafter#1\csname normal@char\string#1\endcsname}%
-}
-\def\bbl@firstcs#1#2{\csname#1\endcsname}
-\def\bbl@scndcs#1#2{\csname#2\endcsname}
-\def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil}
-\def\@decl@short#1#2#3\@nil#4{%
- \def\bbl@tempa{#3}%
- \ifx\bbl@tempa\@empty
- \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@scndcs
- \@namedef{#1@sh@\string#2@}{#4}%
- \else
- \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@firstcs
- \@namedef{#1@sh@\string#2@\string#3@}{#4}%
- \fi}
-\def\textormath#1#2{%
- \ifmmode
- \bbl@afterelse#2%
- \else
- \bbl@afterfi#1%
- \fi}
-\def\user@group{user}
-\def\language@group{english}
-\def\system@group{system}
-\def\useshorthands#1{%
- \def\user@group{user}%
- \initiate@active@char{#1}%
- \@tempcnta\lccode`\~
- \lccode`~=`#1%
- \lowercase{\catcode`~\active\bbl@activate{~}}%
- \lccode`\~\@tempcnta}
-\def\defineshorthand{\declare@shorthand{user}}
-\def\languageshorthands#1{\def\language@group{#1}}
-\def\aliasshorthand#1#2{%
- \expandafter\ifx\csname active@char\string#2\endcsname\relax
- \ifx\document\@notprerr
- \@notshorthand{#2}
- \else
- \initiate@active@char{#2}%
- \@tempcnta\lccode`\~
- \lccode`~=`#2%
- \lowercase{\let~#1}%
- \lccode`\~\@tempcnta
- \fi
- \fi
-}
-\def\@notshorthand#1{%
- \PackageError{polyglossia}{%
- The character `\string #1' should be made
- a shorthand character;\MessageBreak
- add the command \string\useshorthands\string{#1\string} to
- the preamble.\MessageBreak
- I will ignore your instruction}{}%
- }
-\newcommand*\shorthandon[1]{\bbl@switch@sh{on}#1\@nil}
-\newcommand*\shorthandoff[1]{\bbl@switch@sh{off}#1\@nil}
-\def\bbl@switch@sh#1#2#3\@nil{%
- \@ifundefined{active@char\string#2}{%
- \PackageError{polyglossia}{%
- The character '\string #2' is not a shorthand character
- in \languagename}{%
- Maybe you made a typing mistake?\MessageBreak
- I will ignore your instruction}}{%
- \csname bbl@switch@sh@#1\endcsname#2}%
- \ifx#3\@empty\else
- \bbl@afterfi\bbl@switch@sh{#1}#3\@nil
- \fi}
-\def\bbl@switch@sh@off#1{\catcode`#112\relax}
-\begingroup
- \catcode`\~\active
- \def\x{\endgroup
- \def\bbl@switch@sh@on##1{%
- \begingroup
- \lccode`~=`##1%
- \lowercase{\endgroup
- \catcode`~\active
- }%
- }%
- }
-\x
-\declare@shorthand{system}{"}{\csname normal@char\string"\endcsname}
-\declare@shorthand{system}{'}{%
- \textormath{\csname normal@char\string'\endcsname}%
- {\sp\bgroup\prim@s}}
-\declare@shorthand{system}{`}{\csname normal@char\string`\endcsname}
-\def\bbl@prim@s{%
- \prime\futurelet\@let@token\bbl@pr@m@s}
-\begingroup
- \catcode`\'\active\let'\relax
- \def\x{\endgroup
- \def\bbl@pr@m@s{%
- \ifx'\@let@token
- \expandafter\pr@@@s
- \else
- \ifx^\@let@token
- \expandafter\expandafter\expandafter\pr@@@t
- \else
- \egroup
- \fi
- \fi}%
- }
-\x
-\initiate@active@char{~}
-\declare@shorthand{system}{~}{\leavevmode\nobreak\ }
-\bbl@activate{~}
-\def\bbl@disc#1#2{%
- \nobreak\discretionary{#2-}{}{#1}\allowhyphens}
-\def\bbl@t@one{T1}
-\def\allowhyphens{%
- \ifx\cf@encoding\bbl@t@one\else\bbl@allowhyphens\fi}
-\def\bbl@allowhyphens{\nobreak\hskip\z@skip}
-%HERE ENDS THE CODE COPIED FROM babel.def --------------------
-\def\bbl@disc@german#1#2{%
- \nobreak\discretionary{#2-}{}{#1}}
-% \end{macrocode}
-% \iffalse
-%</babelsh.def>
-%<*cal-util.def>
-% \fi
-% \clearpage
-%
-% \subsection{cal-util.def}
-% \begin{macrocode}
-%%%%%%%%%%%%% cal-util.def %%%%%%%%%%%%%%%%
-% Macros shared by hijrical and hebrewcal %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% the following is adapted from hebcal.sty in babel
-\def\@Remainder#1#2#3{%
- #3 = #1% % c = a
- \divide #3 by #2% % c = a/b
- \multiply #3 by -#2% % c = -b(a/b)
- \advance #3 by #1}% % c = a - b(a/b)
-\newif\if@Divisible
-\def\@CheckIfDivisible#1#2{%
- {%
- \countdef\tmpx=0% % temporary variable
- \@Remainder{#1}{#2}{\tmpx}%
- \ifnum\tmpx=0%
- \global\@Divisibletrue%
- \else%
- \global\@Divisiblefalse%
- \fi}}
-\newif\if@GregorianLeap
-\def\@CheckIfGregorianLeap#1{%
- {%
- \@CheckIfDivisible{#1}{4}%
- \if@Divisible%
- \@CheckIfDivisible{#1}{100}%
- \if@Divisible%
- \@CheckIfDivisible{#1}{400}%
- \if@Divisible%
- \global\@GregorianLeaptrue%
- \else%
- \global\@GregorianLeapfalse%
- \fi%
- \else%
- \global\@GregorianLeaptrue%
- \fi%
- \else%
- \global\@GregorianLeapfalse%
- \fi%
- }}
-%%
-
-\newcounter{tmpA}\newcounter{tmpB}
-\newcounter{tmpC}\newcounter{tmpD}
-\newcounter{tmpE}\newcounter{tmpF}
-
-
-%% This is an algorithm from Reingold & Dershowitz,
-%% Calendrical Calculations, The Millenium Edition
-%%
-\def\@FixedFromGregorian#1#2#3#4{%
- \setcounter{tmpA}{(#1-1)*365}%
- \setcounter{tmpB}{(#1-1)/4}%
- \setcounter{tmpC}{(#1-1)/100}%
- \setcounter{tmpD}{(#1-1)/400}%
- \setcounter{tmpE}{(367*#2-362)/12}%
- \ifnum#2<3%
- \setcounter{tmpF}{0}%
- \else%
- \@CheckIfGregorianLeap{#1}%
- \if@GregorianLeap%
- \setcounter{tmpF}{-1}%
- \else%
- \setcounter{tmpF}{-2}%
- \fi%
- \fi%
- \@ifundefined{c@#4}{\global\newcounter{#4}}{}%
- \setcounter{#4}{\value{tmpA}+\value{tmpB}-\value{tmpC}+\value{tmpD}+\value{tmpE}+\value{tmpF}+#3}%
-}
-% \end{macrocode}
-% \iffalse
-%</cal-util.def>
-%<*xgreek-fixes.def>
-% \fi
-% \clearpage
-%
-% \subsection{xgreek-fixes.def}
-% \begin{macrocode}
-% the following fixes are taken verbatim from xgreek.sty:
-\global\lccode"0386="03AC \global\uccode"0386="0391
-\global\lccode"0388="03AD \global\uccode"0388="0395
-\global\lccode"0389="03AC \global\uccode"0389="0397
-\global\lccode"038A="03AF \global\uccode"038A="0399
-\global\lccode"038C="03CC \global\uccode"038C="039F
-\global\lccode"038E="03CD \global\uccode"038E="03A5
-\global\lccode"038F="03CE \global\uccode"038F="03A9
-\global\lccode"0390="0390 \global\uccode"0390="03AA
-\global\lccode"0391="03B1 \global\uccode"0391="0391
-\global\lccode"0392="03B2 \global\uccode"0392="0392
-\global\lccode"0393="03B3 \global\uccode"0393="0393
-\global\lccode"0394="03B4 \global\uccode"0394="0394
-\global\lccode"0395="03B5 \global\uccode"0395="0395
-\global\lccode"0396="03B6 \global\uccode"0396="0396
-\global\lccode"0397="03B7 \global\uccode"0397="0397
-\global\lccode"0398="03B8 \global\uccode"0398="0398
-\global\lccode"0399="03B9 \global\uccode"0399="0399
-\global\lccode"039A="03BA \global\uccode"039A="039A
-\global\lccode"039B="03BB \global\uccode"039B="039B
-\global\lccode"039C="03BC \global\uccode"039C="039C
-\global\lccode"039D="03BD \global\uccode"039D="039D
-\global\lccode"039E="03BE \global\uccode"039E="039E
-\global\lccode"039F="03BF \global\uccode"039F="039F
-\global\lccode"03A0="03C0 \global\uccode"03A0="03A0
-\global\lccode"03A1="03C1 \global\uccode"03A1="03A1
-\global\lccode"03A3="03C3 \global\uccode"03A3="03A3
-\global\lccode"03A4="03C4 \global\uccode"03A4="03A4
-\global\lccode"03A5="03C5 \global\uccode"03A5="03A5
-\global\lccode"03A6="03C6 \global\uccode"03A6="03A6
-\global\lccode"03A7="03C7 \global\uccode"03A7="03A7
-\global\lccode"03A8="03C8 \global\uccode"03A8="03A8
-\global\lccode"03A9="03C9 \global\uccode"03A9="03A9
-\global\lccode"03AA="03CA \global\uccode"03AA="03AA
-\global\lccode"03AB="03CB \global\uccode"03AB="03AB
-\global\lccode"03AC="03AC \global\uccode"03AC="0391
-\global\lccode"03AD="03AD \global\uccode"03AD="0395
-\global\lccode"03AE="03AE \global\uccode"03AE="0397
-\global\lccode"03AF="03AF \global\uccode"03AF="0399
-\global\lccode"03B0="03B0 \global\uccode"03B0="03AB
-\global\lccode"03B1="03B1 \global\uccode"03B1="0391
-\global\lccode"03B2="03B2 \global\uccode"03B2="0392
-\global\lccode"03B3="03B3 \global\uccode"03B3="0393
-\global\lccode"03B4="03B4 \global\uccode"03B4="0394
-\global\lccode"03B5="03B5 \global\uccode"03B5="0395
-\global\lccode"03B6="03B6 \global\uccode"03B6="0396
-\global\lccode"03B7="03B7 \global\uccode"03B7="0397
-\global\lccode"03B8="03B8 \global\uccode"03B8="0398
-\global\lccode"03B9="03B9 \global\uccode"03B9="0399
-\global\lccode"03BA="03BA \global\uccode"03BA="039A
-\global\lccode"03BB="03BB \global\uccode"03BB="039B
-\global\lccode"03BC="03BC \global\uccode"03BC="039C
-\global\lccode"03BD="03BD \global\uccode"03BD="039D
-\global\lccode"03BE="03BE \global\uccode"03BE="039E
-\global\lccode"03BF="03BF \global\uccode"03BF="039F
-\global\lccode"03C0="03C0 \global\uccode"03C0="03A0
-\global\lccode"03C1="03C1 \global\uccode"03C1="03A1
-\global\lccode"03C2="03C2 \global\uccode"03C2="03A3
-\global\lccode"03C3="03C3 \global\uccode"03C3="03A3
-\global\lccode"03C4="03C4 \global\uccode"03C4="03A4
-\global\lccode"03C5="03C5 \global\uccode"03C5="03A5
-\global\lccode"03C6="03C6 \global\uccode"03C6="03A6
-\global\lccode"03C7="03C7 \global\uccode"03C7="03A7
-\global\lccode"03C8="03C8 \global\uccode"03C8="03A8
-\global\lccode"03C9="03C9 \global\uccode"03C9="03A9
-\global\lccode"03CA="03CA \global\uccode"03CA="03AA
-\global\lccode"03CB="03CB \global\uccode"03CB="03AB
-\global\lccode"03CC="03CC \global\uccode"03CC="039F
-\global\lccode"03CD="03CD \global\uccode"03CD="03A5
-\global\lccode"03CE="03CE \global\uccode"03CE="03A9
-\global\lccode"03D0="03D0 \global\uccode"03D0="0392
-\global\lccode"03D1="03D1 \global\uccode"03D1="0398
-\global\lccode"03D2="03C5 \global\uccode"03D2="03A5
-\global\lccode"03D3="03CD \global\uccode"03D3="03A5
-\global\lccode"03D4="03CB \global\uccode"03D4="03AB
-\global\lccode"03D5="03C6 \global\uccode"03D5="03A6
-\global\lccode"03D6="03C0 \global\uccode"03D6="03A0
-\global\lccode"03DA="03DB \global\uccode"03DA="03DA
-\global\lccode"03DB="03DB \global\uccode"03DB="03DA
-\global\lccode"03DC="03DD \global\uccode"03DC="03DC
-\global\lccode"03DD="03DD \global\uccode"03DD="03DC
-\global\lccode"03DE="03DF \global\uccode"03DE="03DE
-\global\lccode"03DF="03DF \global\uccode"03DF="03DE
-\global\lccode"03E0="03E1 \global\uccode"03E0="039A
-\global\lccode"03E0="03E1 \global\uccode"03E1="03A1
-\global\lccode"03F0="03BA \global\uccode"03F0="039A
-\global\lccode"03F1="03C1 \global\uccode"03F1="03A1
-\global\lccode"03F2="03F2 \global\uccode"03F2="03F9
-\global\lccode"03F9="03F2 \global\uccode"03F9="03F9
-\global\lccode"1F00="1F00 \global\uccode"1F00="0391
-\global\lccode"1F01="1F01 \global\uccode"1F01="0391
-\global\lccode"1F02="1F02 \global\uccode"1F02="0391
-\global\lccode"1F03="1F03 \global\uccode"1F03="0391
-\global\lccode"1F04="1F04 \global\uccode"1F04="0391
-\global\lccode"1F05="1F05 \global\uccode"1F05="0391
-\global\lccode"1F06="1F06 \global\uccode"1F06="0391
-\global\lccode"1F07="1F07 \global\uccode"1F07="0391
-\global\lccode"1F08="1F00 \global\uccode"1F08="0391
-\global\lccode"1F09="1F01 \global\uccode"1F09="0391
-\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391
-\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391
-\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391
-\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391
-\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391
-\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391
-\global\lccode"1F10="1F10 \global\uccode"1F10="0395
-\global\lccode"1F11="1F11 \global\uccode"1F11="0395
-\global\lccode"1F12="1F12 \global\uccode"1F12="0395
-\global\lccode"1F13="1F13 \global\uccode"1F13="0395
-\global\lccode"1F14="1F14 \global\uccode"1F14="0395
-\global\lccode"1F15="1F15 \global\uccode"1F15="0395
-\global\lccode"1F18="1F10 \global\uccode"1F18="0395
-\global\lccode"1F19="1F11 \global\uccode"1F19="0395
-\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395
-\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395
-\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395
-\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395
-\global\lccode"1F20="1F20 \global\uccode"1F20="0397
-\global\lccode"1F21="1F21 \global\uccode"1F21="0397
-\global\lccode"1F22="1F22 \global\uccode"1F22="0397
-\global\lccode"1F23="1F23 \global\uccode"1F23="0397
-\global\lccode"1F24="1F24 \global\uccode"1F24="0397
-\global\lccode"1F25="1F25 \global\uccode"1F25="0397
-\global\lccode"1F26="1F26 \global\uccode"1F26="0397
-\global\lccode"1F27="1F27 \global\uccode"1F27="0397
-\global\lccode"1F28="1F20 \global\uccode"1F28="0397
-\global\lccode"1F29="1F21 \global\uccode"1F29="0397
-\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397
-\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397
-\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397
-\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397
-\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397
-\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397
-\global\lccode"1F30="1F30 \global\uccode"1F30="0399
-\global\lccode"1F31="1F31 \global\uccode"1F31="0399
-\global\lccode"1F32="1F32 \global\uccode"1F32="0399
-\global\lccode"1F33="1F33 \global\uccode"1F33="0399
-\global\lccode"1F34="1F34 \global\uccode"1F34="0399
-\global\lccode"1F35="1F35 \global\uccode"1F35="0399
-\global\lccode"1F36="1F36 \global\uccode"1F36="0399
-\global\lccode"1F37="1F37 \global\uccode"1F37="0399
-\global\lccode"1F38="1F30 \global\uccode"1F38="0399
-\global\lccode"1F39="1F31 \global\uccode"1F39="0399
-\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399
-\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399
-\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399
-\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399
-\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399
-\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399
-\global\lccode"1F40="1F40 \global\uccode"1F40="039F
-\global\lccode"1F41="1F41 \global\uccode"1F41="039F
-\global\lccode"1F42="1F42 \global\uccode"1F42="039F
-\global\lccode"1F43="1F43 \global\uccode"1F43="039F
-\global\lccode"1F44="1F44 \global\uccode"1F44="039F
-\global\lccode"1F45="1F45 \global\uccode"1F45="039F
-\global\lccode"1F48="1F40 \global\uccode"1F48="039F
-\global\lccode"1F49="1F41 \global\uccode"1F49="039F
-\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F
-\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F
-\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F
-\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F
-\global\lccode"1F50="1F50 \global\uccode"1F50="03A5
-\global\lccode"1F51="1F51 \global\uccode"1F51="03A5
-\global\lccode"1F52="1F52 \global\uccode"1F52="03A5
-\global\lccode"1F53="1F53 \global\uccode"1F53="03A5
-\global\lccode"1F54="1F54 \global\uccode"1F54="03A5
-\global\lccode"1F55="1F55 \global\uccode"1F55="03A5
-\global\lccode"1F56="1F56 \global\uccode"1F56="03A5
-\global\lccode"1F57="1F57 \global\uccode"1F57="03A5
-\global\lccode"1F59="1F51 \global\uccode"1F59="03A5
-\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5
-\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5
-\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5
-\global\lccode"1F60="1F60 \global\uccode"1F60="03A9
-\global\lccode"1F61="1F61 \global\uccode"1F61="03A9
-\global\lccode"1F62="1F62 \global\uccode"1F62="03A9
-\global\lccode"1F63="1F63 \global\uccode"1F63="03A9
-\global\lccode"1F64="1F64 \global\uccode"1F64="03A9
-\global\lccode"1F65="1F65 \global\uccode"1F65="03A9
-\global\lccode"1F66="1F66 \global\uccode"1F66="03A9
-\global\lccode"1F67="1F67 \global\uccode"1F67="03A9
-\global\lccode"1F68="1F60 \global\uccode"1F68="03A9
-\global\lccode"1F69="1F61 \global\uccode"1F69="03A9
-\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9
-\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9
-\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9
-\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9
-\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9
-\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9
-\global\lccode"1F70="1F70 \global\uccode"1F70="0391
-\global\lccode"1F71="1F71 \global\uccode"1F71="0391
-\global\lccode"1F72="1F72 \global\uccode"1F72="0395
-\global\lccode"1F73="1F73 \global\uccode"1F73="0395
-\global\lccode"1F74="1F74 \global\uccode"1F74="0397
-\global\lccode"1F75="1F75 \global\uccode"1F75="0397
-\global\lccode"1F76="1F76 \global\uccode"1F76="0399
-\global\lccode"1F77="1F77 \global\uccode"1F77="0399
-\global\lccode"1F78="1F78 \global\uccode"1F78="039F
-\global\lccode"1F79="1F79 \global\uccode"1F79="039F
-\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5
-\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5
-\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9
-\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9
-\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC
-\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC
-\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC
-\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC
-\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC
-\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC
-\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC
-\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC
-\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC
-\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC
-\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC
-\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC
-\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC
-\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC
-\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC
-\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC
-\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC
-\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC
-\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC
-\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC
-\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC
-\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC
-\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC
-\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC
-\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC
-\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC
-\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC
-\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC
-\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC
-\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC
-\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC
-\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC
-\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC
-\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC
-\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC
-\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC
-\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC
-\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC
-\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC
-\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC
-\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC
-\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC
-\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC
-\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC
-\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC
-\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC
-\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC
-\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC
-\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8
-\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9
-\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC
-\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC
-\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC
-\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391
-\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC
-\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8
-\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9
-\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391
-\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391
-\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC
-\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD
-\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC
-\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC
-\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC
-\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397
-\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC
-\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395
-\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395
-\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397
-\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397
-\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC
-\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8
-\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9
-\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA
-\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA
-\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399
-\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA
-\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8
-\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9
-\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399
-\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399
-\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8
-\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9
-\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB
-\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB
-\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1
-\global\lccode"1FE5="1FE5 \global\uccode"1FE5="1FEC
-\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5
-\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB
-\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8
-\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9
-\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5
-\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5
-\global\lccode"1FEC="1FE5 \global\uccode"1FEC="1FEC
-\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC
-\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC
-\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC
-\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9
-\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC
-\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F
-\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F
-\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9
-\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9
-\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC
-% \end{macrocode}
-% \iffalse
-%</xgreek-fixes.def>
%<*gloss-albanian.ldf>
% \fi
% \clearpage
@@ -4514,15 +2242,32 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%%% 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{\ifnum\XeTeXcharglyph"00B7 > 0\hbox{\char"00B7}%
- \else\raise\raiselldim\hbox{.}\fi}
+\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 %
+ }
\def\lgem{%
\ifmmode
\csname normal@char\string"\endcsname l%
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
\setbox0\hbox{l}\setbox1\hbox{l\/}%
- \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}\else\setbox2\hbox{.}\fi
+ \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 %
\advance\raiselldim by \the\fontdimen5\the\font
\advance\raiselldim by -\ht2%
\leftllkern=-.25\wd0%
@@ -4542,7 +2287,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
\setbox0\hbox{L}\setbox1\hbox{L\/}%
- \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}\else\setbox2\hbox{.}\fi
+ \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 %
\advance\raiselldim by .5\ht0%
\advance\raiselldim by -.5\ht2%
\leftllkern=-.125\wd0%
@@ -5384,59 +3137,81 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
hyphenmins={2,2},
fontsetup=true}
-\newXeTeXintercharclass\french@punctthin % ! ? ; et autres
-\newXeTeXintercharclass\french@punctthick % :
-\newXeTeXintercharclass\french@punctguillstart % « ‹
-\newXeTeXintercharclass\french@punctguillend % » ›
+\ifluatex
+ \newluatexattribute\xpg@frpt %
+ \directlua{polyglossia.load_frpt()}%
+ \global\newcount\xpg@interchartokenstate %
+\else
+ \newXeTeXintercharclass\french@punctthin % ! ? ; et autres
+ \newXeTeXintercharclass\french@punctthick % :
+ \newXeTeXintercharclass\french@punctguillstart % « ‹
+ \newXeTeXintercharclass\french@punctguillend % » ›
+\fi
\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
\def\xpg@nospace#1{#1}
\def\french@punctuation{%
\lccode"2019="2019
- \XeTeXinterchartokenstate=1
- \XeTeXcharclass `\! \french@punctthin
- \XeTeXcharclass `\? \french@punctthin
- \XeTeXcharclass `\‼ \french@punctthin
- \XeTeXcharclass `\⁇ \french@punctthin
- \XeTeXcharclass `\⁈ \french@punctthin
- \XeTeXcharclass `\⁉ \french@punctthin
- \XeTeXcharclass `\; \french@punctthin
- \XeTeXcharclass `\: \french@punctthick
- \XeTeXcharclass `\« \french@punctguillstart
- \XeTeXcharclass `\» \french@punctguillend
- \XeTeXcharclass `\‹ \french@punctguillstart
- \XeTeXcharclass `\› \french@punctguillend
- \XeTeXinterchartoks \z@ \french@punctthin = {\nobreak\thinspace}%
- \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
- \XeTeXinterchartoks 255 \french@punctthin = {\xpg@unskip\nobreak\thinspace}%
- \XeTeXinterchartoks 255 \french@punctthick = {\xpg@unskip\nobreakspace}%
- \XeTeXinterchartoks \french@punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
-% \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
-% \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
- \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »"
- \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~"
- \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»"
- \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
- \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
- \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\nobreakspace}% "?»" -> "? »"
+ \ifluatex
+ \global\xpg@frpt=1\relax %
+ \directlua{polyglossia.activate_frpt()}%
+ \else
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\! \french@punctthin
+ \XeTeXcharclass `\? \french@punctthin
+ \XeTeXcharclass `\‼ \french@punctthin
+ \XeTeXcharclass `\⁇ \french@punctthin
+ \XeTeXcharclass `\⁈ \french@punctthin
+ \XeTeXcharclass `\⁉ \french@punctthin
+ \XeTeXcharclass `\; \french@punctthin
+ \XeTeXcharclass `\: \french@punctthick
+ \XeTeXcharclass `\« \french@punctguillstart
+ \XeTeXcharclass `\» \french@punctguillend
+ \XeTeXcharclass `\‹ \french@punctguillstart
+ \XeTeXcharclass `\› \french@punctguillend
+ \XeTeXinterchartoks \z@ \french@punctthin = {\nobreak\thinspace}%
+ \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
+ \XeTeXinterchartoks 255 \french@punctthin = {\xpg@unskip\nobreak\thinspace}%
+ \XeTeXinterchartoks 255 \french@punctthick = {\xpg@unskip\nobreakspace}%
+ \XeTeXinterchartoks \french@punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
+ % \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
+ % \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
+ \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »"
+ \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~"
+ \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»"
+ \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
+ \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
+ \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\nobreakspace}% "?»" -> "? »"
+ \fi
}
\def\nofrench@punctuation{%
\lccode"2019=\z@
- \XeTeXcharclass `\! \z@
- \XeTeXcharclass `\? \z@
- \XeTeXcharclass `\‼ \z@
- \XeTeXcharclass `\⁇ \z@
- \XeTeXcharclass `\⁈ \z@
- \XeTeXcharclass `\⁉ \z@
- \XeTeXcharclass `\; \z@
- \XeTeXcharclass `\: \z@
- \XeTeXcharclass `\« \z@
- \XeTeXcharclass `\» \z@
- \XeTeXcharclass `\‹ \z@
- \XeTeXcharclass `\› \z@
- \XeTeXinterchartokenstate=0
+ \ifluatex
+ \global\xpg@frpt=0\relax %
+ % Though it would make compilation slightly faster, it is not possible to
+ % safely uncomment the following line. Imagine the following case: you start
+ % a paragraph by some french text, then, in the same paragraph, you change
+ % the language to something else, and thus call the following line. This means
+ % that, at then end of the paragraph, the function won't be in the callback,
+ % so the beginning of the paragraph won't be processed by it.
+ %\directlua{polyglossia.desactivate_frpt()}
+ \else
+ \XeTeXcharclass `\! \z@
+ \XeTeXcharclass `\? \z@
+ \XeTeXcharclass `\‼ \z@
+ \XeTeXcharclass `\⁇ \z@
+ \XeTeXcharclass `\⁈ \z@
+ \XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\; \z@
+ \XeTeXcharclass `\: \z@
+ \XeTeXcharclass `\« \z@
+ \XeTeXcharclass `\» \z@
+ \XeTeXcharclass `\‹ \z@
+ \XeTeXcharclass `\› \z@
+ \XeTeXinterchartokenstate=0
+ \fi
}
\def\captionsfrench{%
@@ -5551,9 +3326,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\noextras@friulan{%
\lccode\string"2019=\z@
- % TODO Figure out what the two lines below were supposed to be good for.
- % \noitalian@shorthands
- % \xpgit@savedvalues
}
\def\blockextras@friulan{%
@@ -5800,6 +3572,423 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-german.ldf>
+%<*gloss-greek-new.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-greek-new.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek]
+\PolyglossiaSetup{greek}{
+ script=Greek,
+ scripttag=grek,
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+ %TODO localalph={greek@alph,greek@Alph}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The code in this file was initially adapted from the antomega
+%% module for greek. Currently large parts of it derive from the
+%% package xgreek.sty (c) Apostolos Syropoulos
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% this file imported from xgreek fixes the \lccode and \uccode of Greek letters:
+\input{xgreek-fixes.def}
+
+%TODO: set these in \define@key instead:
+\ifx\l@greek\@undefined
+ \ifx\l@polygreek\@undefined
+ \xpg@nopatterns{Greek}%
+ \adddialect\l@greek\l@nohyphenation
+ \else
+ \let\l@greek\l@polygreek
+ \fi
+\fi
+\ifx\l@monogreek\@undefined
+ \xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
+ I will use the patterns loaded for \string\l@greek instead}
+ \adddialect\l@monogreek\l@greek
+\fi
+\ifx\l@ancientgreek\@undefined
+ \xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
+ I will use the patterns loaded for \string\l@greek instead}
+ \adddialect\l@ancientgreek\l@greek
+\fi
+
+%set monotonic as default
+\def\greek@variant{\l@monogreek}% monotonic
+\def\captionsgreek{\monogreekcaptions}%
+\def\dategreek{\datemonogreek}%
+
+\def\tmp@mono{mono}
+\def\tmp@monotonic{monotonic}
+\def\tmp@poly{poly}
+\def\tmp@polytonic{polytonic}
+\def\tmp@ancient{ancient}
+\def\tmp@ancientgreek{ancientgreek}
+
+\define@key{greek}{variant}[monotonic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@poly\def\@tmpa{polytonic}\fi
+ \ifx\@tmpa\tmp@ancientgreek\def\@tmpa{ancient}\fi
+ \ifx\@tmpa\tmp@polytonic%
+ \def\greek@variant{\l@polygreek}%
+ \def\captionsgreek{\polygreekcaptions}%
+ \def\dategreek{\datepolygreek}%
+ \xpg@info{Option: Polytonic Greek}%
+ \else
+ \ifx\@tmpa\tmp@ancient
+ \def\greek@variant{\l@ancientgreek}%
+ \def\captionsgreek{\ancientgreekcaptions}%
+ \def\dategreek{\dateancientgreek}%
+ \xpg@info{Option: Ancient Greek}%
+ \else %monotonic
+ \def\greek@variant{\l@monogreek}% monotonic
+ \def\captionsgreek{\monogreekcaptions}%
+ \def\dategreek{\datemonogreek}%
+ \xpg@info{Option: Monotonic Greek}%
+ \fi
+ \fi}
+
+\def\greek@language{\language=\greek@variant}
+
+\newif\if@greek@numerals
+\define@key{greek}{numerals}[greek]{%
+\ifstrequal{#1}{arabic}{\@greek@numeralsfalse}{\@greek@numeralstrue}}
+
+\define@boolkey{greek}{attic}[true]{\xpg@warning{Greek option `attic' is no longer required.}}
+
+% This sets the defaults
+\setkeys{greek}{numerals}
+
+\def\monogreekcaptions{%
+ \def\refname{Αναφορές}%
+ \def\abstractname{Περίληψη}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\prefacename{Πρόλογος}%
+ \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\datemonogreek{%
+ \def\today{\number\day\space%
+ \greek@month%
+ \space\number\year}%
+ \def\greektoday{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}%
+ \def\Greektoday{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}%
+ \def\greek@month{\ifcase\month\or%
+ Ιανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Απριλίου\or
+ Μαΐου\or
+ Ιουνίου\or
+ Ιουλίου\or
+ Αυγούστου\or
+ Σεπτεμβρίου\or
+ Οκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}%
+
+\def\polygreekcaptions{%
+ \def\refname{Ἀναφορές}%
+ \def\abstractname{Περίληψη}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\prefacename{Πρόλογος}%
+ \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\datepolygreek{%
+ \def\today{\number\day\space%
+ \greek@month%
+ \space\number\year}%
+ \def\greektoday{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}%
+ \def\Greektoday{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}%
+ \def\greek@month{\ifcase\month\or%
+ Ἰανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Ἀπριλίου\or
+ Μαΐου\or
+ Ἰουνίου\or
+ Ἰουλίου\or
+ Αὐγούστου\or
+ Σεπτεμβρίου\or
+ Ὀκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}%
+
+% this is copied verbatim from xgreek.sty:
+\def\ancientgreekcaptions{%
+ \def\prefacename{Προοίμιον}%
+ \def\refname{Αναφοραί}%
+ \def\abstractname{Περίληψις}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\chaptername{Κεφάλαιον}%
+ \def\appendixname{Παράρτημα}%
+ \def\contentsname{Περιεχόμενα}%
+ \def\listfigurename{Κατάλογος σχημάτων}%
+ \def\listtablename{Κατάλογος πινάκων}%
+ \def\indexname{Εὑρετήριον}%
+ \def\figurename{Σχήμα}%
+ \def\tablename{Πίναξ}%
+ \def\partname{Μέρος}%
+ \def\enclname{Συνημμένως}%
+ \def\ccname{Κοινοποίησις}%
+ \def\headtoname{Πρὸς}%
+ \def\pagename{Σελὶς}%
+ \def\seename{ὃρα}%
+ \def\alsoname{ὃρα ὡσαύτως}%
+ \def\proofname{Ἀπόδειξις}%
+ \def\glossaryname{Γλωσσάριον}%
+ \def\refname{Ἀναφοραὶ}%
+ \def\indexname{Εὑρετήριο}%
+ \def\figurename{Σχῆμα}%
+ \def\headtoname{Πρὸς}}%
+
+\def\dateancientgreek{%
+ \def\today{\number\day\space%
+ \greek@month%
+ \space\number\year}%
+ \def\greektoday{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}%
+ \def\Greektoday{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}%
+ \def\greek@month{\ifcase\month\or%
+ Ἰανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Ἀπριλίου\or
+ Μαΐου\or
+ Ἰουνίου\or
+ Ἰουλίου\or
+ Αὐγούστου\or
+ Σεπτεμβρίου\or
+ Ὀκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}
+
+% the code for alphabetic numbers and attic numerals
+% is not copied verbatim from xgreek.sty any more
+% it has been proposed by eg9 on issue 36 of the repository
+% see https://github.com/reutenauer/polyglossia/issues/36
+\newrobustcmd\anw@print{}
+\newrobustcmd\anw@false{%
+\renewrobustcmd\anw@print{}}
+\newrobustcmd\anw@true{%
+\renewrobustcmd\anw@print{ʹ}}
+\anw@true
+
+\protected\def\greeknumber#1{\expandafter\@greeknumber\expandafter{\number#1}}
+
+\def\@greeknumber#1{%
+\ifnum#1<\@ne\space\gr@ill@value{#1}%
+\else %
+\ifnum#1<10 \gr@num@i#1%
+\else %
+\ifnum#1<100 \gr@num@ii#1%
+\else %
+\ifnum#1<\@m \gr@num@iii#1%
+\else %
+\ifnum#1<\@M \gr@num@iv#1%
+\else %
+\ifnum#1<100000 \gr@num@v#1%
+\else %
+\ifnum#1<1000000 \gr@num@vi#1%
+\else %
+\space\gr@ill@value{#1}%
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+}
+
+\protected\def\Greeknumber#1{\expandafter\@Greeknumber\expandafter{\number#1}}
+\def\@Greeknumber#1{%
+\ifnum#1<\@ne\space\gr@ill@value{#1}%
+\else %
+\ifnum#1<10 \gr@Num@i#1%
+\else %
+\ifnum#1<100 \gr@Num@ii#1%
+\else %
+\ifnum#1<\@m\gr@Num@iii#1%
+\else %
+\ifnum#1<\@M\gr@Num@iv#1%
+\else %
+\ifnum#1<100000 \gr@Num@v#1%
+\else %
+\ifnum#1<1000000 \gr@Num@vi#1%
+\else %
+\space\gr@ill@value{#1}%
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+}
+
+\let\greeknumeral=\greeknumber
+\let\Greeknumeral=\Greeknumber
+
+\def\gr@num@i#1{%
+\ifcase#1 \or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi %
+\ifnum#1=\z@\else\anw@true\fi\anw@print}
+
+\def\gr@num@ii#1{%
+\ifcase#1 \or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi %
+\ifnum#1=\z@\else\anw@true\fi\gr@num@i}
+
+\def\gr@num@iii#1{%
+\ifcase#1 \or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi %
+\ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii}
+
+\def\gr@num@iv#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi %
+\gr@num@iii}
+
+\def\gr@num@v#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi %
+\gr@num@iv}
+
+\def\gr@num@vi#1{%
+͵\ifcase#1 \or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi %
+\gr@num@v}%
+
+\def\gr@Num@i#1{%
+\ifcase#1 \or Α\or Β\or Γ\or Δ\or Ε\or \MakeUppercase{Ϛ}\or Ζ\or Η\or θ\fi %
+\ifnum#1=\z@\else\anw@true\fi\anw@print}
+
+\def\gr@Num@ii#1{%
+\ifcase#1 \or Ι\or Κ\or Λ\or Μ\or Ν\or Ξ\or Ο\or Π\or \MakeUppercase{ϟ}\fi %
+\ifnum#1=\z@\else\anw@true\fi\gr@Num@i}
+
+\def\gr@Num@iii#1{%
+\ifcase#1 \or Ρ\or Σ\or Τ\or Υ\or Φ\or Χ\or Ψ\or Ω\or \MakeUppercase{ϡ}\fi %
+\ifnum#1=\z@\anw@false\else\anw@true\fi\gr@Num@ii}
+
+\def\gr@Num@iv#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or Α\or Β\or Γ\or Δ\or Ε\or \MakeUppercase{Ϛ}\or Ζ\or Η\or θ\fi %
+\gr@Num@iii}
+
+\def\gr@Num@v#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or Ι\or Κ\or Λ\or Μ\or Ν\or Ξ\or Ο\or Π\or \MakeUppercase{ϟ}\fi %
+\gr@Num@iv}
+
+\def\gr@Num@vi#1{%
+͵ \ifcase#1 \or Ρ\or Σ\or Τ\or Υ\or Φ\or Χ\or Ψ\or Ω\or \MakeUppercase{ϡ}\fi %
+\gr@Num@v}
+
+\def\gr@ill@value#1{\xpg@warning{Illegal value (#1) for Greek numeral}[$#1$]}
+
+%%%% Attic numerals (no longer optional)
+\newcount\@attic@num
+\DeclareRobustCommand*{\@@atticnum}[1]{%
+ \@attic@num#1\relax
+ \ifnum\@attic@num<\@ne%
+ \space%
+ \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
+ \else\ifnum\@attic@num>249999%
+ \space%
+ \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
+ \else
+ \@whilenum\@attic@num>49999\do{%
+ \char"10147\advance\@attic@num-50000}%
+ \@whilenum\@attic@num>9999\do{%
+ M\advance\@attic@num-\@M}%
+ \ifnum\@attic@num>4999%
+ \char"10146\advance\@attic@num-5000%
+ \fi\relax
+ \@whilenum\@attic@num>999\do{%
+ Χ\advance\@attic@num-\@m}%
+ \ifnum\@attic@num>499%
+ \char"10145\advance\@attic@num-500%
+ \fi\relax
+ \@whilenum\@attic@num>99\do{%
+ Η\advance\@attic@num-100}%
+ \ifnum\@attic@num>49%
+ \char"10144\advance\@attic@num-50%
+ \fi\relax
+ \@whilenum\@attic@num>9\do{%
+ Δ\advance\@attic@num by-10}%
+ \@whilenum\@attic@num>4\do{%
+ Π\advance\@attic@num-5}%
+ \ifcase\@attic@num\or Ι\or ΙΙ\or ΙΙΙ\or ΙΙΙΙ\fi%
+ \fi\fi}
+\def\@atticnum#1{%
+ \expandafter\@@atticnum\expandafter{\the#1}}
+\def\atticnumeral#1{%
+ \@attic@num#1\relax
+ \@atticnum{\@attic@num}}
+\let\atticnum=\atticnumeral
+
+\def\greek@numbers{%
+ \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \if@greek@numerals
+ \def\greek@alph##1{\protect\greeknumber{##1}}%
+ \def\greek@Alph##1{\protect\Greeknumber{##1}}%
+ \let\@alph\greek@alph%
+ \let\@Alph\greek@Alph%
+ \fi}
+
+\def\nogreek@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+ \let\greek@alph\@undefined%
+ \let\greek@Alph\@undefined%
+ }
+
+% \end{macrocode}
+% \iffalse
+%</gloss-greek-new.ldf>
%<*gloss-greek.ldf>
% \fi
% \clearpage
@@ -6657,6 +4846,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%%% ORIGINAL END %%%
%%% CHANGES START %%% by Enrico Gregorio
+\let\xpgit@savedvalues\empty
\AtEndPreamble{% the user or the class might define different values
\edef\xpgit@savedvalues{%
\clubpenalty=\the\clubpenalty\space
@@ -7496,6 +5686,128 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-occitan.ldf>
+%<*gloss-piedmontese.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-piedmontese.ldf}
+% \begin{macrocode}
+% !TEX encoding = UTF-8 Unicode
+\ProvidesFile{gloss-piedmontese.ldf}[2013/02/12 v1.0 polyglossia: module for piedmontese]
+\makeatletter
+\PolyglossiaSetup{piedmontese}{
+ hyphennames={piedmontese},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
+
+
+\define@boolkey{piedmontese}[piedmontese@]{babelshorthands}[true]{}
+
+\ifsystem@babelshorthands
+ \setkeys{piedmontese}{babelshorthands=true}
+\else
+ \setkeys{piedmontese}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+\input{babelsh.def}%
+\initiate@active@char{"}%
+}{}
+
+\def\piedmontese@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{piedmontese}%
+ \declare@shorthand{piedmontese}{"}{%
+ \relax\ifmmode
+ \def\xpgpms@next{''}%
+ \else
+ \def\xpgpms@next{\futurelet\xpgpms@temp\xpgpms@cwm}%
+ \fi
+ \xpgpms@next}%
+}
+
+\def\xpgpms@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip}
+\def\xpgpms@cwm{\let\xpgpms@@next\relax
+\ifcat\noexpand\xpgpms@temp a%
+ \def\xpgpms@@next{\pms@@cwm}%
+\else
+ \ifx\xpgpms@temp/%
+ \def\xpgpms@@next{\bbl@allowhyphens/\bbl@allowhyphens\@gobble}%
+ \else
+ \ifx\xpgpms@temp-%
+ \def\xpgpms@@next{\bbl@allowhyphens-\bbl@allowhyphens\@gobble}%
+ \else
+ \ifx\xpgpms@temp"%
+ \def\xpgpms@@next{``\expandafter\@gobble\string}%
+ \fi
+ \fi
+ \fi
+\xpgpms@@next}
+
+\def\nopiedmontese@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+\@namedef{captions\CurrentOption}{%
+ \def\prefacename{Prefassion}%
+ \def\refname{Riferiment}%
+ \def\abstractname{Somari}%
+ \def\bibname{Bibliografìa}%
+ \def\chaptername{Capìtol}%
+ \def\appendixname{Gionta}%
+ \def\contentsname{Tàula}%
+ \def\listfigurename{Lista dle figure}%
+ \def\listtablename{Lista dle tabele}%
+ \def\indexname{Tàula analìtica}%
+ \def\figurename{Figura}%
+ \def\tablename{Tabela}%
+ \def\partname{Part}%
+ \def\enclname{Gionta/e}%
+ \def\ccname{Con còpia a}%
+ \def\headtoname{Për}%
+ \def\pagename{Pàgina}%
+ \def\seename{vëd}%
+ \def\alsoname{vëd anche}%
+ \def\proofname{Dimostrassion}%
+ \def\glossaryname{Glossari}%
+}
+\@namedef{date\CurrentOption}{%
+ \def\today{\number\day\space\ifcase\month\or
+ ëd gené\or ëd fevré\or ëd mars\or d'avril\or ëd maj\or ëd giugn\or
+ ëd luj\or d'agost\or dë stèmber\or d'otóber\or ëd novèmber\or dë dzèmber%
+ \fi\space dal\space\number\year}}
+
+\AtEndPreamble{%
+ \edef\xpgpms@savedvalues{%
+ \clubpenalty=\the\clubpenalty\space
+ \@clubpenalty=\the\@clubpenalty\space
+ \widowpenalty=\the\widowpenalty\space
+ \finalhyphendemerits=\the\finalhyphendemerits}
+}
+
+
+\def\noextras@piedmontese{%
+ \lccode\string"2019=\z@
+ \nopiedmontese@shorthands
+ \xpgpms@savedvalues
+}
+
+\def\blockextras@piedmontese{%
+ \lccode\string"2019=\string"2019
+ \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
+ \finalhyphendemerits=50000000
+ \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi
+}
+
+\def\inlineextras@piedmontese{%
+ \lccode\string"2019=\string"2019
+ \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi
+}
+%%% CHANGES END %%%
+% \end{macrocode}
+% \iffalse
+%</gloss-piedmontese.ldf>
%<*gloss-polish.ldf>
% \fi
% \clearpage
@@ -7538,7 +5850,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\today{\number\day\space\ifcase\month\or
stycznia\or lutego\or marca\or kwietnia\or maja\or czerwca\or
lipca\or sierpnia\or września\or października\or
- listopada\or grudnia\fi
+ listopada\or grudnia\fi\space
\number\year}%
}
@@ -7750,7 +6062,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \declare@shorthand{russian}{">}{»}%
\declare@shorthand{russian}{""}{\hskip\z@skip}%
\declare@shorthand{russian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
- \declare@shorthand{russian}{"=}{\nobreak\-\hskip\z@skip}%
+ \declare@shorthand{russian}{"=}{\nobreak-\hskip\z@skip}%
\declare@shorthand{russian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
\declare@shorthand{russian}{"-}{%
\def\russian@sh@tmp{%
@@ -8367,7 +6679,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\ccname{Kopije}%
\def\headtoname{Prejme}%
\def\proofname{Dokaz}%
- \def\glossaryname{Glosar}% <-- CHECK!
+ \def\glossaryname{Slovar}%
}
\def\dateslovenian{%
@@ -8423,7 +6735,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\today{\number\day~de~\ifcase\month\or
enero\or febrero\or marzo\or abril\or mayo\or junio\or
julio\or agosto\or septiembre\or octubre\or noviembre\or
- diciembre\fi\space \number\year}%
+ diciembre\fi\space de~\number\year}%
}
% \end{macrocode}
@@ -8919,6 +7231,152 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-thai.ldf>
+%<*gloss-tibetan.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-tibetan.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-tibetan.ldf}[polyglossia: module for tibetan]
+%% Copyright 2013 Elie Roux
+%% Under the CC0 license <http://creativecommons.org/publicdomain/zero/1.0/>
+%%
+%% A good font to make tests is \newfontfamily\tibetanfont{Tibetan Machine Uni}
+%%
+
+\PolyglossiaSetup{tibetan}{
+ script=Tibetan,
+ scripttag=tibt,
+ hyphennames={nohyphenation},
+ fontsetup=true
+ %TODO localalph={xxx@alph,xxx@Alph}
+ %TODO localdigits=tibetannumber
+}
+
+\newif\if@tibetan@numerals
+\def\tmp@tibetan{tibetan}
+\define@key{tibetan}{numerals}[tibetan]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@tibetan\@tibetan@numeralstrue\else
+ \@tibetan@numeralsfalse\fi
+}
+
+\setkeys{tibetan}{numerals}
+
+% some are known, but very few
+% a few come from "Standardizing Tibetan Terms of Information Technology"
+% from the China Tibetology Research Center
+\def\captionstibetan{%
+ %\def\refname{}%
+ \def\abstractname{གནད་བསྡུས།}%
+ \def\bibname{དཔེ་ཆའི་ཐོ་གཞུང་།}% or dpe deb kyi re'u mig?
+ \def\prefacename{དཔེ་དེབ་ཀྱི་གླེང་བརྗོད།}% or gleng brjod 'god pa or ngo sprod?
+ \def\chaptername{ལེའུ་}%
+ \def\appendixname{ཞར་བྱུང་།}%
+ \def\contentsname{དཀར་ཆག།}%
+ %\def\listfigurename{}%
+ %\def\listtablename{}%
+ \def\indexname{གསུལ་བྱང་།}%
+ \def\figurename{པར་རིས་}% or dpe ris?
+ \def\tablename{རེའུ་མིག་}%
+ %\def\thepart{}%
+ \def\partname{ཆ་ཤས་}%
+ \def\pagename{ཤོག་}%
+ %\def\seename{}%
+ %\def\alsoname{}%
+ %\def\enclname{}%
+ \def\ccname{འདྲ་བཤུས་ལེན་མཁན་}%
+ %\def\headtoname{}%
+ \def\proofname{བདེན་དཔང་།}% not sure about this one...
+ \def\glossaryname{མིང་ཚིག་རེའུ་མིག།}%
+}
+\def\datetibetan{%
+ \def\tibetan@month{%
+ \ifcase\month\or
+ ཟླ་དང་པོ\or ཟླ་གཉིས་པ\or ཟླ་གསུམ་པ%
+ \or ཟླ་བཞི་པ\or ཟླ་ལྔ་པ\or ཟླ་དྲུག་པ\or ཟླ་བདུན་པ%
+ \or ཟླ་བརྒྱད་པ\or ཟླ་དགུ་པ\or ཟླ་བཆུ་པ\or ཟླ་བཆུ་གཅིག་པ\or ཟླ་བཆུ་གཉིས་པ\fi}%
+ \def\tibetan@daynum{%
+ \ifcase\day\or དང་པོ\or གཉིས་པ\or གསུམ་པ \or བཞི་པ\or ལྔ་པ\or དྲུག་པ\or བདུན་པ\or བརྒྱད་པ\or དགུ་པ\or བཆུ་པ%
+ \or བཆུ་གཅིག་པ\or བཆུ་གཉིས་པ\or བཆུ་གསུམ་པ\or བཆུ་བཞི་པ\or བཆུ་ལྔ་པ\or བཆུ་དྲུག་པ\or བཆུ་བདུན་པ\or བཆུ་བརྒྱད་པ\or བཆུ་དགུ་པ\or ཉི་ཤུ་པ%
+
+ \or ཉི་ཤུ་རྩ་གཅིག་པ\or ཉི་ཤུ་རྩ་གཉིས་པ\or ཉི་ཤུ་རྩ་གསུམ་པ\or ཉི་ཤུ་རྩ་བཞི་པ\or ཉི་ཤུ་རྩ་ལྔ་པ\or ཉི་ཤུ་རྩ་དྲུག་པ\or ཉི་ཤུ་རྩ་བདུན་པ\or ཉི་ཤུ་རྩ་བརྒྱད་པ\or ཉི་ཤུ་རྩ་དགུ་པ\or སུམ་ཆུ་པ%
+ \or སུམ་ཆུ་སོ་གཅིག་པ\fi}%
+ % As we use gregorian calendar, it's better to stick with spyi lo
+ %\newcount\tibetan@year%
+ %\tibetan@year=\year%
+ %\advance\tibetan@year by 127% this is bod rgyal lo, the most common, but there are others...
+ % I'm not sure the / character is in most tibetan fonts
+ %\def\today{\tibetannumber\day /\tibetannumber\day /\tibetannumber\year}%
+ \def\today{\tibetannumber\day །\tibetannumber\month །\tibetannumber\year}%
+ % this is more litterate, but longer
+ %\def\today{སྤྱི་ལོ་\tibetannumber\year ་སྤྱི་\tibetan@month{}་ད་རེས་\tibetan@daynum{}།}%
+}
+
+\def\tibetandigits#1{\expandafter\@tibetan@digits #1@}
+\def\@tibetan@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\@tibetan@digits
+ \fi
+}
+
+\def\tibetannumber#1{%
+ \if@tibetan@numerals
+ \tibetandigits{\number#1}%
+ %%{\protect\addfontfeature{Mapping=tibetandigits}\protect\number#1}
+ \else
+ \number#1%
+ %%{\protect\reset@font\number#1}
+ \fi}
+
+\def\@tibetanalph#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}{@tibetanalph}\fi}
+\def\tibetanAlph#1{\expandafter\@tibetanAlph\csname c@#1\endcsname}
+\def\@tibetanAlph#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}{@tibetanalph}\fi}
+
+\def\tibetan@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \if@tibetan@numerals
+ \let\@alph\@tibetanalph%
+ \let\@Alph\@tibetanAlph%
+ \fi
+}
+\def\notibetan@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+
+\def\tibetan@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\tibetannumber%
+ \renewcommand{\thefootnote}{\protect\tibetannumber{\c@footnote}}%
+}
+\def\notibetan@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+}
+
+% copied from Thai, not tested
+
+\def\blockextras@tibetan{%
+ \let\orig@baselinestrech\baselinestretch%
+ \renewcommand{\baselinestretch}{1.2}%
+}
+\def\noblockextras@tibetan{%
+ \let\baselinestrech\orig@baselinestretch%
+}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-tibetan.ldf>
%<*gloss-turkish.ldf>
% \fi
% \clearpage
@@ -9575,6 +8033,311 @@ U+0039 <> U+0E59 ;
% \end{macrocode}
% \iffalse
%</thaidigits.map>
+%<*polyglossia-frpt.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-frpt.lua}
+% \begin{macrocode}
+require('polyglossia') -- just in case...
+
+local add_to_callback = luatexbase.add_to_callback
+local remove_from_callback = luatexbase.remove_from_callback
+local priority_in_callback = luatexbase.priority_in_callback
+
+local next, type = next, type
+
+local nodes, fonts, node = nodes, fonts, node
+
+local insert_node_before = node.insert_before
+local insert_node_after = node.insert_after
+local remove_node = nodes.remove
+local end_of_math = node.end_of_math
+local has_attribute = node.has_attribute
+
+-- node types as of April 2013
+local glue_code = 10
+local glue_spec_code= 47
+local glyph_code = 37
+local penalty_code = 12
+local kern_code = 11
+
+-- we make a new node, so that we can copy it later on
+local penalty_node = node.new(penalty_code)
+penalty_node.penalty = 10000
+
+local function get_penalty_node()
+ return node.copy(penalty_node)
+end
+
+-- same for glue node
+local glue_node = node.new(glue_code)
+glue_node.spec = node.new(glue_spec_code)
+
+local function get_glue_node(dim)
+ local n = node.copy(glue_node)
+ n.spec.width = dim
+ return n
+end
+
+-- we have here all possible space characters, referenced by their
+-- unicode slot number, taken from char-def.lua
+local space_chars = {[20]=1, [160]=1, [5760]=1, [6158]=1, [8192]=1, [8193]=1, [8194]=1, [8195]=1,
+ [8196]=1, [8197]=1, [8198]=1, [8199]=1, [8200]=1, [8201]=1, [8202]=1, [8239]=1, [8287]=1, [12288]=1}
+
+-- from nodes-tst.lua, adapted
+local function somespace(n,all)
+ if n then
+ local id = n.id
+ if id == glue_code then
+ return (all or (n.spec.width ~= 0)) and glue_code
+ elseif id == kern_code then
+ return (all or (n.kern ~= 0)) and kern_code
+ elseif id == glyph_code then
+ if space_chars[n.char] then
+ return true
+ else
+ return false
+ end
+ end
+ end
+ return false
+end
+
+-- idem
+local function somepenalty(n,value)
+ if n then
+ local id = n.id
+ if id == penalty_code then
+ if value then
+ return n.penalty == value
+ else
+ return true
+ end
+ end
+ end
+ return false
+end
+
+local xpgfrptattr = luatexbase.attributes['xpg@frpt']
+
+local left=1
+local right=2
+local byte = unicode.utf8.byte
+
+-- Now there is a good question: how do we now, in lua, what a \thinspace is?
+-- In the LaTeX source (ltspace.dtx) it is defined as:
+-- \def\thinspace{\kern .16667em }. I see no way of seeing if it has been
+-- overriden or not... So we stick to this value.
+local thinspace = 0.16667
+-- thickspace is defined in amsmath.sty as:
+-- \renewcommand{\;}{\mspace+\thickmuskip{.2777em}}. Same problem as above, we
+-- stick to this fixed value.
+local thickspace = 0.2777 -- 5/18
+
+local mappings = {
+ [byte(':')] = {left, thickspace}, --really?
+ [byte('!')] = {left, thinspace},
+ [byte('?')] = {left, thinspace},
+ [byte(';')] = {left, thinspace},
+ [byte('‼')] = {left, thinspace},
+ [byte('⁇')] = {left, thinspace},
+ [byte('⁈')] = {left, thinspace},
+ [byte('⁉')] = {left, thinspace},
+ [byte('»')] = {left, thinspace},
+ [byte('>')] = {left, thinspace},
+ [byte('«')] = {right, thinspace},
+ [byte('‹')] = {right, thinspace},
+ }
+
+local function set_spacings(thinsp, thicksp)
+ for _, m in pairs(mappings) do
+ if m[2] == thinspace then
+ m[2] = thinsp
+ elseif m[2] == thickspace then
+ m[2] = thicksp
+ end
+ end
+ thickspace = thicksp
+ thinspace = thinsp
+end
+
+-- from typo-spa.lua
+local function process(head)
+ local done = false
+ local start = head
+ -- head is always begin of par (whatsit), so we have at least two prev nodes
+ -- penalty followed by glue
+ while start do
+ local id = start.id
+ if id == glyph_code then -- 37 is glyph as of 2013/04
+ local attr = has_attribute(start, xpgfrptattr)
+ if attr and attr > 0 then
+ local char = start.char
+ local map = mappings[char]
+ --node.unset_attribute(start, xpgfrptattr) -- needed?
+ if map then
+ local quad = font.fonts[start.font].parameters.quad -- might be optimized
+ local prev = start.prev
+ if map[1] == left and prev then
+ local prevprev = prev.prev
+ local somespace = somespace(prev,true)
+ -- TODO: there is a question here: do we override a preceding space or not?...
+ if somespace then
+ local somepenalty = somepenalty(prevprev,10000)
+ if somepenalty then
+ head = remove_node(head,prev,true)
+ head = remove_node(head,prevprev,true)
+ else
+ head = remove_node(head,prev,true)
+ end
+ end
+ insert_node_before(head,start,get_penalty_node())
+ insert_node_before(head,start,get_glue_node(map[2]*quad))
+ done = true
+ end
+ local next = start.next
+ if map[1] == right and next then
+ local nextnext = next.next
+
+ local somepenalty = somepenalty(next,10000)
+ if somepenalty then
+ local somespace = somespace(nextnext,true)
+ if somespace then
+ head = remove_node(head,next,true)
+ head = remove_node(head,nextnext,true)
+ end
+ else
+ local somespace = somespace(next,true)
+ if somespace then
+ head = remove_node(head,next,true)
+ end
+ end
+ insert_node_after(head,start,get_glue_node(right*quad))
+ insert_node_after(head,start,get_penalty_node())
+ done = true
+ end
+ end
+ end
+ elseif id == math_code then
+ -- warning: this is a feature of luatex > 0.76
+ start = end_of_math(start) -- weird, can return nil .. no math end?
+ end
+ if start then
+ start = start.next
+ end
+ end
+ return head, done
+end
+
+local callback_name = "pre_linebreak_filter"
+
+local function activate()
+ if not priority_in_callback (callback_name, "xpg-frpt.process") then
+ add_to_callback(callback_name, process, "xpg-frpt.process", 1)
+ end
+end
+
+local function desactivate()
+ if priority_in_callback (callback_name, "xpg-frpt.process") then
+ remove_from_callback(callback_name, "xpg-frpt.process")
+ end
+end
+
+polyglossia.activate_frpt = activate
+polyglossia.desactivate_frpt = desactivate
+polyglossia.set_spacings = set_spacings
+polyglossia.thinspace = thinspace
+polyglossia.thickspace = thickpace
+% \end{macrocode}
+% \iffalse
+%</polyglossia-frpt.lua>
+%<*polyglossia.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia.lua}
+% \begin{macrocode}
+require('luatex-hyphen')
+
+local luatexhyphen = luatexhyphen
+local byte = unicode.utf8.byte
+
+local polyglossia_module = {
+ name = "polyglossia",
+ version = 1.3,
+ date = "2013/05/11",
+ description = "Polyglossia",
+ author = "Elie Roux",
+ copyright = "Elie Roux",
+ license = "CC0"
+}
+
+local error, warning, info, log =
+ luatexbase.provides_module(polyglossia_module)
+
+polyglossia = polyglossia or {}
+local polyglossia = polyglossia
+
+local current_language
+local default_language
+
+local function loadlang(lang, id)
+ if luatexhyphen.lookupname(lang) then
+ luatexhyphen.loadlanguage(lang, id)
+ end
+end
+
+local function select_language(lang, id)
+ loadlang(lang, id)
+ polyglossia.current_language = lang
+end
+
+local function set_default_language(lang, id)
+ polyglossia.default_language = lang
+end
+
+local check_char
+
+if luaotfload and luaotfload.aux and luaotfload.aux.font_has_glyph then
+ local font_has_glyph = luaotfload.aux.font_has_glyph
+ function check_char(chr)
+ local codepoint = tonumber(chr)
+ if not codepoint then codepoint = byte(chr) end
+ if font_has_glyph(font.current(), codepoint) then
+ tex.sprint('1')
+ else
+ tex.sprint('0')
+ end
+ end
+else
+ local ids = fonts.identifiers or fonts.ids or fonts.hashes.identifiers
+ function check_char(chr) -- always in current font
+ local otfdata = ids[font.current()].characters
+ local codepoint = tonumber(chr)
+ if not codepoint then codepoint = byte(chr) end
+ if otfdata and otfdata[codepoint] then
+ tex.print('1')
+ else
+ tex.print('0')
+ end
+ end
+end
+
+local function load_frpt()
+ require('polyglossia-frpt')
+end
+
+polyglossia.loadlang = loadlang
+polyglossia.select_language = select_language
+polyglossia.set_default_language = set_default_language
+polyglossia.current_language = current_language -- doesn't seem to be working well :-(
+polyglossia.default_language = default_language
+polyglossia.check_char = check_char
+polyglossia.load_frpt = load_frpt
+% \end{macrocode}
+% \iffalse
+%</polyglossia.lua>
% \fi
% \clearpage
% \PrintChanges
@@ -9585,14 +8348,16 @@ U+0039 <> U+0E59 ;
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.2.1 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.3 ¦
¦ ¦
- ¦ Modern multilingual typesetting with XeLaTeX ¦
+ ¦ Modern multilingual typesetting ¦
+ ¦ with XeLaTeX and LuaLaTeX ¦
¦ ¦
¦----------------------------------------------¦
-This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 68 different languages.
+This package provides a complete Babel replacement for users of XeLaTeX and
+(at an early stage) LuaLaTeX. This version includes support for 74 different
+languages.
Polyglossia makes it possible to automate the following tasks:
@@ -9614,7 +8379,8 @@ Polyglossia makes it possible to automate the following tasks:
Several features of Babel that do not make sense in the XeTeX world (like font
encodings, shorthands, etc) are not supported. For German however, several
-shorthands do make sense and can be activated with the language option babelshorthands=true.
+shorthands do make sense and can be activated with the language option
+babelshorthands=true.
Polyglossia is distributed in the traditional way with *.dtx and *.ins files,
and also comes with a TDS-conformant ready-to-unpack zip file.
@@ -9635,6 +8401,12 @@ http://github.com/reutenauer/polyglossia/issues
CHANGES
+1.3 (11-05-2013)
+ * Several bugfixes.
+ * Sync with Babel 3.9.
+ * Added support for LuaTeX.
+ * Added support for Tibetan (end of lines are experimental).
+
1.2.0e (28-04-2012)
* Fixed a number of outstanding and not very interesting bugs.
* Added gloss files for Romansh and Friulan, contributed by Claudio
@@ -9787,16 +8559,6 @@ CHANGES
1.0
* Initial release on CTAN
-
-
- ------------------------------
- Arthur Reutenauer, April 2012
- <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
-
- Original author:
- François Charette
- <firmicus ατ gmx δοτ net>
- ------------------------------
%</README>
%<*examples.tex>
\documentclass[a4paper]{article}
@@ -9812,15 +8574,15 @@ CHANGES
\setotherlanguage[spelling=new,latesthyphen=true,babelshorthands=true]{german}
\setotherlanguages{latin,russian,turkish,polish,latvian,sanskrit,ukrainian,farsi,syriac,divehi,hebrew,amharic}
\setotherlanguage[calendar=gregorian,numerals=western]{urdu}
-\setromanfont{Linux Libertine O}
-\defaultfontfeatures{Scale=MatchLowercase,RawFeature={+locl}}
+\setmainfont{Linux Libertine O}
+\defaultfontfeatures{Scale=MatchLowercase}
\setmonofont{Inconsolata}
-\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}%
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem}
-\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
+\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}
\newfontfamily\sanskritfont[Script=Devanagari]{Sanskrit 2003}
-\newfontfamily\thaifont[Script=Thai]{Norasi}%{Arial Unicode MS}
-\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{TITUS Cyberbit Basic}%this font does not have OT script tags, but it still seems to work
+\newfontfamily\thaifont[Script=Thai]{Norasi}
+\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{FreeSerif}
\newfontfamily\ethiopicfont[Script=Ethiopic]{Abyssinica SIL}
\parskip 1.33\baselineskip
%\newcommand\showhyphmin{\fbox{\the\lefthyphenmin\ \the\righthyphenmin}}
@@ -9941,9 +8703,9 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
\documentclass[a4paper]{book}%
\usepackage[no-math]{fontspec}
\usepackage{xltxtra,url,amsmath}
-\setromanfont{Linux Libertine O}
+\setmainfont{Linux Libertine O}
\defaultfontfeatures{Scale=MatchLowercase}
-\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Scheherazade}%
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}%
\newfontfamily\arabicfonttt[Script=Arabic,Scale=.75]{DejaVu Sans Mono}
\newfontfamily\farsifont[Script=Arabic,Scale=1.1,WordSpace=2]{IranNastaliq}
\usepackage[quiet,nolocalmarks]{polyglossia}
@@ -10052,10 +8814,7 @@ x^\text{مال مال}
\usepackage{polyglossia}
\setdefaultlanguage[numerals=thai]{thai}
\setotherlanguage{english}
-\setromanfont{Norasi}
-\defaultfontfeatures{Scale=MatchLowercase}
-\setmonofont{Inconsolata}
-\setsansfont{Lucida Sans Unicode}
+\setmainfont{Norasi}
\begin{document}
\begin{center}
\abstractname
@@ -10112,9 +8871,9 @@ This is today: \today
% \typeout{*************************************************************}
% \typeout{*}
% \typeout{* To finish the installation you have to move the following}
-% \typeout{* file into a directory searched by XeTeX:}
+% \typeout{* file into a directory searched by TeX:}
% \typeout{*}
-% \typeout{* \space\space\space all *.sty, *.def and *.ldf files}
+% \typeout{* \space\space\space all *.sty, *.lua, *.def and *.ldf files}
% \typeout{*}
% \typeout{* You also need to compile the *.map files with teckit_compile}
% \typeout{* and place the resulting *.tec files under}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/arabicnumbers.sty b/Master/texmf-dist/tex/latex/polyglossia/arabicnumbers.sty
index c45aa22a654..c45aa22a654 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/arabicnumbers.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/arabicnumbers.sty
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/babel-hebrewalph.def b/Master/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def
index 3158d7c7a35..3158d7c7a35 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/babel-hebrewalph.def
+++ b/Master/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def
diff --git a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def
new file mode 100644
index 00000000000..a03d7950aaa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def
@@ -0,0 +1,462 @@
+\ifx\initiate@active@char\@undefined
+\else
+ \bbl@afterfi\endinput
+\fi
+\ProvidesFile{babelsh.def}
+ [2013/04/30 %
+ Babel common definitions for shorthands^^J
+ Taken verbatim from babel.def (2013/04/15 v3.9e)]
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: from babel.sty
+%
+% ------------------------------------------------------------------------------
+%
+ \def\bbl@ifshorthand#1{%
+ \@expandtwoargs\in@{\string#1}{\bbl@opt@shorthands}%
+ \ifin@
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\let\bbl@opt@shorthands\@nnil
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: from switch.def
+%
+% ------------------------------------------------------------------------------
+%
+\ifx\PackageError\@undefined
+ \def\bbl@error#1#2{%
+ \begingroup
+ \newlinechar=`\^^J
+ \def\\{^^J(babel) }%
+ \errhelp{#2}\errmessage{\\#1}%
+ \endgroup}
+ \def\bbl@warning#1{%
+ \begingroup
+ \newlinechar=`\^^J
+ \def\\{^^J(polyglossia) }%
+ \message{\\#1}%
+ \endgroup}
+ \def\bbl@info#1{%
+ \begingroup
+ \newlinechar=`\^^J
+ \def\\{^^J}%
+ \wlog{#1}%
+ \endgroup}
+\else
+ \def\bbl@error#1#2{%
+ \begingroup
+ \def\\{\MessageBreak}%
+ \PackageError{polyglossia}{#1}{#2}%
+ \endgroup}
+ \def\bbl@warning#1{%
+ \begingroup
+ \def\\{\MessageBreak}%
+ \PackageWarning{polyglossia}{#1}%
+ \endgroup}
+ \def\bbl@info#1{%
+ \begingroup
+ \def\\{\MessageBreak}%
+ \PackageInfo{polyglossia}{#1}%
+ \endgroup}
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@for#1#2#3{\@for#1:=#2\do{\ifx#1\@empty\else#3\fi}}
+\def\bbl@add#1#2{%
+ \@ifundefined{\expandafter\@gobble\string#1}%
+ {\def#1{#2}}%
+ {\expandafter\def\expandafter#1\expandafter{#1#2}}}
+\long\def\bbl@afterelse#1\else#2\fi{\fi#1}
+\long\def\bbl@afterfi#1\fi{\fi#1}
+\def\bbl@csarg#1#2{\expandafter#1\csname bbl@#2\endcsname}%
+\def\bbl@withactive#1#2{%
+ \begingroup
+ \lccode`~=`#2\relax
+ \lowercase{\endgroup#1~}}
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: a bit further in babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@add@special#1{%
+ \begingroup
+ \def\do{\noexpand\do\noexpand}%
+ \def\@makeother{\noexpand\@makeother\noexpand}%
+ \edef\x{\endgroup
+ \def\noexpand\dospecials{\dospecials\do#1}%
+ \expandafter\ifx\csname @sanitize\endcsname\relax \else
+ \def\noexpand\@sanitize{\@sanitize\@makeother#1}%
+ \fi}%
+ \x}
+\def\bbl@remove@special#1{%
+ \begingroup
+ \def\x##1##2{\ifnum`#1=`##2\noexpand\@empty
+ \else\noexpand##1\noexpand##2\fi}%
+ \def\do{\x\do}%
+ \def\@makeother{\x\@makeother}%
+ \edef\x{\endgroup
+ \def\noexpand\dospecials{\dospecials}%
+ \expandafter\ifx\csname @sanitize\endcsname\relax \else
+ \def\noexpand\@sanitize{\@sanitize}%
+ \fi}%
+ \x}
+\def\bbl@active@def#1#2#3#4{%
+ \@namedef{#3#1}{%
+ \expandafter\ifx\csname#2@sh@#1@\endcsname\relax
+ \bbl@afterelse\bbl@sh@select#2#1{#3@arg#1}{#4#1}%
+ \else
+ \bbl@afterfi\csname#2@sh@#1@\endcsname
+ \fi}%
+ \long\@namedef{#3@arg#1}##1{%
+ \expandafter\ifx\csname#2@sh@#1@\string##1@\endcsname\relax
+ \bbl@afterelse\csname#4#1\endcsname##1%
+ \else
+ \bbl@afterfi\csname#2@sh@#1@\string##1@\endcsname
+ \fi}}%
+\def\initiate@active@char#1{%
+ \expandafter\ifx\csname active@char\string#1\endcsname\relax
+ \bbl@withactive
+ {\expandafter\@initiate@active@char\expandafter}#1\string#1#1%
+ \fi}
+\def\@initiate@active@char#1#2#3{%
+ \expandafter\edef\csname bbl@oricat@#2\endcsname{%
+ \catcode`#2=\the\catcode`#2\relax}%
+ \ifx#1\@undefined
+ \expandafter\edef\csname bbl@oridef@#2\endcsname{%
+ \let\noexpand#1\noexpand\@undefined}%
+ \else
+ \expandafter\let\csname bbl@oridef@@#2\endcsname#1%
+ \expandafter\edef\csname bbl@oridef@#2\endcsname{%
+ \let\noexpand#1%
+ \expandafter\noexpand\csname bbl@oridef@@#2\endcsname}%
+ \fi
+ \ifx#1#3\relax
+ \expandafter\let\csname normal@char#2\endcsname#3%
+ \else
+ \bbl@info{Making #2 an active character}%
+ \ifnum\mathcode`#2="8000
+ \@namedef{normal@char#2}{%
+ \textormath{#3}{\csname bbl@oridef@@#2\endcsname}}%
+ \else
+ \@namedef{normal@char#2}{#3}%
+ \fi
+ \bbl@restoreactive{#2}%
+ \AtBeginDocument{%
+ \catcode`#2\active
+ \if@filesw
+ \immediate\write\@mainaux{\catcode`\string#2\active}%
+ \fi}%
+ \expandafter\bbl@add@special\csname#2\endcsname
+ \catcode`#2\active
+ \fi
+ \let\bbl@tempa\@firstoftwo
+ \if\string^#2%
+ \def\bbl@tempa{\noexpand\textormath}%
+ \else
+ \ifx\bbl@mathnormal\@undefined\else
+ \let\bbl@tempa\bbl@mathnormal
+ \fi
+ \fi
+ \expandafter\edef\csname active@char#2\endcsname{%
+ \bbl@tempa
+ {\noexpand\if@safe@actives
+ \noexpand\expandafter
+ \expandafter\noexpand\csname normal@char#2\endcsname
+ \noexpand\else
+ \noexpand\expandafter
+ \expandafter\noexpand\csname user@active#2\endcsname
+ \noexpand\fi}%
+ {\expandafter\noexpand\csname normal@char#2\endcsname}}%
+ \bbl@csarg\edef{active@#2}{%
+ \noexpand\active@prefix\noexpand#1%
+ \expandafter\noexpand\csname active@char#2\endcsname}%
+ \bbl@csarg\edef{normal@#2}{%
+ \noexpand\active@prefix\noexpand#1%
+ \expandafter\noexpand\csname normal@char#2\endcsname}%
+ \expandafter\let\expandafter#1\csname bbl@normal@#2\endcsname
+ \bbl@active@def#2\user@group{user@active}{language@active}%
+ \bbl@active@def#2\language@group{language@active}{system@active}%
+ \bbl@active@def#2\system@group{system@active}{normal@char}%
+ \expandafter\edef\csname\user@group @sh@#2@@\endcsname
+ {\expandafter\noexpand\csname normal@char#2\endcsname}%
+ \expandafter\edef\csname\user@group @sh@#2@\string\protect@\endcsname
+ {\expandafter\noexpand\csname user@active#2\endcsname}%
+ \if\string'#2%
+ \let\prim@s\bbl@prim@s
+ \let\active@math@prime#1%
+ \fi}
+\@ifpackagewith{babel}{KeepShorthandsActive}%
+ {\let\bbl@restoreactive\@gobble}%
+ {\def\bbl@restoreactive#1{%
+ \edef\bbl@tempa{%
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: WARNING: this has been commented in babelsh.def
+%
+% ------------------------------------------------------------------------------
+%
+% \noexpand\AfterBabelLanguage\noexpand\CurrentOption
+% {\catcode`#1=\the\catcode`#1\relax}%
+ \noexpand\AtEndOfPackage{\catcode`#1=\the\catcode`#1\relax}}%
+ \bbl@tempa}%
+ \AtEndOfPackage{\let\bbl@restoreactive\@gobble}}
+\def\bbl@sh@select#1#2{%
+ \expandafter\ifx\csname#1@sh@#2@sel\endcsname\relax
+ \bbl@afterelse\bbl@scndcs
+ \else
+ \bbl@afterfi\csname#1@sh@#2@sel\endcsname
+ \fi}
+\def\active@prefix#1{%
+ \ifx\protect\@typeset@protect
+ \else
+ \ifx\protect\@unexpandable@protect
+ \noexpand#1%
+ \else
+ \protect#1%
+ \fi
+ \expandafter\@gobble
+ \fi}
+\newif\if@safe@actives
+\@safe@activesfalse
+\def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi}
+\def\bbl@activate#1{%
+ \bbl@withactive{\expandafter\let\expandafter}#1%
+ \csname bbl@active@\string#1\endcsname}
+\def\bbl@deactivate#1{%
+ \bbl@withactive{\expandafter\let\expandafter}#1%
+ \csname bbl@normal@\string#1\endcsname}
+\def\bbl@firstcs#1#2{\csname#1\endcsname}
+\def\bbl@scndcs#1#2{\csname#2\endcsname}
+\def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil}
+\def\@decl@short#1#2#3\@nil#4{%
+ \def\bbl@tempa{#3}%
+ \ifx\bbl@tempa\@empty
+ \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@scndcs
+ \@ifundefined{#1@sh@\string#2@}{}%
+ {\def\bbl@tempa{#4}%
+ \expandafter\ifx\csname#1@sh@\string#2@\endcsname\bbl@tempa
+ \else
+ \bbl@info
+ {Redefining #1 shorthand \string#2\\%
+ in language \CurrentOption}%
+ \fi}%
+ \@namedef{#1@sh@\string#2@}{#4}%
+ \else
+ \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@firstcs
+ \@ifundefined{#1@sh@\string#2@\string#3@}{}%
+ {\def\bbl@tempa{#4}%
+ \expandafter\ifx\csname#1@sh@\string#2@\string#3@\endcsname\bbl@tempa
+ \else
+ \bbl@info
+ {Redefining #1 shorthand \string#2\string#3\\%
+ in language \CurrentOption}%
+ \fi}%
+ \@namedef{#1@sh@\string#2@\string#3@}{#4}%
+ \fi}
+\def\textormath{%
+ \ifmmode
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\def\user@group{user}
+\def\language@group{english}
+\def\system@group{system}
+\def\useshorthands{%
+ \@ifstar\bbl@usesh@s{\bbl@usesh@x{}}}
+\def\bbl@usesh@s#1{%
+ \bbl@usesh@x
+ {\AddBabelHook{babel-sh-\string#1}{afterextras}{\bbl@activate{#1}}}%
+ {#1}}
+\def\bbl@usesh@x#1#2{%
+ \bbl@ifshorthand{#2}%
+ {\def\user@group{user}%
+ \initiate@active@char{#2}%
+ #1%
+ \bbl@activate{#2}}%
+ {\bbl@error
+ {Cannot declare a shorthand turned off (\string#2)}
+ {Sorry, but you cannot use shorthands which have been\\%
+ turned off in the package options}}}
+\def\user@language@group{user@\language@group}
+\def\bbl@set@user@generic#1#2{%
+ \@ifundefined{user@generic@active#1}%
+ {\bbl@active@def#1\user@language@group{user@active}{user@generic@active}%
+ \bbl@active@def#1\user@group{user@generic@active}{language@active}%
+ \expandafter\edef\csname#2@sh@#1@@\endcsname{%
+ \expandafter\noexpand\csname normal@char#1\endcsname}%
+ \expandafter\edef\csname#2@sh@#1@\string\protect@\endcsname{%
+ \expandafter\noexpand\csname user@active#1\endcsname}}%
+ \@empty}
+\newcommand\defineshorthand[3][user]{%
+ \edef\bbl@tempa{\zap@space#1 \@empty}%
+ \bbl@for\bbl@tempb\bbl@tempa{%
+ \if*\expandafter\@car\bbl@tempb\@nil
+ \edef\bbl@tempb{user@\expandafter\@gobble\bbl@tempb}%
+ \@expandtwoargs
+ \bbl@set@user@generic{\expandafter\string\@car#2\@nil}\bbl@tempb
+ \fi
+ \declare@shorthand{\bbl@tempb}{#2}{#3}}}
+\def\languageshorthands#1{\def\language@group{#1}}
+\def\aliasshorthand#1#2{%
+ \bbl@ifshorthand{#2}%
+ {\expandafter\ifx\csname active@char\string#2\endcsname\relax
+ \ifx\document\@notprerr
+ \@notshorthand{#2}%
+ \else
+ \initiate@active@char{#2}%
+ \expandafter\let\csname active@char\string#2\expandafter\endcsname
+ \csname active@char\string#1\endcsname
+ \expandafter\let\csname normal@char\string#2\expandafter\endcsname
+ \csname normal@char\string#1\endcsname
+ \bbl@activate{#2}%
+ \fi
+ \fi}%
+ {\bbl@error
+ {Cannot declare a shorthand turned off (\string#2)}
+ {Sorry, but you cannot use shorthands which have been\\%
+ turned off in the package options}}}
+\def\@notshorthand#1{%
+ \bbl@error{%
+ The character `\string #1' should be made a shorthand character;\\%
+ add the command \string\useshorthands\string{#1\string} to
+ the preamble.\\%
+ I will ignore your instruction}{}}
+\newcommand*\shorthandon[1]{\bbl@switch@sh\@ne#1\@nnil}
+\DeclareRobustCommand*\shorthandoff{%
+ \@ifstar{\bbl@shorthandoff\tw@}{\bbl@shorthandoff\z@}}
+\def\bbl@shorthandoff#1#2{\bbl@switch@sh#1#2\@nnil}
+\def\bbl@switch@sh#1#2{%
+ \ifx#2\@nnil\else
+ \@ifundefined{bbl@active@\string#2}%
+ {\bbl@error
+ {I cannot switch `\string#2' on or off--not a shorthand}%
+ {This character is not a shorthand. Maybe you made\\%
+ a typing mistake? I will ignore your instruction}}%
+ {\ifcase#1%
+ \catcode`#212\relax
+ \or
+ \catcode`#2\active
+ \or
+ \csname bbl@oricat@\string#2\endcsname
+ \csname bbl@oridef@\string#2\endcsname
+ \fi}%
+ \bbl@afterfi\bbl@switch@sh#1%
+ \fi}
+\def\babelshorthand{\active@prefix\babelshorthand\bbl@putsh}
+\def\bbl@putsh#1{%
+ \@ifundefined{bbl@active@\string#1}%
+ {\bbl@putsh@i#1\@empty\@nnil}%
+ {\csname bbl@active@\string#1\endcsname}}
+\def\bbl@putsh@i#1#2\@nnil{%
+ \csname\languagename @sh@\string#1@%
+ \ifx\@empty#2\else\string#2@\fi\endcsname}
+\ifx\bbl@opt@shorthands\@nnil\else
+ \let\bbl@s@initiate@active@char\initiate@active@char
+ \def\initiate@active@char#1{%
+ \bbl@ifshorthand{#1}{\bbl@s@initiate@active@char{#1}}{}}
+ \let\bbl@s@switch@sh\bbl@switch@sh
+ \def\bbl@switch@sh#1#2{%
+ \ifx#2\@nnil\else
+ \bbl@afterfi
+ \bbl@ifshorthand{#2}{\bbl@s@switch@sh#1{#2}}{\bbl@switch@sh#1}%
+ \fi}
+ \let\bbl@s@activate\bbl@activate
+ \def\bbl@activate#1{%
+ \bbl@ifshorthand{#1}{\bbl@s@activate{#1}}{}}
+ \let\bbl@s@deactivate\bbl@deactivate
+ \def\bbl@deactivate#1{%
+ \bbl@ifshorthand{#1}{\bbl@s@deactivate{#1}}{}}
+\fi
+\def\bbl@prim@s{%
+ \prime\futurelet\@let@token\bbl@pr@m@s}
+\def\bbl@if@primes#1#2{%
+ \ifx#1\@let@token
+ \expandafter\@firstoftwo
+ \else\ifx#2\@let@token
+ \bbl@afterelse\expandafter\@firstoftwo
+ \else
+ \bbl@afterfi\expandafter\@secondoftwo
+ \fi\fi}
+\begingroup
+ \catcode`\^=7 \catcode`\*=\active \lccode`\*=`\^
+ \catcode`\'=12 \catcode`\"=\active \lccode`\"=`\'
+ \lowercase{%
+ \gdef\bbl@pr@m@s{%
+ \bbl@if@primes"'%
+ \pr@@@s
+ {\bbl@if@primes*^\pr@@@t\egroup}}}
+\endgroup
+\initiate@active@char{~}
+\declare@shorthand{system}{~}{\leavevmode\nobreak\ }
+\bbl@activate{~}
+\def\bbl@disc#1#2{\nobreak\discretionary{#2-}{}{#1}\bbl@allowhyphens}
+\def\bbl@t@one{T1}
+\def\bbl@allowhyphens{\nobreak\hskip\z@skip}
+\def\bbl@t@one{T1}
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: later in babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\allowhyphens{\ifx\cf@encoding\bbl@t@one\else\bbl@allowhyphens\fi}
+\newcommand\babelnullhyphen{\char\hyphenchar\font}
+\def\babelhyphen{\active@prefix\babelhyphen\bbl@hyphen}
+\def\bbl@hyphen{%
+ \@ifstar{\bbl@hyphen@i @}{\bbl@hyphen@i\@empty}}
+\def\bbl@hyphen@i#1#2{%
+ \@ifundefined{bbl@hy@#1#2\@empty}%
+ {\csname bbl@#1usehyphen\endcsname{\discretionary{#2}{}{#2}}}%
+ {\csname bbl@hy@#1#2\@empty\endcsname}}
+\def\bbl@usehyphen#1{%
+ \leavevmode
+ \ifdim\lastskip>\z@\mbox{#1}\nobreak\else\nobreak#1\fi
+ \hskip\z@skip}
+\def\bbl@@usehyphen#1{%
+ \leavevmode\ifdim\lastskip>\z@\mbox{#1}\else#1\fi}
+\def\bbl@hyphenchar{%
+ \ifnum\hyphenchar\font=\m@ne
+ \babelnullhyphen
+ \else
+ \char\hyphenchar\font
+ \fi}
+\def\bbl@hy@soft{\bbl@usehyphen{\discretionary{\bbl@hyphenchar}{}{}}}
+\def\bbl@hy@@soft{\bbl@@usehyphen{\discretionary{\bbl@hyphenchar}{}{}}}
+\def\bbl@hy@hard{\bbl@usehyphen\bbl@hyphenchar}
+\def\bbl@hy@@hard{\bbl@@usehyphen\bbl@hyphenchar}
+\def\bbl@hy@nobreak{\bbl@usehyphen{\mbox{\bbl@hyphenchar}\nobreak}}
+\def\bbl@hy@@nobreak{\mbox{\bbl@hyphenchar}}
+\def\bbl@hy@repeat{%
+ \bbl@usehyphen{%
+ \discretionary{\bbl@hyphenchar}{\bbl@hyphenchar}{\bbl@hyphenchar}%
+ \nobreak}}
+\def\bbl@hy@@repeat{%
+ \bbl@@usehyphen{%
+ \discretionary{\bbl@hyphenchar}{\bbl@hyphenchar}{\bbl@hyphenchar}}}
+\def\bbl@hy@empty{\hskip\z@skip}
+\def\bbl@hy@@empty{\discretionary{}{}{}}
+\def\bbl@disc#1#2{\nobreak\discretionary{#2-}{}{#1}\bbl@allowhyphens}
+%
+% ------------------------------------------------------------------------------
+%
+% XXX: end of the code copied from babel files
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@disc@german#1#2{%
+ \nobreak\discretionary{#2-}{}{#1}}
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def b/Master/texmf-dist/tex/latex/polyglossia/cal-util.def
index 85576f39f71..85576f39f71 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/cal-util.def
+++ b/Master/texmf-dist/tex/latex/polyglossia/cal-util.def
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/devanagaridigits.sty b/Master/texmf-dist/tex/latex/polyglossia/devanagaridigits.sty
index bbd83f2314c..bbd83f2314c 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/devanagaridigits.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/devanagaridigits.sty
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty b/Master/texmf-dist/tex/latex/polyglossia/farsical.sty
index b78d29809c3..b78d29809c3 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/farsical.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/farsical.sty
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
index dcafbad943b..dcafbad943b 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-albanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
index 9a33de9fb90..9a33de9fb90 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-amharic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf
index 9ffc71b16ef..9ffc71b16ef 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-arabic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-armenian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
index 2f22748e713..2f22748e713 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-armenian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-asturian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf
index b1eb5089331..b1eb5089331 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-asturian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-asturian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasai.ldf
index 28dc408a4ea..28dc408a4ea 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasai.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasai.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasam.ldf
index eb5c3749c85..eb5c3749c85 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bahasam.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bahasam.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf
index c6c1d3d1b92..c6c1d3d1b92 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-basque.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-basque.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bengali.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
index c27a65ba8f4..c27a65ba8f4 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bengali.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-brazil.ldf
index 3079e0778d3..3079e0778d3 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-brazil.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-brazil.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf
index 21ab4a12da8..21ab4a12da8 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-breton.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf
index 4739d9916bf..4739d9916bf 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-bulgarian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bulgarian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
index 8d349c9bcda..feba1f98128 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-catalan.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
@@ -21,15 +21,32 @@
%%% 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{\ifnum\XeTeXcharglyph"00B7 > 0\hbox{\char"00B7}%
- \else\raise\raiselldim\hbox{.}\fi}
+\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 %
+ }
\def\lgem{%
\ifmmode
\csname normal@char\string"\endcsname l%
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
\setbox0\hbox{l}\setbox1\hbox{l\/}%
- \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}\else\setbox2\hbox{.}\fi
+ \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 %
\advance\raiselldim by \the\fontdimen5\the\font
\advance\raiselldim by -\ht2%
\leftllkern=-.25\wd0%
@@ -49,7 +66,15 @@
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
\setbox0\hbox{L}\setbox1\hbox{L\/}%
- \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}\else\setbox2\hbox{.}\fi
+ \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 %
\advance\raiselldim by .5\ht0%
\advance\raiselldim by -.5\ht2%
\leftllkern=-.125\wd0%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf
index 76a4fb151a5..76a4fb151a5 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-coptic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-coptic.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
index c43775077a4..c43775077a4 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-croatian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf
index 8704aa043be..8704aa043be 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-czech.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-czech.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf
index 282ea8277f6..282ea8277f6 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-danish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-danish.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf
index bbf0bb50a2a..bbf0bb50a2a 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-divehi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-divehi.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf
index 2633956a9d8..2633956a9d8 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-dutch.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-dutch.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
index f10c7197748..f10c7197748 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf
index e3bc8d31ac4..e3bc8d31ac4 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-esperanto.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-esperanto.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf
index e84aa304712..e84aa304712 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-estonian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-estonian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-farsi.ldf
index d3aeeb2922d..d3aeeb2922d 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-farsi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-farsi.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf
index 6b271e531d9..6b271e531d9 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-finnish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
new file mode 100644
index 00000000000..47476760ae0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
@@ -0,0 +1,140 @@
+\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]
+
+\PolyglossiaSetup{french}{%
+ language=French,
+ script=Latin,
+ hyphennames={french,francais},
+ frenchspacing=true,
+ indentfirst=true,
+ hyphenmins={2,2},
+ fontsetup=true}
+
+\ifluatex
+ \newluatexattribute\xpg@frpt %
+ \directlua{polyglossia.load_frpt()}%
+ \global\newcount\xpg@interchartokenstate %
+\else
+ \newXeTeXintercharclass\french@punctthin % ! ? ; et autres
+ \newXeTeXintercharclass\french@punctthick % :
+ \newXeTeXintercharclass\french@punctguillstart % « ‹
+ \newXeTeXintercharclass\french@punctguillend % » ›
+\fi
+
+\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
+\def\xpg@nospace#1{#1}
+
+\def\french@punctuation{%
+ \lccode"2019="2019
+ \ifluatex
+ \global\xpg@frpt=1\relax %
+ \directlua{polyglossia.activate_frpt()}%
+ \else
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\! \french@punctthin
+ \XeTeXcharclass `\? \french@punctthin
+ \XeTeXcharclass `\‼ \french@punctthin
+ \XeTeXcharclass `\⁇ \french@punctthin
+ \XeTeXcharclass `\⁈ \french@punctthin
+ \XeTeXcharclass `\⁉ \french@punctthin
+ \XeTeXcharclass `\; \french@punctthin
+ \XeTeXcharclass `\: \french@punctthick
+ \XeTeXcharclass `\« \french@punctguillstart
+ \XeTeXcharclass `\» \french@punctguillend
+ \XeTeXcharclass `\‹ \french@punctguillstart
+ \XeTeXcharclass `\› \french@punctguillend
+ \XeTeXinterchartoks \z@ \french@punctthin = {\nobreak\thinspace}%
+ \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
+ \XeTeXinterchartoks 255 \french@punctthin = {\xpg@unskip\nobreak\thinspace}%
+ \XeTeXinterchartoks 255 \french@punctthick = {\xpg@unskip\nobreakspace}%
+ \XeTeXinterchartoks \french@punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
+ % \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
+ % \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
+ \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »"
+ \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~"
+ \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»"
+ \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
+ \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
+ \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\nobreakspace}% "?»" -> "? »"
+ \fi
+ }
+
+\def\nofrench@punctuation{%
+ \lccode"2019=\z@
+ \ifluatex
+ \global\xpg@frpt=0\relax %
+ % Though it would make compilation slightly faster, it is not possible to
+ % safely uncomment the following line. Imagine the following case: you start
+ % a paragraph by some french text, then, in the same paragraph, you change
+ % the language to something else, and thus call the following line. This means
+ % that, at then end of the paragraph, the function won't be in the callback,
+ % so the beginning of the paragraph won't be processed by it.
+ %\directlua{polyglossia.desactivate_frpt()}
+ \else
+ \XeTeXcharclass `\! \z@
+ \XeTeXcharclass `\? \z@
+ \XeTeXcharclass `\‼ \z@
+ \XeTeXcharclass `\⁇ \z@
+ \XeTeXcharclass `\⁈ \z@
+ \XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\; \z@
+ \XeTeXcharclass `\: \z@
+ \XeTeXcharclass `\« \z@
+ \XeTeXcharclass `\» \z@
+ \XeTeXcharclass `\‹ \z@
+ \XeTeXcharclass `\› \z@
+ \XeTeXinterchartokenstate=0
+ \fi
+ }
+
+\def\captionsfrench{%
+ \def\refname{Références}%
+ \def\abstractname{Résumé}%
+ \def\bibname{Bibliographie}%
+ \def\prefacename{Préface}%
+ \def\chaptername{Chapitre}%
+ \def\appendixname{Annexe}%
+ \def\contentsname{Table des matières}%
+ \def\listfigurename{Table des figures}%
+ \def\listtablename{Liste des tableaux}%
+ \def\indexname{Index}%
+ \def\figurename{\textsc{Fig.}}%
+ \def\tablename{\textsc{Tab.}}%
+ \def\@Fpt{\ifcase\value{part}\or Première\or Deuxième\or
+ Troisième\or Quatrième\or Cinquième\or Sixième\or
+ Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or
+ Douzième\or Treizième\or Quatorzième\or Quinzième\or
+ Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or
+ Vingtième\fi\space}%
+ \def\thepart{}%
+ \def\partname{\protect\@Fpt partie}%
+ \def\pagename{page}%
+ \def\seename{\emph{voir}}%
+ \def\alsoname{\emph{voir aussi}}%
+ \def\enclname{P.~J. }%
+ \def\ccname{Copie à }%
+ \def\headtoname{}%
+ \def\proofname{Démonstration}%
+ }
+\def\datefrench{%
+ \def\today{\ifx\ier\undefined\def\ier{er}\fi
+ \ifnum\day=1\relax 1\ier%
+ \else \number\day\fi
+ \space \ifcase\month%
+ \or janvier\or février\or mars\or avril\or mai\or juin\or
+ juillet\or août\or septembre\or octobre\or novembre\or
+ décembre\fi
+ \space \number\year}}
+
+\def\noextras@french{%
+ \nofrench@punctuation%
+ }
+
+\def\blockextras@french{%
+ \french@punctuation%
+ }
+
+\def\inlineextras@french{%
+ \french@punctuation%
+ }
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-friulan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-friulan.ldf
index d0ef8b77daa..a753c04e41f 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-friulan.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-friulan.ldf
@@ -50,9 +50,6 @@
\def\noextras@friulan{%
\lccode\string"2019=\z@
- % TODO Figure out what the two lines below were supposed to be good for.
- % \noitalian@shorthands
- % \xpgit@savedvalues
}
\def\blockextras@friulan{%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf
index 76459f275cd..76459f275cd 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-galician.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-galician.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
index b9a79ee33b2..b9a79ee33b2 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-german.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-greek-new.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek-new.ldf
new file mode 100644
index 00000000000..1b8864cd214
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek-new.ldf
@@ -0,0 +1,410 @@
+\ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek]
+\PolyglossiaSetup{greek}{
+ script=Greek,
+ scripttag=grek,
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+ %TODO localalph={greek@alph,greek@Alph}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The code in this file was initially adapted from the antomega
+%% module for greek. Currently large parts of it derive from the
+%% package xgreek.sty (c) Apostolos Syropoulos
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% this file imported from xgreek fixes the \lccode and \uccode of Greek letters:
+\input{xgreek-fixes.def}
+
+%TODO: set these in \define@key instead:
+\ifx\l@greek\@undefined
+ \ifx\l@polygreek\@undefined
+ \xpg@nopatterns{Greek}%
+ \adddialect\l@greek\l@nohyphenation
+ \else
+ \let\l@greek\l@polygreek
+ \fi
+\fi
+\ifx\l@monogreek\@undefined
+ \xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
+ I will use the patterns loaded for \string\l@greek instead}
+ \adddialect\l@monogreek\l@greek
+\fi
+\ifx\l@ancientgreek\@undefined
+ \xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
+ I will use the patterns loaded for \string\l@greek instead}
+ \adddialect\l@ancientgreek\l@greek
+\fi
+
+%set monotonic as default
+\def\greek@variant{\l@monogreek}% monotonic
+\def\captionsgreek{\monogreekcaptions}%
+\def\dategreek{\datemonogreek}%
+
+\def\tmp@mono{mono}
+\def\tmp@monotonic{monotonic}
+\def\tmp@poly{poly}
+\def\tmp@polytonic{polytonic}
+\def\tmp@ancient{ancient}
+\def\tmp@ancientgreek{ancientgreek}
+
+\define@key{greek}{variant}[monotonic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@poly\def\@tmpa{polytonic}\fi
+ \ifx\@tmpa\tmp@ancientgreek\def\@tmpa{ancient}\fi
+ \ifx\@tmpa\tmp@polytonic%
+ \def\greek@variant{\l@polygreek}%
+ \def\captionsgreek{\polygreekcaptions}%
+ \def\dategreek{\datepolygreek}%
+ \xpg@info{Option: Polytonic Greek}%
+ \else
+ \ifx\@tmpa\tmp@ancient
+ \def\greek@variant{\l@ancientgreek}%
+ \def\captionsgreek{\ancientgreekcaptions}%
+ \def\dategreek{\dateancientgreek}%
+ \xpg@info{Option: Ancient Greek}%
+ \else %monotonic
+ \def\greek@variant{\l@monogreek}% monotonic
+ \def\captionsgreek{\monogreekcaptions}%
+ \def\dategreek{\datemonogreek}%
+ \xpg@info{Option: Monotonic Greek}%
+ \fi
+ \fi}
+
+\def\greek@language{\language=\greek@variant}
+
+\newif\if@greek@numerals
+\define@key{greek}{numerals}[greek]{%
+\ifstrequal{#1}{arabic}{\@greek@numeralsfalse}{\@greek@numeralstrue}}
+
+\define@boolkey{greek}{attic}[true]{\xpg@warning{Greek option `attic' is no longer required.}}
+
+% This sets the defaults
+\setkeys{greek}{numerals}
+
+\def\monogreekcaptions{%
+ \def\refname{Αναφορές}%
+ \def\abstractname{Περίληψη}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\prefacename{Πρόλογος}%
+ \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\datemonogreek{%
+ \def\today{\number\day\space%
+ \greek@month%
+ \space\number\year}%
+ \def\greektoday{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}%
+ \def\Greektoday{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}%
+ \def\greek@month{\ifcase\month\or%
+ Ιανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Απριλίου\or
+ Μαΐου\or
+ Ιουνίου\or
+ Ιουλίου\or
+ Αυγούστου\or
+ Σεπτεμβρίου\or
+ Οκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}%
+
+\def\polygreekcaptions{%
+ \def\refname{Ἀναφορές}%
+ \def\abstractname{Περίληψη}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\prefacename{Πρόλογος}%
+ \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\datepolygreek{%
+ \def\today{\number\day\space%
+ \greek@month%
+ \space\number\year}%
+ \def\greektoday{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}%
+ \def\Greektoday{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}%
+ \def\greek@month{\ifcase\month\or%
+ Ἰανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Ἀπριλίου\or
+ Μαΐου\or
+ Ἰουνίου\or
+ Ἰουλίου\or
+ Αὐγούστου\or
+ Σεπτεμβρίου\or
+ Ὀκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}%
+
+% this is copied verbatim from xgreek.sty:
+\def\ancientgreekcaptions{%
+ \def\prefacename{Προοίμιον}%
+ \def\refname{Αναφοραί}%
+ \def\abstractname{Περίληψις}%
+ \def\bibname{Βιβλιογραφία}%
+ \def\chaptername{Κεφάλαιον}%
+ \def\appendixname{Παράρτημα}%
+ \def\contentsname{Περιεχόμενα}%
+ \def\listfigurename{Κατάλογος σχημάτων}%
+ \def\listtablename{Κατάλογος πινάκων}%
+ \def\indexname{Εὑρετήριον}%
+ \def\figurename{Σχήμα}%
+ \def\tablename{Πίναξ}%
+ \def\partname{Μέρος}%
+ \def\enclname{Συνημμένως}%
+ \def\ccname{Κοινοποίησις}%
+ \def\headtoname{Πρὸς}%
+ \def\pagename{Σελὶς}%
+ \def\seename{ὃρα}%
+ \def\alsoname{ὃρα ὡσαύτως}%
+ \def\proofname{Ἀπόδειξις}%
+ \def\glossaryname{Γλωσσάριον}%
+ \def\refname{Ἀναφοραὶ}%
+ \def\indexname{Εὑρετήριο}%
+ \def\figurename{Σχῆμα}%
+ \def\headtoname{Πρὸς}}%
+
+\def\dateancientgreek{%
+ \def\today{\number\day\space%
+ \greek@month%
+ \space\number\year}%
+ \def\greektoday{\greeknumber\day\space%
+ \greek@month%
+ \space\greeknumber\year}%
+ \def\Greektoday{\Greeknumber\day\space%
+ \greek@month%
+ \space\Greeknumber\year}%
+ \def\greek@month{\ifcase\month\or%
+ Ἰανουαρίου\or
+ Φεβρουαρίου\or
+ Μαρτίου\or
+ Ἀπριλίου\or
+ Μαΐου\or
+ Ἰουνίου\or
+ Ἰουλίου\or
+ Αὐγούστου\or
+ Σεπτεμβρίου\or
+ Ὀκτωβρίου\or
+ Νοεμβρίου\or
+ Δεκεμβρίου\fi}}
+
+% the code for alphabetic numbers and attic numerals
+% is not copied verbatim from xgreek.sty any more
+% it has been proposed by eg9 on issue 36 of the repository
+% see https://github.com/reutenauer/polyglossia/issues/36
+\newrobustcmd\anw@print{}
+\newrobustcmd\anw@false{%
+\renewrobustcmd\anw@print{}}
+\newrobustcmd\anw@true{%
+\renewrobustcmd\anw@print{ʹ}}
+\anw@true
+
+\protected\def\greeknumber#1{\expandafter\@greeknumber\expandafter{\number#1}}
+
+\def\@greeknumber#1{%
+\ifnum#1<\@ne\space\gr@ill@value{#1}%
+\else %
+\ifnum#1<10 \gr@num@i#1%
+\else %
+\ifnum#1<100 \gr@num@ii#1%
+\else %
+\ifnum#1<\@m \gr@num@iii#1%
+\else %
+\ifnum#1<\@M \gr@num@iv#1%
+\else %
+\ifnum#1<100000 \gr@num@v#1%
+\else %
+\ifnum#1<1000000 \gr@num@vi#1%
+\else %
+\space\gr@ill@value{#1}%
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+}
+
+\protected\def\Greeknumber#1{\expandafter\@Greeknumber\expandafter{\number#1}}
+\def\@Greeknumber#1{%
+\ifnum#1<\@ne\space\gr@ill@value{#1}%
+\else %
+\ifnum#1<10 \gr@Num@i#1%
+\else %
+\ifnum#1<100 \gr@Num@ii#1%
+\else %
+\ifnum#1<\@m\gr@Num@iii#1%
+\else %
+\ifnum#1<\@M\gr@Num@iv#1%
+\else %
+\ifnum#1<100000 \gr@Num@v#1%
+\else %
+\ifnum#1<1000000 \gr@Num@vi#1%
+\else %
+\space\gr@ill@value{#1}%
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+\fi %
+}
+
+\let\greeknumeral=\greeknumber
+\let\Greeknumeral=\Greeknumber
+
+\def\gr@num@i#1{%
+\ifcase#1 \or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi %
+\ifnum#1=\z@\else\anw@true\fi\anw@print}
+
+\def\gr@num@ii#1{%
+\ifcase#1 \or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi %
+\ifnum#1=\z@\else\anw@true\fi\gr@num@i}
+
+\def\gr@num@iii#1{%
+\ifcase#1 \or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi %
+\ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii}
+
+\def\gr@num@iv#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or α\or β\or γ\or δ\or ε\or Ϛ\or ζ\or η\or θ\fi %
+\gr@num@iii}
+
+\def\gr@num@v#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or ι\or κ\or λ\or μ\or ν\or ξ\or ο\or π\or ϟ\fi %
+\gr@num@iv}
+
+\def\gr@num@vi#1{%
+͵\ifcase#1 \or ρ\or σ\or τ\or υ\or φ\or χ\or ψ\or ω\or ϡ\fi %
+\gr@num@v}%
+
+\def\gr@Num@i#1{%
+\ifcase#1 \or Α\or Β\or Γ\or Δ\or Ε\or \MakeUppercase{Ϛ}\or Ζ\or Η\or θ\fi %
+\ifnum#1=\z@\else\anw@true\fi\anw@print}
+
+\def\gr@Num@ii#1{%
+\ifcase#1 \or Ι\or Κ\or Λ\or Μ\or Ν\or Ξ\or Ο\or Π\or \MakeUppercase{ϟ}\fi %
+\ifnum#1=\z@\else\anw@true\fi\gr@Num@i}
+
+\def\gr@Num@iii#1{%
+\ifcase#1 \or Ρ\or Σ\or Τ\or Υ\or Φ\or Χ\or Ψ\or Ω\or \MakeUppercase{ϡ}\fi %
+\ifnum#1=\z@\anw@false\else\anw@true\fi\gr@Num@ii}
+
+\def\gr@Num@iv#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or Α\or Β\or Γ\or Δ\or Ε\or \MakeUppercase{Ϛ}\or Ζ\or Η\or θ\fi %
+\gr@Num@iii}
+
+\def\gr@Num@v#1{%
+\ifnum#1=\z@\else ͵\fi %
+\ifcase#1 \or Ι\or Κ\or Λ\or Μ\or Ν\or Ξ\or Ο\or Π\or \MakeUppercase{ϟ}\fi %
+\gr@Num@iv}
+
+\def\gr@Num@vi#1{%
+͵ \ifcase#1 \or Ρ\or Σ\or Τ\or Υ\or Φ\or Χ\or Ψ\or Ω\or \MakeUppercase{ϡ}\fi %
+\gr@Num@v}
+
+\def\gr@ill@value#1{\xpg@warning{Illegal value (#1) for Greek numeral}[$#1$]}
+
+%%%% Attic numerals (no longer optional)
+\newcount\@attic@num
+\DeclareRobustCommand*{\@@atticnum}[1]{%
+ \@attic@num#1\relax
+ \ifnum\@attic@num<\@ne%
+ \space%
+ \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
+ \else\ifnum\@attic@num>249999%
+ \space%
+ \xpg@warning{Illegal value (\the\@attic@num) for acrophonic Attic numeral}%
+ \else
+ \@whilenum\@attic@num>49999\do{%
+ \char"10147\advance\@attic@num-50000}%
+ \@whilenum\@attic@num>9999\do{%
+ M\advance\@attic@num-\@M}%
+ \ifnum\@attic@num>4999%
+ \char"10146\advance\@attic@num-5000%
+ \fi\relax
+ \@whilenum\@attic@num>999\do{%
+ Χ\advance\@attic@num-\@m}%
+ \ifnum\@attic@num>499%
+ \char"10145\advance\@attic@num-500%
+ \fi\relax
+ \@whilenum\@attic@num>99\do{%
+ Η\advance\@attic@num-100}%
+ \ifnum\@attic@num>49%
+ \char"10144\advance\@attic@num-50%
+ \fi\relax
+ \@whilenum\@attic@num>9\do{%
+ Δ\advance\@attic@num by-10}%
+ \@whilenum\@attic@num>4\do{%
+ Π\advance\@attic@num-5}%
+ \ifcase\@attic@num\or Ι\or ΙΙ\or ΙΙΙ\or ΙΙΙΙ\fi%
+ \fi\fi}
+\def\@atticnum#1{%
+ \expandafter\@@atticnum\expandafter{\the#1}}
+\def\atticnumeral#1{%
+ \@attic@num#1\relax
+ \@atticnum{\@attic@num}}
+\let\atticnum=\atticnumeral
+
+\def\greek@numbers{%
+ \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \if@greek@numerals
+ \def\greek@alph##1{\protect\greeknumber{##1}}%
+ \def\greek@Alph##1{\protect\Greeknumber{##1}}%
+ \let\@alph\greek@alph%
+ \let\@Alph\greek@Alph%
+ \fi}
+
+\def\nogreek@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+ \let\greek@alph\@undefined%
+ \let\greek@Alph\@undefined%
+ }
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf
index 229688ef5bc..229688ef5bc 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-greek.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
index 5167833d833..5167833d833 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf
index 6223a494987..6223a494987 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-hindi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hindi.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf
index 2678b4f6129..2678b4f6129 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-icelandic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-icelandic.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf
index 9e4ca395d6a..9e4ca395d6a 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-interlingua.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-interlingua.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-irish.ldf
index 23b0b567c30..23b0b567c30 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-irish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-irish.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf
index 538ed63e18e..78e2d590488 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-italian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-italian.ldf
@@ -100,6 +100,7 @@
%%% ORIGINAL END %%%
%%% CHANGES START %%% by Enrico Gregorio
+\let\xpgit@savedvalues\empty
\AtEndPreamble{% the user or the class might define different values
\edef\xpgit@savedvalues{%
\clubpenalty=\the\clubpenalty\space
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-kannada.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf
index cca3488e646..cca3488e646 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-kannada.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kannada.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lao.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf
index 16e58fc5fa2..16e58fc5fa2 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lao.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lao.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
index 66be7360066..66be7360066 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latin.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf
index 9993cadf4a0..9993cadf4a0 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-latvian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latvian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lithuanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
index f1bc9344610..f1bc9344610 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lithuanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lsorbian.ldf
index 55b58e3b9f0..55b58e3b9f0 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lsorbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lsorbian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf
index 3f6839a932f..3f6839a932f 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-magyar.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-malayalam.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf
index 1630b3c78bf..1630b3c78bf 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-malayalam.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-malayalam.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-marathi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
index a7fd12c7df3..a7fd12c7df3 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-marathi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-norsk.ldf
index 975cd109c7c..975cd109c7c 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-norsk.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-norsk.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-nynorsk.ldf
index 8051d902e16..8051d902e16 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-nynorsk.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-nynorsk.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-occitan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf
index c647aa9000f..c647aa9000f 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-occitan.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-occitan.ldf
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf
new file mode 100644
index 00000000000..797e72a5209
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf
@@ -0,0 +1,115 @@
+% !TEX encoding = UTF-8 Unicode
+\ProvidesFile{gloss-piedmontese.ldf}[2013/02/12 v1.0 polyglossia: module for piedmontese]
+\makeatletter
+\PolyglossiaSetup{piedmontese}{
+ hyphennames={piedmontese},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
+
+
+\define@boolkey{piedmontese}[piedmontese@]{babelshorthands}[true]{}
+
+\ifsystem@babelshorthands
+ \setkeys{piedmontese}{babelshorthands=true}
+\else
+ \setkeys{piedmontese}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+\input{babelsh.def}%
+\initiate@active@char{"}%
+}{}
+
+\def\piedmontese@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{piedmontese}%
+ \declare@shorthand{piedmontese}{"}{%
+ \relax\ifmmode
+ \def\xpgpms@next{''}%
+ \else
+ \def\xpgpms@next{\futurelet\xpgpms@temp\xpgpms@cwm}%
+ \fi
+ \xpgpms@next}%
+}
+
+\def\xpgpms@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip}
+\def\xpgpms@cwm{\let\xpgpms@@next\relax
+\ifcat\noexpand\xpgpms@temp a%
+ \def\xpgpms@@next{\pms@@cwm}%
+\else
+ \ifx\xpgpms@temp/%
+ \def\xpgpms@@next{\bbl@allowhyphens/\bbl@allowhyphens\@gobble}%
+ \else
+ \ifx\xpgpms@temp-%
+ \def\xpgpms@@next{\bbl@allowhyphens-\bbl@allowhyphens\@gobble}%
+ \else
+ \ifx\xpgpms@temp"%
+ \def\xpgpms@@next{``\expandafter\@gobble\string}%
+ \fi
+ \fi
+ \fi
+\xpgpms@@next}
+
+\def\nopiedmontese@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+\@namedef{captions\CurrentOption}{%
+ \def\prefacename{Prefassion}%
+ \def\refname{Riferiment}%
+ \def\abstractname{Somari}%
+ \def\bibname{Bibliografìa}%
+ \def\chaptername{Capìtol}%
+ \def\appendixname{Gionta}%
+ \def\contentsname{Tàula}%
+ \def\listfigurename{Lista dle figure}%
+ \def\listtablename{Lista dle tabele}%
+ \def\indexname{Tàula analìtica}%
+ \def\figurename{Figura}%
+ \def\tablename{Tabela}%
+ \def\partname{Part}%
+ \def\enclname{Gionta/e}%
+ \def\ccname{Con còpia a}%
+ \def\headtoname{Për}%
+ \def\pagename{Pàgina}%
+ \def\seename{vëd}%
+ \def\alsoname{vëd anche}%
+ \def\proofname{Dimostrassion}%
+ \def\glossaryname{Glossari}%
+}
+\@namedef{date\CurrentOption}{%
+ \def\today{\number\day\space\ifcase\month\or
+ ëd gené\or ëd fevré\or ëd mars\or d'avril\or ëd maj\or ëd giugn\or
+ ëd luj\or d'agost\or dë stèmber\or d'otóber\or ëd novèmber\or dë dzèmber%
+ \fi\space dal\space\number\year}}
+
+\AtEndPreamble{%
+ \edef\xpgpms@savedvalues{%
+ \clubpenalty=\the\clubpenalty\space
+ \@clubpenalty=\the\@clubpenalty\space
+ \widowpenalty=\the\widowpenalty\space
+ \finalhyphendemerits=\the\finalhyphendemerits}
+}
+
+
+\def\noextras@piedmontese{%
+ \lccode\string"2019=\z@
+ \nopiedmontese@shorthands
+ \xpgpms@savedvalues
+}
+
+\def\blockextras@piedmontese{%
+ \lccode\string"2019=\string"2019
+ \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
+ \finalhyphendemerits=50000000
+ \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi
+}
+
+\def\inlineextras@piedmontese{%
+ \lccode\string"2019=\string"2019
+ \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi
+}
+%%% CHANGES END %%%
+\endinput
+
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
index 30f350e4a93..40359e022aa 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-polish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
@@ -34,7 +34,7 @@
\def\today{\number\day\space\ifcase\month\or
stycznia\or lutego\or marca\or kwietnia\or maja\or czerwca\or
lipca\or sierpnia\or września\or października\or
- listopada\or grudnia\fi
+ listopada\or grudnia\fi\space
\number\year}%
}
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-portuges.ldf
index 310f958f160..310f958f160 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-portuges.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-portuges.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf
index 43a3d173f35..43a3d173f35 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-romanian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romansh.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf
index 40d75f47e7b..40d75f47e7b 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-romansh.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-romansh.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
index 3d600d60151..78c984afc89 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-russian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
@@ -49,7 +49,7 @@
% \declare@shorthand{russian}{">}{»}%
\declare@shorthand{russian}{""}{\hskip\z@skip}%
\declare@shorthand{russian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
- \declare@shorthand{russian}{"=}{\nobreak\-\hskip\z@skip}%
+ \declare@shorthand{russian}{"=}{\nobreak-\hskip\z@skip}%
\declare@shorthand{russian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
\declare@shorthand{russian}{"-}{%
\def\russian@sh@tmp{%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-samin.ldf
index e9d834a6489..e9d834a6489 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-samin.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-samin.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
index 287620615c4..287620615c4 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-scottish.ldf
index 6c76b71076c..6c76b71076c 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-scottish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-scottish.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
index 436ac751366..436ac751366 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
index 21a62d65bdf..21a62d65bdf 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovak.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
index 7ef4203ce0a..ef527b16cb2 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-slovenian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
@@ -28,7 +28,7 @@
\def\ccname{Kopije}%
\def\headtoname{Prejme}%
\def\proofname{Dokaz}%
- \def\glossaryname{Glosar}% <-- CHECK!
+ \def\glossaryname{Slovar}%
}
\def\dateslovenian{%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
index 312c3b3b8f2..30d4f7817c5 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-spanish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
@@ -35,7 +35,7 @@
\def\today{\number\day~de~\ifcase\month\or
enero\or febrero\or marzo\or abril\or mayo\or junio\or
julio\or agosto\or septiembre\or octubre\or noviembre\or
- diciembre\fi\space \number\year}%
+ diciembre\fi\space de~\number\year}%
}
\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf
index 748353488bf..748353488bf 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-swedish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-swedish.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
index 75e5ce0731d..75e5ce0731d 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-syriac.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-syriac.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-tamil.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf
index c3ef7110ba6..c3ef7110ba6 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-tamil.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-tamil.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-telugu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf
index f7f6a63dc5f..f7f6a63dc5f 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-telugu.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-telugu.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
index 16e90ea7dc1..16e90ea7dc1 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf
new file mode 100644
index 00000000000..759bc8c08e9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-tibetan.ldf
@@ -0,0 +1,138 @@
+\ProvidesFile{gloss-tibetan.ldf}[polyglossia: module for tibetan]
+%% Copyright 2013 Elie Roux
+%% Under the CC0 license <http://creativecommons.org/publicdomain/zero/1.0/>
+%%
+%% A good font to make tests is \newfontfamily\tibetanfont{Tibetan Machine Uni}
+%%
+
+\PolyglossiaSetup{tibetan}{
+ script=Tibetan,
+ scripttag=tibt,
+ hyphennames={nohyphenation},
+ fontsetup=true
+ %TODO localalph={xxx@alph,xxx@Alph}
+ %TODO localdigits=tibetannumber
+}
+
+\newif\if@tibetan@numerals
+\def\tmp@tibetan{tibetan}
+\define@key{tibetan}{numerals}[tibetan]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@tibetan\@tibetan@numeralstrue\else
+ \@tibetan@numeralsfalse\fi
+}
+
+\setkeys{tibetan}{numerals}
+
+% some are known, but very few
+% a few come from "Standardizing Tibetan Terms of Information Technology"
+% from the China Tibetology Research Center
+\def\captionstibetan{%
+ %\def\refname{}%
+ \def\abstractname{གནད་བསྡུས།}%
+ \def\bibname{དཔེ་ཆའི་ཐོ་གཞུང་།}% or dpe deb kyi re'u mig?
+ \def\prefacename{དཔེ་དེབ་ཀྱི་གླེང་བརྗོད།}% or gleng brjod 'god pa or ngo sprod?
+ \def\chaptername{ལེའུ་}%
+ \def\appendixname{ཞར་བྱུང་།}%
+ \def\contentsname{དཀར་ཆག།}%
+ %\def\listfigurename{}%
+ %\def\listtablename{}%
+ \def\indexname{གསུལ་བྱང་།}%
+ \def\figurename{པར་རིས་}% or dpe ris?
+ \def\tablename{རེའུ་མིག་}%
+ %\def\thepart{}%
+ \def\partname{ཆ་ཤས་}%
+ \def\pagename{ཤོག་}%
+ %\def\seename{}%
+ %\def\alsoname{}%
+ %\def\enclname{}%
+ \def\ccname{འདྲ་བཤུས་ལེན་མཁན་}%
+ %\def\headtoname{}%
+ \def\proofname{བདེན་དཔང་།}% not sure about this one...
+ \def\glossaryname{མིང་ཚིག་རེའུ་མིག།}%
+}
+\def\datetibetan{%
+ \def\tibetan@month{%
+ \ifcase\month\or
+ ཟླ་དང་པོ\or ཟླ་གཉིས་པ\or ཟླ་གསུམ་པ%
+ \or ཟླ་བཞི་པ\or ཟླ་ལྔ་པ\or ཟླ་དྲུག་པ\or ཟླ་བདུན་པ%
+ \or ཟླ་བརྒྱད་པ\or ཟླ་དགུ་པ\or ཟླ་བཆུ་པ\or ཟླ་བཆུ་གཅིག་པ\or ཟླ་བཆུ་གཉིས་པ\fi}%
+ \def\tibetan@daynum{%
+ \ifcase\day\or དང་པོ\or གཉིས་པ\or གསུམ་པ \or བཞི་པ\or ལྔ་པ\or དྲུག་པ\or བདུན་པ\or བརྒྱད་པ\or དགུ་པ\or བཆུ་པ%
+ \or བཆུ་གཅིག་པ\or བཆུ་གཉིས་པ\or བཆུ་གསུམ་པ\or བཆུ་བཞི་པ\or བཆུ་ལྔ་པ\or བཆུ་དྲུག་པ\or བཆུ་བདུན་པ\or བཆུ་བརྒྱད་པ\or བཆུ་དགུ་པ\or ཉི་ཤུ་པ%
+
+ \or ཉི་ཤུ་རྩ་གཅིག་པ\or ཉི་ཤུ་རྩ་གཉིས་པ\or ཉི་ཤུ་རྩ་གསུམ་པ\or ཉི་ཤུ་རྩ་བཞི་པ\or ཉི་ཤུ་རྩ་ལྔ་པ\or ཉི་ཤུ་རྩ་དྲུག་པ\or ཉི་ཤུ་རྩ་བདུན་པ\or ཉི་ཤུ་རྩ་བརྒྱད་པ\or ཉི་ཤུ་རྩ་དགུ་པ\or སུམ་ཆུ་པ%
+ \or སུམ་ཆུ་སོ་གཅིག་པ\fi}%
+ % As we use gregorian calendar, it's better to stick with spyi lo
+ %\newcount\tibetan@year%
+ %\tibetan@year=\year%
+ %\advance\tibetan@year by 127% this is bod rgyal lo, the most common, but there are others...
+ % I'm not sure the / character is in most tibetan fonts
+ %\def\today{\tibetannumber\day /\tibetannumber\day /\tibetannumber\year}%
+ \def\today{\tibetannumber\day །\tibetannumber\month །\tibetannumber\year}%
+ % this is more litterate, but longer
+ %\def\today{སྤྱི་ལོ་\tibetannumber\year ་སྤྱི་\tibetan@month{}་ད་རེས་\tibetan@daynum{}།}%
+}
+
+\def\tibetandigits#1{\expandafter\@tibetan@digits #1@}
+\def\@tibetan@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\@tibetan@digits
+ \fi
+}
+
+\def\tibetannumber#1{%
+ \if@tibetan@numerals
+ \tibetandigits{\number#1}%
+ %%{\protect\addfontfeature{Mapping=tibetandigits}\protect\number#1}
+ \else
+ \number#1%
+ %%{\protect\reset@font\number#1}
+ \fi}
+
+\def\@tibetanalph#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}{@tibetanalph}\fi}
+\def\tibetanAlph#1{\expandafter\@tibetanAlph\csname c@#1\endcsname}
+\def\@tibetanAlph#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}{@tibetanalph}\fi}
+
+\def\tibetan@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \if@tibetan@numerals
+ \let\@alph\@tibetanalph%
+ \let\@Alph\@tibetanAlph%
+ \fi
+}
+\def\notibetan@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+
+\def\tibetan@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\tibetannumber%
+ \renewcommand{\thefootnote}{\protect\tibetannumber{\c@footnote}}%
+}
+\def\notibetan@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+}
+
+% copied from Thai, not tested
+
+\def\blockextras@tibetan{%
+ \let\orig@baselinestrech\baselinestretch%
+ \renewcommand{\baselinestretch}{1.2}%
+}
+\def\noblockextras@tibetan{%
+ \let\baselinestrech\orig@baselinestretch%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf
index 6f40cf2cd3d..6f40cf2cd3d 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkmen.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf
index 19b257272aa..19b257272aa 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-turkmen.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkmen.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
index 26d3906ff4e..26d3906ff4e 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-ukrainian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-urdu.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
index 028f0cdd885..028f0cdd885 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-urdu.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-urdu.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-usorbian.ldf
index 810354ce1d4..810354ce1d4 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-usorbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-usorbian.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-vietnamese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
index 96969508254..96969508254 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-vietnamese.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
index d861308b2c7..d861308b2c7 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-welsh.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty b/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty
index c75b2f5faa9..c75b2f5faa9 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty b/Master/texmf-dist/tex/latex/polyglossia/hijrical.sty
index 79da8d0020b..79da8d0020b 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/hijrical.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/hijrical.sty
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-frpt.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-frpt.lua
new file mode 100644
index 00000000000..1fc02137cb0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-frpt.lua
@@ -0,0 +1,210 @@
+require('polyglossia') -- just in case...
+
+local add_to_callback = luatexbase.add_to_callback
+local remove_from_callback = luatexbase.remove_from_callback
+local priority_in_callback = luatexbase.priority_in_callback
+
+local next, type = next, type
+
+local nodes, fonts, node = nodes, fonts, node
+
+local insert_node_before = node.insert_before
+local insert_node_after = node.insert_after
+local remove_node = nodes.remove
+local end_of_math = node.end_of_math
+local has_attribute = node.has_attribute
+
+-- node types as of April 2013
+local glue_code = 10
+local glue_spec_code= 47
+local glyph_code = 37
+local penalty_code = 12
+local kern_code = 11
+
+-- we make a new node, so that we can copy it later on
+local penalty_node = node.new(penalty_code)
+penalty_node.penalty = 10000
+
+local function get_penalty_node()
+ return node.copy(penalty_node)
+end
+
+-- same for glue node
+local glue_node = node.new(glue_code)
+glue_node.spec = node.new(glue_spec_code)
+
+local function get_glue_node(dim)
+ local n = node.copy(glue_node)
+ n.spec.width = dim
+ return n
+end
+
+-- we have here all possible space characters, referenced by their
+-- unicode slot number, taken from char-def.lua
+local space_chars = {[20]=1, [160]=1, [5760]=1, [6158]=1, [8192]=1, [8193]=1, [8194]=1, [8195]=1,
+ [8196]=1, [8197]=1, [8198]=1, [8199]=1, [8200]=1, [8201]=1, [8202]=1, [8239]=1, [8287]=1, [12288]=1}
+
+-- from nodes-tst.lua, adapted
+local function somespace(n,all)
+ if n then
+ local id = n.id
+ if id == glue_code then
+ return (all or (n.spec.width ~= 0)) and glue_code
+ elseif id == kern_code then
+ return (all or (n.kern ~= 0)) and kern_code
+ elseif id == glyph_code then
+ if space_chars[n.char] then
+ return true
+ else
+ return false
+ end
+ end
+ end
+ return false
+end
+
+-- idem
+local function somepenalty(n,value)
+ if n then
+ local id = n.id
+ if id == penalty_code then
+ if value then
+ return n.penalty == value
+ else
+ return true
+ end
+ end
+ end
+ return false
+end
+
+local xpgfrptattr = luatexbase.attributes['xpg@frpt']
+
+local left=1
+local right=2
+local byte = unicode.utf8.byte
+
+-- Now there is a good question: how do we now, in lua, what a \thinspace is?
+-- In the LaTeX source (ltspace.dtx) it is defined as:
+-- \def\thinspace{\kern .16667em }. I see no way of seeing if it has been
+-- overriden or not... So we stick to this value.
+local thinspace = 0.16667
+-- thickspace is defined in amsmath.sty as:
+-- \renewcommand{\;}{\mspace+\thickmuskip{.2777em}}. Same problem as above, we
+-- stick to this fixed value.
+local thickspace = 0.2777 -- 5/18
+
+local mappings = {
+ [byte(':')] = {left, thickspace}, --really?
+ [byte('!')] = {left, thinspace},
+ [byte('?')] = {left, thinspace},
+ [byte(';')] = {left, thinspace},
+ [byte('‼')] = {left, thinspace},
+ [byte('⁇')] = {left, thinspace},
+ [byte('⁈')] = {left, thinspace},
+ [byte('⁉')] = {left, thinspace},
+ [byte('»')] = {left, thinspace},
+ [byte('>')] = {left, thinspace},
+ [byte('«')] = {right, thinspace},
+ [byte('‹')] = {right, thinspace},
+ }
+
+local function set_spacings(thinsp, thicksp)
+ for _, m in pairs(mappings) do
+ if m[2] == thinspace then
+ m[2] = thinsp
+ elseif m[2] == thickspace then
+ m[2] = thicksp
+ end
+ end
+ thickspace = thicksp
+ thinspace = thinsp
+end
+
+-- from typo-spa.lua
+local function process(head)
+ local done = false
+ local start = head
+ -- head is always begin of par (whatsit), so we have at least two prev nodes
+ -- penalty followed by glue
+ while start do
+ local id = start.id
+ if id == glyph_code then -- 37 is glyph as of 2013/04
+ local attr = has_attribute(start, xpgfrptattr)
+ if attr and attr > 0 then
+ local char = start.char
+ local map = mappings[char]
+ --node.unset_attribute(start, xpgfrptattr) -- needed?
+ if map then
+ local quad = font.fonts[start.font].parameters.quad -- might be optimized
+ local prev = start.prev
+ if map[1] == left and prev then
+ local prevprev = prev.prev
+ local somespace = somespace(prev,true)
+ -- TODO: there is a question here: do we override a preceding space or not?...
+ if somespace then
+ local somepenalty = somepenalty(prevprev,10000)
+ if somepenalty then
+ head = remove_node(head,prev,true)
+ head = remove_node(head,prevprev,true)
+ else
+ head = remove_node(head,prev,true)
+ end
+ end
+ insert_node_before(head,start,get_penalty_node())
+ insert_node_before(head,start,get_glue_node(map[2]*quad))
+ done = true
+ end
+ local next = start.next
+ if map[1] == right and next then
+ local nextnext = next.next
+
+ local somepenalty = somepenalty(next,10000)
+ if somepenalty then
+ local somespace = somespace(nextnext,true)
+ if somespace then
+ head = remove_node(head,next,true)
+ head = remove_node(head,nextnext,true)
+ end
+ else
+ local somespace = somespace(next,true)
+ if somespace then
+ head = remove_node(head,next,true)
+ end
+ end
+ insert_node_after(head,start,get_glue_node(right*quad))
+ insert_node_after(head,start,get_penalty_node())
+ done = true
+ end
+ end
+ end
+ elseif id == math_code then
+ -- warning: this is a feature of luatex > 0.76
+ start = end_of_math(start) -- weird, can return nil .. no math end?
+ end
+ if start then
+ start = start.next
+ end
+ end
+ return head, done
+end
+
+local callback_name = "pre_linebreak_filter"
+
+local function activate()
+ if not priority_in_callback (callback_name, "xpg-frpt.process") then
+ add_to_callback(callback_name, process, "xpg-frpt.process", 1)
+ end
+end
+
+local function desactivate()
+ if priority_in_callback (callback_name, "xpg-frpt.process") then
+ remove_from_callback(callback_name, "xpg-frpt.process")
+ end
+end
+
+polyglossia.activate_frpt = activate
+polyglossia.desactivate_frpt = desactivate
+polyglossia.set_spacings = set_spacings
+polyglossia.thinspace = thinspace
+polyglossia.thickspace = thickpace
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
new file mode 100644
index 00000000000..96f2341519a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
@@ -0,0 +1,77 @@
+require('luatex-hyphen')
+
+local luatexhyphen = luatexhyphen
+local byte = unicode.utf8.byte
+
+local polyglossia_module = {
+ name = "polyglossia",
+ version = 1.3,
+ date = "2013/05/11",
+ description = "Polyglossia",
+ author = "Elie Roux",
+ copyright = "Elie Roux",
+ license = "CC0"
+}
+
+local error, warning, info, log =
+ luatexbase.provides_module(polyglossia_module)
+
+polyglossia = polyglossia or {}
+local polyglossia = polyglossia
+
+local current_language
+local default_language
+
+local function loadlang(lang, id)
+ if luatexhyphen.lookupname(lang) then
+ luatexhyphen.loadlanguage(lang, id)
+ end
+end
+
+local function select_language(lang, id)
+ loadlang(lang, id)
+ polyglossia.current_language = lang
+end
+
+local function set_default_language(lang, id)
+ polyglossia.default_language = lang
+end
+
+local check_char
+
+if luaotfload and luaotfload.aux and luaotfload.aux.font_has_glyph then
+ local font_has_glyph = luaotfload.aux.font_has_glyph
+ function check_char(chr)
+ local codepoint = tonumber(chr)
+ if not codepoint then codepoint = byte(chr) end
+ if font_has_glyph(font.current(), codepoint) then
+ tex.sprint('1')
+ else
+ tex.sprint('0')
+ end
+ end
+else
+ local ids = fonts.identifiers or fonts.ids or fonts.hashes.identifiers
+ function check_char(chr) -- always in current font
+ local otfdata = ids[font.current()].characters
+ local codepoint = tonumber(chr)
+ if not codepoint then codepoint = byte(chr) end
+ if otfdata and otfdata[codepoint] then
+ tex.print('1')
+ else
+ tex.print('0')
+ end
+ end
+end
+
+local function load_frpt()
+ require('polyglossia-frpt')
+end
+
+polyglossia.loadlang = loadlang
+polyglossia.select_language = select_language
+polyglossia.set_default_language = set_default_language
+polyglossia.current_language = current_language -- doesn't seem to be working well :-(
+polyglossia.default_language = default_language
+polyglossia.check_char = check_char
+polyglossia.load_frpt = load_frpt
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 3c35d6b8884..08ba373330f 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
@@ -1,24 +1,29 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2012/04/29 v1.2.1
- Babel replacement for XeLaTeX]
+\ProvidesPackage{polyglossia}[2012/08/06 v1.30MM
+ Babel replacement for XeLaTeX and LuaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}
\RequirePackage{xkeyval}[2008/08/13]
+% Will raise error if used with anything else than XeTeX or LuaTeX
\RequirePackage{fontspec}[2010/06/08]% v2.0
+% Ironically, ifluatex.sty is included by some other package if we run
+% LuaTeX, but it's not if we run XeTeX, and we need it to know which of
+% the two engines it is! Hence we include it here.
+\RequirePackage{ifluatex}
% fontspec now uses LaTeX3 packages such as expl3, so we need this:
\ExplSyntaxOn
-\ifcsundef{newXeTeXintercharclass}{%
- \xpg@error{Your~ xelatex~ format~ appears~ to~ be~ outdated!^^J
-~~~~Please~ update~ your~ system~ and~ recreate~ it~ with~ fmtutil.}
- }{}
-
%% This is for compatibility with Babel-aware package:
\cslet{ver@babel.sty}{\@empty} % this "fakes" babel
\def\languageshorthands#1{\relax} %this is for scrlttr2 class
\AtEndPreamble{\let\bbl@set@language\xpg@set@language} %for biblatex
\AtEndPreamble{\let\bbl@main@language\xpg@main@language} %for biblatex
+\ifluatex
+ \RequirePackage{luatexbase} % already included by fontspec, but needed here
+ \RequireLuaModule{polyglossia}
+\fi
+
%% for \docvslist (etoolbox)
\providecommand*{\do}[1]{}%
@@ -42,7 +47,7 @@
I~ will~ use~ \string\language=\string\l@ #1\space instead}%
\expandafter\adddialect\csname l@#2\expandafter\endcsname\csname l@#1\endcsname\relax}
- \providecommand*{\xpg@nopatterns}[1]{%
+\providecommand*{\xpg@nopatterns}[1]{%
\xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#1'\MessageBreak
I~ will~ use~ \string\language=\string\l@nohyphenation\space instead}%
%%TODO? \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
@@ -134,6 +139,7 @@
%% options currently available:
%% language : the name of the language (as understood by fontspec)
%% hyphennames : the different hyphenation patterns to try (comma separated list)
+%%% TODO: what if a language has no hyphenation possible? ex: tibetan
%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback, with \xpg@nopatterns@fallback - i.e. with a warning: e.g. sanskrit for hindi, or catalan for asturian.
%% script : the name of the script (as understood by fontspec) – default is Latin
%% direction : the direction of the script: LR or RL
@@ -166,7 +172,7 @@
\ifcsdef{l@#1}{}{%
\ifstrequal{#1}{##1}{}%
{\ifcsdef{l@##1}%
- {\csletcs{l@#1}{l@##1}\listbreak}%
+ {\csletcs{l@#1}{l@##1}\xpg@set@language@luatex@ii{##1}\listbreak}%
{}%
}%
}%
@@ -201,6 +207,8 @@
\csgdef{xpg@langtag@#1}{##1}}%
\define@key[xpg@setup]{#1}{hyphennames}[{#1}]{%
\docsvlist{##1}%
+ % \expandafter\show\csname l@##1\endcsname
+ % \expandafter\show\csname l@#1\endcsname
% if l@#1 does not yet exist,
% we assign it to nohyphenation
% we do this here in case the hyphennames key was omitted
@@ -274,9 +282,9 @@
\edef\tmp@@scriptparam{Script=#2}%
\expandafter\expandafter\expandafter\fontspec_if_script:nTF \expandafter{#1}%
{\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@scriptparam}}%
- {\xpg@error{^^J
- The~ current~ roman~ font~ does~ not~ contain~ the~ \expandafter\noexpand#2 ~ script!^^J
- Please~ define~ \expandafter\string\csname \xpg@lowercasefirst{#2}font\endcsname\space with~ \string\newfontfamily}}%
+ {\xpg@error{The~ current~ roman~ font~ does~ not~ contain\MessageBreak
+ the~ \expandafter\noexpand#2 ~ script!\MessageBreak
+ Please~ define~ \expandafter\string\csname \xpg@lowercasefirst{#2}font\endcsname\space with~ \string\newfontfamily}}%
}
\def\xpg@fontsetup@latin#1{%
@@ -433,8 +441,11 @@
}
\setkeys{polyglossia}{localmarks=false}
+% Easy way out – Arthur, 2012-08-01
+\ifcsdef{newXeTeXintercharclass}{%
% to reset the intercharclass of a character to "normal"
\newXeTeXintercharclass\xpg@normalclass %TODO
+}{}
%% when no patterns are available, we use \l@nohyphenation, assigned to 255
%% (suggestion by Enrico Gregorio)
@@ -463,6 +474,9 @@
{\xpg@input{gloss-#2.ldf}%
\xpg@info{Default~ language~ is~ #2}%
\def\languagename{#2}%
+ \ifluatex %
+ \directlua{polyglossia.set_default_language('\luatexluaescapestring{\string#2}')}%
+ \fi %
% This is needed because \arabic is a built-in LaTeX command:
% so now we have \begin{Arabic}... instead of \begin{arabic}...
\ifstrequal{#2}{arabic}%
@@ -674,7 +688,23 @@
\fi
}
+\newcommand\xpg@set@language@luatex@ii[1]{%
+ \ifluatex %
+ % here we use lu@texhyphen@loaded@\the\language, the same as in babel
+ \expandafter\ifcsname lu@texhyphen@loaded@\the\csname l@#1\endcsname\endcsname \else %
+ \global\@namedef{lu@texhyphen@loaded@\the\language}{}%
+ \directlua{polyglossia.select_language('\luatexluaescapestring{\string#1}', '\the\language')}%
+ \fi %
+ \fi %
+}
+
\def\select@language#1{%
+ \ifluatex %
+ \ifcsname lu@texhyphen@loaded@\the\language\endcsname \else %
+ \global\@namedef{lu@texhyphen@loaded@\the\language}{}%
+ \directlua{polyglossia.select_language('\luatexluaescapestring{\string#1}', '\the\language')}%
+ \fi %
+ \fi %
\xpg@initial@setup%
\select@@language{#1}%
\ifcsundef{setRL}{}%
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/xgreek-fixes.def b/Master/texmf-dist/tex/latex/polyglossia/xgreek-fixes.def
index 853bd0831c1..853bd0831c1 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/xgreek-fixes.def
+++ b/Master/texmf-dist/tex/latex/polyglossia/xgreek-fixes.def
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/babelsh.def b/Master/texmf-dist/tex/xelatex/polyglossia/babelsh.def
deleted file mode 100644
index 5434f9be80d..00000000000
--- a/Master/texmf-dist/tex/xelatex/polyglossia/babelsh.def
+++ /dev/null
@@ -1,308 +0,0 @@
-\ifx\initiate@active@char\@undefined
-\else
- \bbl@afterfi\endinput
-\fi
-\ProvidesFile{babelsh.def}
- [2009/05/07 %
- Babel common definitions for shorthands^^J
- Taken verbatim from babel.def (2008/07/06 v3.8l)]
-\def\bbl@add@special#1{\begingroup
- \def\do{\noexpand\do\noexpand}%
- \def\@makeother{\noexpand\@makeother\noexpand}%
- \edef\x{\endgroup
- \def\noexpand\dospecials{\dospecials\do#1}%
- \expandafter\ifx\csname @sanitize\endcsname\relax \else
- \def\noexpand\@sanitize{\@sanitize\@makeother#1}%
- \fi}%
- \x}
-\def\bbl@remove@special#1{\begingroup
- \def\x##1##2{\ifnum`#1=`##2\noexpand\@empty
- \else\noexpand##1\noexpand##2\fi}%
- \def\do{\x\do}%
- \def\@makeother{\x\@makeother}%
- \edef\x{\endgroup
- \def\noexpand\dospecials{\dospecials}%
- \expandafter\ifx\csname @sanitize\endcsname\relax \else
- \def\noexpand\@sanitize{\@sanitize}%
- \fi}%
- \x}
-\long\def\bbl@afterelse#1\else#2\fi{\fi#1}
-\long\def\bbl@afterfi#1\fi{\fi#1}
-\def\initiate@active@char#1{%
- \expandafter\ifx\csname active@char\string##1\endcsname\relax
- \bbl@afterfi{\@initiate@active@char{#1}}%
- \fi}
-\begingroup
- \catcode`\~\active
- \def\x{\endgroup
- \def\@initiate@active@char##1{%
- \ifcat\noexpand##1\noexpand~\relax
- \@ifundefined{normal@char\string##1}{%
- \expandafter\let\csname normal@char\string##1\endcsname##1%
- \expandafter\gdef
- \expandafter##1%
- \expandafter{%
- \expandafter\active@prefix\expandafter##1%
- \csname normal@char\string##1\endcsname}}{}%
- \else
- \@activated{##1}%
- \@namedef{normal@char\string##1}{##1}%
- \ifx##1'%
- \let\prim@s\bbl@prim@s
- \@namedef{normal@char\string##1}{%
- \textormath{##1}{^\bgroup\prim@s}}%
- \fi
- \ifx##1^%
- \gdef\bbl@act@caret{%
- \ifmmode
- \csname normal@char\string^\endcsname
- \else
- \bbl@afterfi
- {\if@safe@actives
- \bbl@afterelse\csname normal@char\string##1\endcsname
- \else
- \bbl@afterfi\csname user@active\string##1\endcsname
- \fi}%
- \fi}
- \fi
- %%\@ifpackagewith{babel}{KeepShorthandsActive}{}{%
- \edef\bbl@tempa{\catcode`\noexpand##1\the\catcode`##1}%
- \expandafter\AtEndOfPackage\expandafter{\bbl@tempa}%
- %%}%
- \@tempcnta=\lccode`\~
- \lccode`~=`##1%
- \lowercase{%
- \catcode`~\active
- \expandafter\bbl@add@special
- \csname \string##1\endcsname
- \AtBeginDocument{%
- \catcode`##1\active
- \if@filesw
- \immediate\write\@mainaux{%
- \string\catcode`##1\string\active}%
- \fi}%
- \expandafter\gdef
- \expandafter~%
- \expandafter{%
- \expandafter\active@prefix\expandafter##1%
- \csname normal@char\string##1\endcsname}}%
- \lccode`\~\@tempcnta
- \fi
- \ifx##1^%
- \@namedef{active@char\string##1}{\bbl@act@caret}%
- \else
- \@namedef{active@char\string##1}{%
- \if@safe@actives
- \bbl@afterelse\csname normal@char\string##1\endcsname
- \else
- \bbl@afterfi\csname user@active\string##1\endcsname
- \fi}%
- \fi
- \@namedef{user@active\string##1}{%
- \expandafter\ifx
- \csname \user@group @sh@\string##1@\endcsname
- \relax
- \bbl@afterelse\bbl@sh@select\user@group##1%
- {user@active@arg\string##1}{language@active\string##1}%
- \else
- \bbl@afterfi\csname \user@group @sh@\string##1@\endcsname
- \fi}%
- \long\@namedef{user@active@arg\string##1}####1{%
- \expandafter\ifx
- \csname \user@group @sh@\string##1@\string####1@\endcsname
- \relax
- \bbl@afterelse
- \csname language@active\string##1\endcsname####1%
- \else
- \bbl@afterfi
- \csname \user@group @sh@\string##1@\string####1@%
- \endcsname
- \fi}%
- \@namedef{\user@group @sh@\string##1@@}{%
- \csname normal@char\string##1\endcsname}
- \@namedef{language@active\string##1}{%
- \expandafter\ifx
- \csname \language@group @sh@\string##1@\endcsname
- \relax
- \bbl@afterelse\bbl@sh@select\language@group##1%
- {language@active@arg\string##1}{system@active\string##1}%
- \else
- \bbl@afterfi
- \csname \language@group @sh@\string##1@\endcsname
- \fi}%
- \long\@namedef{language@active@arg\string##1}####1{%
- \expandafter\ifx
- \csname \language@group @sh@\string##1@\string####1@\endcsname
- \relax
- \bbl@afterelse
- \csname system@active\string##1\endcsname####1%
- \else
- \bbl@afterfi
- \csname \language@group @sh@\string##1@\string####1@%
- \endcsname
- \fi}%
- \@namedef{system@active\string##1}{%
- \expandafter\ifx
- \csname \system@group @sh@\string##1@\endcsname
- \relax
- \bbl@afterelse\bbl@sh@select\system@group##1%
- {system@active@arg\string##1}{normal@char\string##1}%
- \else
- \bbl@afterfi\csname \system@group @sh@\string##1@\endcsname
- \fi}%
- \long\@namedef{system@active@arg\string##1}####1{%
- \expandafter\ifx
- \csname \system@group @sh@\string##1@\string####1@\endcsname
- \relax
- \bbl@afterelse\csname normal@char\string##1\endcsname####1%
- \else
- \bbl@afterfi
- \csname \system@group @sh@\string##1@\string####1@\endcsname
- \fi}%
- \@namedef{user@sh@\string##1@\string\protect@}{%
- \csname user@active\string##1\endcsname}%
- }%
- }\x
-\def\bbl@sh@select#1#2{%
- \expandafter\ifx\csname#1@sh@\string#2@sel\endcsname\relax
- \bbl@afterelse\bbl@scndcs
- \else
- \bbl@afterfi\csname#1@sh@\string#2@sel\endcsname
- \fi
-}
-\def\active@prefix#1{%
- \ifx\protect\@typeset@protect
- \else
- \ifx\protect\@unexpandable@protect
- \bbl@afterelse\bbl@afterfi\noexpand#1\@gobble
- \else
- \bbl@afterfi\bbl@afterfi\protect#1\@gobble
- \fi
- \fi}
-\newif\if@safe@actives
-\@safe@activesfalse
-\def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi}
-\def\bbl@activate#1{%
- \expandafter\def
- \expandafter#1\expandafter{%
- \expandafter\active@prefix
- \expandafter#1\csname active@char\string#1\endcsname}%
-}
-\def\bbl@deactivate#1{%
- \expandafter\def
- \expandafter#1\expandafter{%
- \expandafter\active@prefix
- \expandafter#1\csname normal@char\string#1\endcsname}%
-}
-\def\bbl@firstcs#1#2{\csname#1\endcsname}
-\def\bbl@scndcs#1#2{\csname#2\endcsname}
-\def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil}
-\def\@decl@short#1#2#3\@nil#4{%
- \def\bbl@tempa{#3}%
- \ifx\bbl@tempa\@empty
- \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@scndcs
- \@namedef{#1@sh@\string#2@}{#4}%
- \else
- \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@firstcs
- \@namedef{#1@sh@\string#2@\string#3@}{#4}%
- \fi}
-\def\textormath#1#2{%
- \ifmmode
- \bbl@afterelse#2%
- \else
- \bbl@afterfi#1%
- \fi}
-\def\user@group{user}
-\def\language@group{english}
-\def\system@group{system}
-\def\useshorthands#1{%
- \def\user@group{user}%
- \initiate@active@char{#1}%
- \@tempcnta\lccode`\~
- \lccode`~=`#1%
- \lowercase{\catcode`~\active\bbl@activate{~}}%
- \lccode`\~\@tempcnta}
-\def\defineshorthand{\declare@shorthand{user}}
-\def\languageshorthands#1{\def\language@group{#1}}
-\def\aliasshorthand#1#2{%
- \expandafter\ifx\csname active@char\string#2\endcsname\relax
- \ifx\document\@notprerr
- \@notshorthand{#2}
- \else
- \initiate@active@char{#2}%
- \@tempcnta\lccode`\~
- \lccode`~=`#2%
- \lowercase{\let~#1}%
- \lccode`\~\@tempcnta
- \fi
- \fi
-}
-\def\@notshorthand#1{%
- \PackageError{polyglossia}{%
- The character `\string #1' should be made
- a shorthand character;\MessageBreak
- add the command \string\useshorthands\string{#1\string} to
- the preamble.\MessageBreak
- I will ignore your instruction}{}%
- }
-\newcommand*\shorthandon[1]{\bbl@switch@sh{on}#1\@nil}
-\newcommand*\shorthandoff[1]{\bbl@switch@sh{off}#1\@nil}
-\def\bbl@switch@sh#1#2#3\@nil{%
- \@ifundefined{active@char\string#2}{%
- \PackageError{polyglossia}{%
- The character '\string #2' is not a shorthand character
- in \languagename}{%
- Maybe you made a typing mistake?\MessageBreak
- I will ignore your instruction}}{%
- \csname bbl@switch@sh@#1\endcsname#2}%
- \ifx#3\@empty\else
- \bbl@afterfi\bbl@switch@sh{#1}#3\@nil
- \fi}
-\def\bbl@switch@sh@off#1{\catcode`#112\relax}
-\begingroup
- \catcode`\~\active
- \def\x{\endgroup
- \def\bbl@switch@sh@on##1{%
- \begingroup
- \lccode`~=`##1%
- \lowercase{\endgroup
- \catcode`~\active
- }%
- }%
- }
-\x
-\declare@shorthand{system}{"}{\csname normal@char\string"\endcsname}
-\declare@shorthand{system}{'}{%
- \textormath{\csname normal@char\string'\endcsname}%
- {\sp\bgroup\prim@s}}
-\declare@shorthand{system}{`}{\csname normal@char\string`\endcsname}
-\def\bbl@prim@s{%
- \prime\futurelet\@let@token\bbl@pr@m@s}
-\begingroup
- \catcode`\'\active\let'\relax
- \def\x{\endgroup
- \def\bbl@pr@m@s{%
- \ifx'\@let@token
- \expandafter\pr@@@s
- \else
- \ifx^\@let@token
- \expandafter\expandafter\expandafter\pr@@@t
- \else
- \egroup
- \fi
- \fi}%
- }
-\x
-\initiate@active@char{~}
-\declare@shorthand{system}{~}{\leavevmode\nobreak\ }
-\bbl@activate{~}
-\def\bbl@disc#1#2{%
- \nobreak\discretionary{#2-}{}{#1}\allowhyphens}
-\def\bbl@t@one{T1}
-\def\allowhyphens{%
- \ifx\cf@encoding\bbl@t@one\else\bbl@allowhyphens\fi}
-\def\bbl@allowhyphens{\nobreak\hskip\z@skip}
-%HERE ENDS THE CODE COPIED FROM babel.def --------------------
-\def\bbl@disc@german#1#2{%
- \nobreak\discretionary{#2-}{}{#1}}
-\endinput
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf
deleted file mode 100644
index 612094c57b6..00000000000
--- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf
+++ /dev/null
@@ -1,118 +0,0 @@
-\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]
-
-\PolyglossiaSetup{french}{%
- language=French,
- script=Latin,
- hyphennames={french,francais},
- frenchspacing=true,
- indentfirst=true,
- hyphenmins={2,2},
- fontsetup=true}
-
-\newXeTeXintercharclass\french@punctthin % ! ? ; et autres
-\newXeTeXintercharclass\french@punctthick % :
-\newXeTeXintercharclass\french@punctguillstart % « ‹
-\newXeTeXintercharclass\french@punctguillend % » ›
-
-\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
-\def\xpg@nospace#1{#1}
-
-\def\french@punctuation{%
- \lccode"2019="2019
- \XeTeXinterchartokenstate=1
- \XeTeXcharclass `\! \french@punctthin
- \XeTeXcharclass `\? \french@punctthin
- \XeTeXcharclass `\‼ \french@punctthin
- \XeTeXcharclass `\⁇ \french@punctthin
- \XeTeXcharclass `\⁈ \french@punctthin
- \XeTeXcharclass `\⁉ \french@punctthin
- \XeTeXcharclass `\; \french@punctthin
- \XeTeXcharclass `\: \french@punctthick
- \XeTeXcharclass `\« \french@punctguillstart
- \XeTeXcharclass `\» \french@punctguillend
- \XeTeXcharclass `\‹ \french@punctguillstart
- \XeTeXcharclass `\› \french@punctguillend
- \XeTeXinterchartoks \z@ \french@punctthin = {\nobreak\thinspace}%
- \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
- \XeTeXinterchartoks 255 \french@punctthin = {\xpg@unskip\nobreak\thinspace}%
- \XeTeXinterchartoks 255 \french@punctthick = {\xpg@unskip\nobreakspace}%
- \XeTeXinterchartoks \french@punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
-% \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
-% \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
- \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »"
- \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~"
- \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»"
- \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
- \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
- \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\nobreakspace}% "?»" -> "? »"
- }
-
-\def\nofrench@punctuation{%
- \lccode"2019=\z@
- \XeTeXcharclass `\! \z@
- \XeTeXcharclass `\? \z@
- \XeTeXcharclass `\‼ \z@
- \XeTeXcharclass `\⁇ \z@
- \XeTeXcharclass `\⁈ \z@
- \XeTeXcharclass `\⁉ \z@
- \XeTeXcharclass `\; \z@
- \XeTeXcharclass `\: \z@
- \XeTeXcharclass `\« \z@
- \XeTeXcharclass `\» \z@
- \XeTeXcharclass `\‹ \z@
- \XeTeXcharclass `\› \z@
- \XeTeXinterchartokenstate=0
- }
-
-\def\captionsfrench{%
- \def\refname{Références}%
- \def\abstractname{Résumé}%
- \def\bibname{Bibliographie}%
- \def\prefacename{Préface}%
- \def\chaptername{Chapitre}%
- \def\appendixname{Annexe}%
- \def\contentsname{Table des matières}%
- \def\listfigurename{Table des figures}%
- \def\listtablename{Liste des tableaux}%
- \def\indexname{Index}%
- \def\figurename{\textsc{Fig.}}%
- \def\tablename{\textsc{Tab.}}%
- \def\@Fpt{\ifcase\value{part}\or Première\or Deuxième\or
- Troisième\or Quatrième\or Cinquième\or Sixième\or
- Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or
- Douzième\or Treizième\or Quatorzième\or Quinzième\or
- Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or
- Vingtième\fi\space}%
- \def\thepart{}%
- \def\partname{\protect\@Fpt partie}%
- \def\pagename{page}%
- \def\seename{\emph{voir}}%
- \def\alsoname{\emph{voir aussi}}%
- \def\enclname{P.~J. }%
- \def\ccname{Copie à }%
- \def\headtoname{}%
- \def\proofname{Démonstration}%
- }
-\def\datefrench{%
- \def\today{\ifx\ier\undefined\def\ier{er}\fi
- \ifnum\day=1\relax 1\ier%
- \else \number\day\fi
- \space \ifcase\month%
- \or janvier\or février\or mars\or avril\or mai\or juin\or
- juillet\or août\or septembre\or octobre\or novembre\or
- décembre\fi
- \space \number\year}}
-
-\def\noextras@french{%
- \nofrench@punctuation%
- }
-
-\def\blockextras@french{%
- \french@punctuation%
- }
-
-\def\inlineextras@french{%
- \french@punctuation%
- }
-
-\endinput
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index cd5b1158002..e836e15947d 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -225,7 +225,7 @@ my @TLP_working = qw(
hobby hobete hpsdiss hrefhide hrlatex hvfloat hvindex
hypdvips hyper hypernat hyperref hyperxmp hyph-utf8 hyphen-base
hyphenat hyphenex hyplain
- ibygrk icsv idxlayout ieeepes
+ ibycus-babel ibygrk icsv idxlayout ieeepes
ifetex ifmslide ifmtarg ifnextok ifoddpage ifplatform ifsym
iftex ifthenx ifxetex
iitem ijmart ijqc
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 890c33294d4..a0e209ff156 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -471,7 +471,6 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'html2latex', "die 'skipping, no self-locating of Perl modules'",
'hyph-utf8', "&MAKEcopy",
'hyphen-german',"die 'skipping, part of hyph-utf8'",
- 'ibycus-babel',"&MAKEibycusbabel",
'ibygrk', "&MAKEflatten",
'ieeeconf', "die 'skipping, use IEEEconf'",
'ieeetran', "die 'skipping, use IEEEtran'",
@@ -2459,6 +2458,7 @@ $standardclean = '\.head|\.tmp|\.dvi|\.log|\.out|\.aux|\.toc|\.lof|\.lot'
'fundus' => $standardclean . '|outline.sty', # in own package
'gentle' => 'gentle.ps.gz', # pdf is enough
'hyph-utf8' => 'README',
+ 'ibycus-babel' => $standardclean . '|ibyhyph.tex', # in hyphen-ancientgreek
'jadetex' => $standardclean # these sty files are in passivetex
. '|(dummyels|mlnames|ucharacters|unicode)\.sty',
'lshort-russian'=>'lshortbk.zip', # sources are enough
@@ -3472,68 +3472,6 @@ sub MAKEnosymlinks {
&donormal ("nosetup");
}
-# do some stuff for simple packages with hyphenation files, like
-# cbcoptic and ibycus-babel. The arguments are:
-# LANGNAME - full language name, like "coptic" (first arg of .dat line)
-# LANGABBREV - abbreviated language name, like "cop" (in .dat filename)
-# HYPHFILE - hyphenation .tex file name, like "copthyph.tex"
-#
-# General procedure is:
-#
-# create: tlpkg/tlpsrc/hyphen-language.tlpsrc
-# (must be done by hand)
-# create: texmf-dist/tex/generic/config/language.ll.dat
-# (done here, unless it already exists)
-# install pattern file from ctan: texmf-dist/tex/generic/hyphen/langhyph.tex
-# (done here)
-# add in: tlpkg/tlpsrc/collection-langwhatever.tlpsrc
-# (must be done by hand)
-#
-sub GENMAKEhyphenation {
- my ($langname,$langabbrev,$hyphfile) = @_;
- &setup;
- &buildfilelist;
- &donormal;
- print "\t SPECIAL $package: install $hyphfile\n";
- my $generichyphdir = "$TOPDEST/texmf-dist/tex/generic/hyphen";
- &SYSTEM("mkdir -p $generichyphdir");
- &SYSTEM("$MV $hyphfile $generichyphdir");
-
- my $genericconfigdir = "$TOPDEST/texmf-dist/tex/generic/config";
- my $configfile = "$genericconfigdir/language.$langabbrev.dat";
- if (! -r $configfile) {
- print "\t SPECIAL $package: create $configfile\n";
- &SYSTEM("mkdir -p $genericconfigdir");
- &SYSTEM("echo $langname $hyphfile >$configfile");
- }
-
- print "YOU-MUST-DO! $package: create hyphen-$langname.tlpsrc\n";
- print "YOU-MUST-DO! $package: add to collection-langwhatever.tpm\n";
-}
-
-sub MAKEcbcoptic {
- &GENMAKEhyphenation ("coptic", "cop", "copthyph.tex");
-}
-
-sub MAKEibycusbabel {
- &GENMAKEhyphenation ("ibycus", "iby", "ibyhyph.tex");
-}
-
-# since existing mongolian is written in a different encoding,
-# seems best to keep both?
-sub MAKEmnhyphn
-{
- &GENMAKEhyphenation ("mongolian2a", "mn2a", "mnhyphn.tex");
-}
-
-# we don't want a package named nohyph. Hmm.
-#sub MAKEnohyph
-#{
-# &GENMAKEhyphenation ("norsk", "no", "nohyphbx.tex");
-# &GENMAKEhyphenation ("nynorsk", "no", "nnhyph.tex");
-# &GENMAKEhyphenation ("bokmal", "no", "nbhyph.tex");
-#}
-
sub MAKEaqcm {
print "\t SPECIAL $package";
@@ -3565,8 +3503,7 @@ sub MAKEarabi {
&SYSTEM ("$CP -r * $DEST/");
}
-sub MAKEarabtex
-{
+sub MAKEarabtex {
&xchdir ($packagedir);
#
print "\t SPECIAL $package: removing top-level links\n";