summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/README4
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdfbin70425 -> 70234 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-korean.pdfbin17083 -> 17281 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-thai.pdfbin23443 -> 23452 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/examples.pdfbin151269 -> 150167 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdfbin267795 -> 268164 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex16
-rw-r--r--Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx597
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/babelsh.def18
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf10
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf12
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf18
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf14
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf12
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf43
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf18
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf12
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf6
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty65
35 files changed, 522 insertions, 417 deletions
diff --git a/Master/texmf-dist/doc/latex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README
index b2864ae1d11..acac78e598b 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/README
+++ b/Master/texmf-dist/doc/latex/polyglossia/README
@@ -1,7 +1,7 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.48 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -10,7 +10,7 @@
This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
(with a few languages incompletely supported for the latter). This version
-includes support for 79 different languages, some of which in different
+includes support for over 70 different languages, some of which in different
regional or national varieties, or using a different writing system.
Polyglossia makes it possible to automate the following tasks:
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
index f214903dd4c..41654eb6a2f 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
index ac3be5e42c9..96acc681eb1 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
index 2d7abc7300b..483619ac82e 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
index bbe78342e23..56f11105e05 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
index 94b595acc66..6ac006692b1 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
index e4ca9770215..67eec479ec5 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
@@ -529,18 +529,22 @@ Table~\ref{tab:BCP47-polyglossia} lists the currently supported tags.
Russian, Slovak, and Ukrainian. Please refer to the respective language descriptions
(sec.~\ref{specific}) for details.
- \item \xpgoption{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
- \cmd\markright. In earlier versions of \pkg{polyglossia},\new{1.2.0} this
- option was set by default, but we now realize that it causes more problems
- than it helps, so it is now off by default. For backwards-compatibility, the
+ \item \xpgboolkeyfalse{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
+ \cmd\markright\ to the effect that the header text is explicitly set in the currently
+ active language (\ie wrapped into \cmd\foreignlanguage\{\meta{lang}\}\{\meta{\ldots}\}).
+
+ In earlier versions of \pkg{polyglossia},\new{1.2.0} this
+ option was enabled by default, but we now realize that it causes more problems
+ than it helps (since it breaks if a package or class redefines \cmd\markboth\ or
+ \cmd\markright), so it is now disabled by default. For backwards compatibility, the
option \xpgoption{nolocalmarks} which used to switch off the previous default, and
- now does nothing, is still available.
+ now equals the default, is still available.
\item \xpgoption{quiet} turns off most info messages and some of the warnings issued
by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}.
\end{itemize}
-\condbreak{5\baselineskip}
+\pagebreak
\section{Language-switching commands}\label{languageswitching}
\subsection{Recommended commands}\label{sec:langcmds}
diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
index 3c85e2c6ff5..ad0a94e9491 100644
--- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
@@ -11,7 +11,7 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.48 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -20,7 +20,7 @@
This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
(with a few languages incompletely supported for the latter). This version
-includes support for 79 different languages, some of which in different
+includes support for over 70 different languages, some of which in different
regional or national varieties, or using a different writing system.
Polyglossia makes it possible to automate the following tasks:
@@ -902,18 +902,22 @@ to track the issues and follow progress.
% Russian, Slovak, and Ukrainian. Please refer to the respective language descriptions
% (sec.~\ref{specific}) for details.
%
-% \item \xpgoption{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
-% \cmd\markright. In earlier versions of \pkg{polyglossia},\new{1.2.0} this
-% option was set by default, but we now realize that it causes more problems
-% than it helps, so it is now off by default. For backwards-compatibility, the
+% \item \xpgboolkeyfalse{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and
+% \cmd\markright\ to the effect that the header text is explicitly set in the currently
+% active language (\ie wrapped into \cmd\foreignlanguage\{\meta{lang}\}\{\meta{\ldots}\}).
+%
+% In earlier versions of \pkg{polyglossia},\new{1.2.0} this
+% option was enabled by default, but we now realize that it causes more problems
+% than it helps (since it breaks if a package or class redefines \cmd\markboth\ or
+% \cmd\markright), so it is now disabled by default. For backwards compatibility, the
% option \xpgoption{nolocalmarks} which used to switch off the previous default, and
-% now does nothing, is still available.
+% now equals the default, is still available.
%
% \item \xpgoption{quiet} turns off most info messages and some of the warnings issued
% by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}.
% \end{itemize}
%
-% \condbreak{5\baselineskip}
+% \pagebreak
% \section{Language-switching commands}\label{languageswitching}
%
% \subsection{Recommended commands}\label{sec:langcmds}
@@ -3412,15 +3416,15 @@ and may look very wrong.}
\newif\if@eastern@armenian
\@eastern@armenianfalse
-\define@choicekey*+{armenian}{variant}[\val\nr]{western,eastern}[western]{%
- \ifcase\nr\relax
+\define@choicekey*+{armenian}{variant}[\xpg@val\xpg@nr]{western,eastern}[western]{%
+ \ifcase\xpg@nr\relax
% western:
\@eastern@armenianfalse%
\or
% eastern:
\@eastern@armeniantrue%
\fi
- \xpg@info{Option: Armenian, variant=\val}%
+ \xpg@info{Option: Armenian, variant=\xpg@val}%
}{\xpg@warning{Unknown Armenian variant `#1'}}
\newif\if@armenian@numerals
@@ -3892,8 +3896,8 @@ and may look very wrong.}
\setlanguagealias*{belarusian}{be}
\def\belarusian@spelling{modern}
-\define@choicekey*+{belarusian}{spelling}[\val\nr]{modern,classic,tarask}[modern]{%
- \ifcase\nr\relax
+\define@choicekey*+{belarusian}{spelling}[\xpg@val\xpg@nr]{modern,classic,tarask}[modern]{%
+ \ifcase\xpg@nr\relax
% modern:
\def\belarusian@spelling{modern}%
\SetLanguageKeys{belarusian}{bcp47=be}%
@@ -3910,8 +3914,8 @@ and may look very wrong.}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{belarusian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{belarusian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -3928,7 +3932,7 @@ and may look very wrong.}
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Belarusian, numerals=\val}%
+ \xpg@info{Option: Belarusian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Belarusian numerals value `#1'}}
\define@boolkey{belarusian}[belarusian@]{babelshorthands}[true]{}
@@ -4222,8 +4226,8 @@ and may look very wrong.}
\newif\ifbengali@devanagari@numerals
\newif\ifbengali@bengali@numerals
-\define@choicekey*+{bengali}{numerals}[\val\nr]{Devanagari,Bengali,Western}[Devanagari]{%
- \ifcase\nr\relax
+\define@choicekey*+{bengali}{numerals}[\xpg@val\xpg@nr]{Devanagari,Bengali,Western}[Devanagari]{%
+ \ifcase\xpg@nr\relax
% Devanagari:
\bengali@bengali@numeralsfalse%
\bengali@devanagari@numeralstrue%
@@ -4236,7 +4240,7 @@ and may look very wrong.}
\bengali@bengali@numeralsfalse%
\bengali@devanagari@numeralsfalse%
\fi
- \xpg@info{Option: Bengali, numerals=\val}%
+ \xpg@info{Option: Bengali, numerals=\xpg@val}%
}{\xpg@warning{Unknown Bengali numeral `#1'}}
\def\extras@bengali{}
@@ -6205,8 +6209,8 @@ and may look very wrong.}
% Option ordinalmonthday
\define@boolkey{english}[english@]{ordinalmonthday}[true]{}
-\define@choicekey*+{english}{variant}[\val\nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
- \ifcase\nr\relax
+\define@choicekey*+{english}{variant}[\xpg@val\xpg@nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
+ \ifcase\xpg@nr\relax
% uk:
\british@hyphentrue
\british@dateformattrue
@@ -6815,8 +6819,8 @@ and may look very wrong.}
\setlanguagealias[variant=canadian]{french}{canadien}
\def\french@variant{french}
-\define@choicekey*+{french}{variant}[\val\nr]{french,canadian,acadian,swiss}[french]{%
- \ifcase\nr\relax
+\define@choicekey*+{french}{variant}[\xpg@val\xpg@nr]{french,canadian,acadian,swiss}[french]{%
+ \ifcase\xpg@nr\relax
% french:
\def\french@variant{french}%
\SetLanguageKeys{french}{babelname=french,bcp47=fr-FR}%
@@ -6846,7 +6850,7 @@ and may look very wrong.}
\adddialect\l@swissfrench\l@french\relax%
\french@thincolonspacetrue
\fi
- \xpg@info{Option: French, variant=\val}%
+ \xpg@info{Option: French, variant=\xpg@val}%
}{\xpg@warning{Unknown French variant `#1'}}
@@ -6869,7 +6873,11 @@ and may look very wrong.}
\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
% Save original footnote definition
-\let\xpg@orig@makefntext\@makefntext
+% Do this at the end of the preamble to catch other
+% packages' footnote changes (#391)
+\AtEndPreamble{%
+ \let\xpg@orig@makefntext\@makefntext
+}
\define@boolkey{french}[french@]{frenchfootnote}[true]{%
\AfterPreamble{%
@@ -7343,8 +7351,8 @@ and may look very wrong.}
\setlanguagealias[variant=scottish]{gaelic}{scottish}
\def\gaelic@variant{irish}
-\define@choicekey*+{gaelic}{variant}[\val\nr]{irish,scottish}[irish]{%
- \ifcase\nr\relax
+\define@choicekey*+{gaelic}{variant}[\xpg@val\xpg@nr]{irish,scottish}[irish]{%
+ \ifcase\xpg@nr\relax
% irish:
\gdef\gaelic@variant{irish}%
\SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish,bcp47=ga}%
@@ -7355,7 +7363,7 @@ and may look very wrong.}
\SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish,bcp47=gd}%
\xpg@fontsetup@latin{gaelic}%
\fi
- \xpg@info{Option: gaelic, variant=\val}%
+ \xpg@info{Option: gaelic, variant=\xpg@val}%
}{\xpg@warning{Unknown gaelic variant `#1'}}
% Register default options
@@ -7799,8 +7807,8 @@ and may look very wrong.}
\newif\if@german@oldspelling
\@german@oldspellingfalse
-\define@choicekey*+{german}{spelling}[\val\nr]{new,old,1901,1996}[new]{%
- \ifcase\nr\relax
+\define@choicekey*+{german}{spelling}[\xpg@val\xpg@nr]{new,old,1901,1996}[new]{%
+ \ifcase\xpg@nr\relax
% new:
\@german@oldspellingfalse
\or
@@ -7814,15 +7822,15 @@ and may look very wrong.}
\@german@oldspellingfalse
\fi
\german@set@babelname%
- \xpg@info{Option: German, spelling=\val}%
+ \xpg@info{Option: German, spelling=\xpg@val}%
}{\xpg@warning{Unknown German spelling `#1'}}
\newif\if@austrian@locale
\@austrian@localefalse
\newif\if@swiss@locale
\@swiss@localefalse
-\define@choicekey*+{german}{variant}[\val\nr]{german,austrian,swiss}[german]{%
- \ifcase\nr\relax
+\define@choicekey*+{german}{variant}[\xpg@val\xpg@nr]{german,austrian,swiss}[german]{%
+ \ifcase\xpg@nr\relax
% german:
\@swiss@localefalse%
\@austrian@localefalse%
@@ -7842,7 +7850,7 @@ and may look very wrong.}
}%
\fi
\german@set@babelname%
- \xpg@info{Option: German, variant=\val}%
+ \xpg@info{Option: German, variant=\xpg@val}%
}{\xpg@warning{Unknown German variant `#1'}}
\def\german@set@babelname{%
@@ -7892,8 +7900,8 @@ and may look very wrong.}
}
\newif\if@german@blackletter
-\define@choicekey*+{german}{script}[\val\nr]{latin,blackletter,fraktur}[latin]{%
- \ifcase\nr\relax
+\define@choicekey*+{german}{script}[\xpg@val\xpg@nr]{latin,blackletter,fraktur}[latin]{%
+ \ifcase\xpg@nr\relax
% latin:
\@german@blackletterfalse%
\or
@@ -7904,7 +7912,7 @@ and may look very wrong.}
\@german@blacklettertrue%
\fi
\german@set@babelname%
- \xpg@info{Option: German, script=\val}%
+ \xpg@info{Option: German, script=\xpg@val}%
}{\xpg@warning{Unknown German script `#1'}}
% Option defunc'ed, as bot XeTeX and LuaTeX meanwhile
@@ -8681,19 +8689,19 @@ and may look very wrong.}
% RTL. Hebrew uses LTR numbers, though. So we insert an LTR mark to revert
% the directionality
\ifxetex
- \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\if@nonlatin\char"200E \fi}
+ \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\ifbool{@nonlatin}{\char"200E }{}}
\fi
\def\hebrew@ltr@numbers{%
\ifxetex
- \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks}
+ \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks}%
\fi%
}
\def\nohebrew@ltr@numbers{%
\ifxetex
% This is bidi's original intervention
- \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}
+ \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}%
\fi%
}
@@ -8951,8 +8959,8 @@ and may look very wrong.}
\newif\if@hungarian@swapcaptions
\newif\if@hungarian@swapheadings
\newif\if@hungarian@swapheaders
-\define@choicekey*+{hungarian}{swapstrings}[\val\nr]{all,captions,headings,headers,hheaders,none}[all]{%
- \ifcase\nr\relax
+\define@choicekey*+{hungarian}{swapstrings}[\xpg@val\xpg@nr]{all,captions,headings,headers,hheaders,none}[all]{%
+ \ifcase\xpg@nr\relax
% all:
\@hungarian@swapcaptionstrue%
\@hungarian@swapheadingstrue%
@@ -8983,7 +8991,7 @@ and may look very wrong.}
\@hungarian@swapheadingsfalse%
\@hungarian@swapheadersfalse%
\fi
- \xpg@info{Option: Hungarian, swapstrings=\val}%
+ \xpg@info{Option: Hungarian, swapstrings=\xpg@val}%
}{\xpg@warning{Unknown Hungarian swapstrings value `#1'}}
% Register default options
@@ -9971,164 +9979,164 @@ and may look very wrong.}
%
% \subsection{gloss-khmer.ldf}
% \begin{macrocode}
-\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
-\PolyglossiaSetup{khmer}{
+\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
+\PolyglossiaSetup{khmer}{
bcp47=km,
- script=Khmer,%
- scripttag=khmr,%
- langtag=KHM,%
- hyphennames={nohyphenation},%
- fontsetup=true,%
- localnumeral=khmernumerals%
-}
-\newif\if@khmer@numerals
-\def\tmp@khmer{khmer}
-\define@key{khmer}{numerals}[arabic]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue%
- \else\@khmer@numeralsfalse\fi%
-}
-\setkeys{khmer}{numerals}
-\def\captionskhmer{%
- \def\prefacename{អារម្ភកថា}%
- \def\refname{ឯកសារយោង}%
- \def\abstractname{សង្ខេប}%
- \def\bibname{គន្ថនិទ្ទេស}%
- \def\chaptername{ជំពូក}%
- \def\appendixname{សេចក្ដីបន្ថែម}%
- \def\contentsname{មាតិការ}%
- \def\listfigurename{បញ្ជីរូបភាព}%
- \def\listtablename{បញ្ជីតារាង}%
- \def\indexname{សន្ទស្សន៍}%
- \def\figurename{រូប}%
- \def\tablename{តារាង}%
- \def\partname{ផ្នែក}%
- \def\pagename{ទំព័រ}%
- \def\seename{មើល}%
- \def\alsoname{មើលបន្ថែម}%
- \def\enclname{ឯកសារភ្ជាប់}%
- \def\ccname{ចម្លងជួន}%
- \def\headtoname{ផ្ញើរទៅ}%
- \def\proofname{សម្រាយ}%
- \def\glossaryname{សទានុក្រម}%
-}
-\def\datekhmer{%
- \def\khmer@month{%
- \ifcase\month\or%
- មករា\or%
- កុម្ភៈ\or%
- មិនា\or%
- មេសា\or%
- ឧសភា\or%
- មិថុនា\or%
- កក្កដា\or%
- សីហា\or%
- កញ្ញា\or%
- តុលា\or%
- វិច្ឆិកា\or%
- ធ្នូ\fi}%
- \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}%
-}
-\def\khmerdigits#1{\expandafter\@khmer@digits #1@}
-\def\@khmer@digits#1{%
- \ifx @#1% then terminate
- \else\ifx0#1០%
- \else\ifx1#1១%
- \else\ifx2#1២%
- \else\ifx3#1៣%
- \else\ifx4#1៤%
- \else\ifx5#1៥%
- \else\ifx6#1៦%
- \else\ifx7#1៧%
- \else\ifx8#1៨%
- \else\ifx9#1៩%
- \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \expandafter\@khmer@digits%
- \fi
-}
-
-\newcommand{\khmernumerals}[2]{\khmernumber{#2}}
-
-\def\khmernumber#1{%
- \if@khmer@numerals%
- \khmerdigits{\number#1}%
- \else%
- \number#1%
- \fi}
-\def\khmer@globalnumbers{%
- \let\orig@arabic\@arabic%
- \let\@arabic\khmernumber%
- \renewcommand{\thefootnote}{\localnumeral*{footnote}}%
-}
-\def\nokhmer@globalnumbers{%
- \let\@arabic\orig@arabic%
-}
-\def\thepart{\arabic{part}}
-\def\@khmeralph#1{%
-\ifcase#1%
-\or ក\or ខ\or គ\or ឃ\or ង%
-\or ច\or ឆ\or ជ\or ឈ\or ញ%
-\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
-\or ត\or ថ\or ទ\or ធ\or ន%
-\or ប\or ផ\or ព\or ភ\or ម%
-\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
-\else\xpg@ill@value{#1}{@khmeralph}\fi}
-\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname}
-\def\@khmerAlph#1{%
-\ifcase#1%
-\or ក\or ខ\or គ\or ឃ\or ង%
-\or ច\or ឆ\or ជ\or ឈ\or ញ%
-\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
-\or ត\or ថ\or ទ\or ធ\or ន%
-\or ប\or ផ\or ព\or ភ\or ម%
-\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
-\else\xpg@ill@value{#1}{@khmeralph}\fi}
-\def\khmer@numbers{%
- \if@khmer@numerals
- \let\@alph\@khmeralph%
- \let\@Alph\@khmerAlph%
- \fi%
-}
-\def\nokhmer@numbers{%
- \let\@alph\latin@alph%
- \let\@Alph\latin@Alph%
-}
-\def\blockextras@khmer{%
- \XeTeXlinebreaklocale "kh" %
- \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt
-% \let\orig@baselinestretch\baselinestretch%
-% \renewcommand{\baselinestretch}{1.2}% not work
-}
-\def\noblockextras@khmer{%
- \XeTeXlinebreaklocale "en"%
-% \let\baselinestretch\orig@baselinestretch%
-}
-\@ifclassloaded{beamer}{%
- \usefonttheme{professionalfonts}%
- \def\factname{ស្វ័យសត្យ}%
- \def\lemmaname{បទគន្លិះ}%
- \def\theoremname{ទ្រឹស្ដីបទ}%
- \def\corollaryname{អនុសាធ្យ}%
- \def\problemname{ចំណោទ}%
- \def\solutionname{ដំណោះស្រាយ}%
- \def\definitionname{និយមន័យ}%
- \def\examplename{ឧទាហរណ៏}%
- \uselanguage{khmer}%
- \languagepath{khmer}%
- \deftranslation[to=khmer]{Fact}{\factname}%
- \deftranslation[to=khmer]{Lemma}{\lemmaname}%
- \deftranslation[to=khmer]{Theorem}{\theoremname}%
- \deftranslation[to=khmer]{Corollary}{\corollaryname}%
- \deftranslation[to=khmer]{Problem}{\problemname}%
- \deftranslation[to=khmer]{Solution}{\solutionname}%
- \deftranslation[to=khmer]{Definition}{\definitionname}%
- \deftranslation[to=khmer]{Definitions}{\definitionname}%
- \deftranslation[to=khmer]{Example}{\examplename}%
- \deftranslation[to=khmer]{Examples}{\examplename}%
- \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
- {\noexpand\headcommand{\noexpand\def\noexpand%
- \inserttotalframenumber{\localnumeral*{framenumber}}}}}}%
-}{}
+ script=Khmer,%
+ scripttag=khmr,%
+ langtag=KHM,%
+ hyphennames={nohyphenation},%
+ fontsetup=true,%
+ localnumeral=khmernumerals%
+}
+\newif\if@khmer@numerals
+\def\tmp@khmer{khmer}
+\define@key{khmer}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue%
+ \else\@khmer@numeralsfalse\fi%
+}
+\setkeys{khmer}{numerals}
+\def\captionskhmer{%
+ \def\prefacename{អារម្ភកថា}%
+ \def\refname{ឯកសារយោង}%
+ \def\abstractname{សង្ខេប}%
+ \def\bibname{គន្ថនិទ្ទេស}%
+ \def\chaptername{ជំពូក}%
+ \def\appendixname{សេចក្ដីបន្ថែម}%
+ \def\contentsname{មាតិការ}%
+ \def\listfigurename{បញ្ជីរូបភាព}%
+ \def\listtablename{បញ្ជីតារាង}%
+ \def\indexname{សន្ទស្សន៍}%
+ \def\figurename{រូប}%
+ \def\tablename{តារាង}%
+ \def\partname{ផ្នែក}%
+ \def\pagename{ទំព័រ}%
+ \def\seename{មើល}%
+ \def\alsoname{មើលបន្ថែម}%
+ \def\enclname{ឯកសារភ្ជាប់}%
+ \def\ccname{ចម្លងជួន}%
+ \def\headtoname{ផ្ញើរទៅ}%
+ \def\proofname{សម្រាយ}%
+ \def\glossaryname{សទានុក្រម}%
+}
+\def\datekhmer{%
+ \def\khmer@month{%
+ \ifcase\month\or%
+ មករា\or%
+ កុម្ភៈ\or%
+ មិនា\or%
+ មេសា\or%
+ ឧសភា\or%
+ មិថុនា\or%
+ កក្កដា\or%
+ សីហា\or%
+ កញ្ញា\or%
+ តុលា\or%
+ វិច្ឆិកា\or%
+ ធ្នូ\fi}%
+ \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}%
+}
+\def\khmerdigits#1{\expandafter\@khmer@digits #1@}
+\def\@khmer@digits#1{%
+ \ifx @#1% then terminate
+ \else\ifx0#1០%
+ \else\ifx1#1១%
+ \else\ifx2#1២%
+ \else\ifx3#1៣%
+ \else\ifx4#1៤%
+ \else\ifx5#1៥%
+ \else\ifx6#1៦%
+ \else\ifx7#1៧%
+ \else\ifx8#1៨%
+ \else\ifx9#1៩%
+ \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\@khmer@digits%
+ \fi
+}
+
+\newcommand{\khmernumerals}[2]{\khmernumber{#2}}
+
+\def\khmernumber#1{%
+ \if@khmer@numerals%
+ \khmerdigits{\number#1}%
+ \else%
+ \number#1%
+ \fi}
+\def\khmer@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\khmernumber%
+ \renewcommand{\thefootnote}{\localnumeral*{footnote}}%
+}
+\def\nokhmer@globalnumbers{%
+ \let\@arabic\orig@arabic%
+}
+\def\thepart{\arabic{part}}
+\def\@khmeralph#1{%
+\ifcase#1%
+\or ក\or ខ\or គ\or ឃ\or ង%
+\or ច\or ឆ\or ជ\or ឈ\or ញ%
+\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
+\or ត\or ថ\or ទ\or ធ\or ន%
+\or ប\or ផ\or ព\or ភ\or ម%
+\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname}
+\def\@khmerAlph#1{%
+\ifcase#1%
+\or ក\or ខ\or គ\or ឃ\or ង%
+\or ច\or ឆ\or ជ\or ឈ\or ញ%
+\or ដ\or ឋ\or ឌ\or ឍ\or ណ%
+\or ត\or ថ\or ទ\or ធ\or ន%
+\or ប\or ផ\or ព\or ភ\or ម%
+\or យ\or រ\or ល\or វ\or ស\or ហ\or ឡ\or អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmer@numbers{%
+ \if@khmer@numerals
+ \let\@alph\@khmeralph%
+ \let\@Alph\@khmerAlph%
+ \fi%
+}
+\def\nokhmer@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+}
+\def\blockextras@khmer{%
+ \XeTeXlinebreaklocale "kh" %
+ \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt
+% \let\orig@baselinestretch\baselinestretch%
+% \renewcommand{\baselinestretch}{1.2}% not work
+}
+\def\noblockextras@khmer{%
+ \XeTeXlinebreaklocale "en"%
+% \let\baselinestretch\orig@baselinestretch%
+}
+\@ifclassloaded{beamer}{%
+ \usefonttheme{professionalfonts}%
+ \def\factname{ស្វ័យសត្យ}%
+ \def\lemmaname{បទគន្លិះ}%
+ \def\theoremname{ទ្រឹស្ដីបទ}%
+ \def\corollaryname{អនុសាធ្យ}%
+ \def\problemname{ចំណោទ}%
+ \def\solutionname{ដំណោះស្រាយ}%
+ \def\definitionname{និយមន័យ}%
+ \def\examplename{ឧទាហរណ៏}%
+ \uselanguage{khmer}%
+ \languagepath{khmer}%
+ \deftranslation[to=khmer]{Fact}{\factname}%
+ \deftranslation[to=khmer]{Lemma}{\lemmaname}%
+ \deftranslation[to=khmer]{Theorem}{\theoremname}%
+ \deftranslation[to=khmer]{Corollary}{\corollaryname}%
+ \deftranslation[to=khmer]{Problem}{\problemname}%
+ \deftranslation[to=khmer]{Solution}{\solutionname}%
+ \deftranslation[to=khmer]{Definition}{\definitionname}%
+ \deftranslation[to=khmer]{Definitions}{\definitionname}%
+ \deftranslation[to=khmer]{Example}{\examplename}%
+ \deftranslation[to=khmer]{Examples}{\examplename}%
+ \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
+ {\noexpand\headcommand{\noexpand\def\noexpand%
+ \inserttotalframenumber{\localnumeral*{framenumber}}}}}}%
+}{}
% \end{macrocode}
% \iffalse
%</gloss-khmer.ldf>
@@ -10245,18 +10253,18 @@ and may look very wrong.}
\setlanguagealias*{korean}{ko}
% variant : plain (0), classic (1), or modern (2)
-\define@choicekey{korean}{variant}[\val\nr]{plain,classic,modern}[plain]{%
- \let\xpg@korean@variant\nr
+\define@choicekey{korean}{variant}[\xpg@val\xpg@nr]{plain,classic,modern}[plain]{%
+ \let\xpg@korean@variant\xpg@nr
}
% captions : hangul (0) or hanja (1)
-\define@choicekey{korean}{captions}[\val\nr]{hangul,hanja}[hangul]{%
- \let\xpg@korean@captions\nr
+\define@choicekey{korean}{captions}[\xpg@val\xpg@nr]{hangul,hanja}[hangul]{%
+ \let\xpg@korean@captions\xpg@nr
}
% swapstrings: all (0), headings (1), headers (2), or none (3)
\newif\if@korean@swapheadings
\newif\if@korean@swapheaders
-\define@choicekey*+{korean}{swapstrings}[\val\nr]{all,headings,headers,none}[all]{%
- \ifcase\nr\relax
+\define@choicekey*+{korean}{swapstrings}[\xpg@val\xpg@nr]{all,headings,headers,none}[all]{%
+ \ifcase\xpg@nr\relax
% all:
\@korean@swapheadingstrue%
\@korean@swapheaderstrue%
@@ -10273,7 +10281,7 @@ and may look very wrong.}
\@korean@swapheadingsfalse%
\@korean@swapheadersfalse%
\fi
- \xpg@info{Option: Korean, swapstrings=\val}%
+ \xpg@info{Option: Korean, swapstrings=\xpg@val}%
}{\xpg@warning{Unknown Korean swapstrings value `#1'}}
% Register default options
@@ -10741,8 +10749,8 @@ and may look very wrong.}
\newif\if@kurdish@kurmanji
\def\kurdish@variant{sorani}
-\define@choicekey*+{kurdish}{variant}[\val\nr]{sorani,kurmanji}[sorani]{%
- \ifcase\nr\relax
+\define@choicekey*+{kurdish}{variant}[\xpg@val\xpg@nr]{sorani,kurmanji}[sorani]{%
+ \ifcase\xpg@nr\relax
% sorani:
\def\kurdish@variant{sorani}%
\@kurdish@kurmanjifalse%
@@ -10752,13 +10760,13 @@ and may look very wrong.}
\@kurdish@kurmanjitrue%
\fi
\kurdish@set@variety%
- \xpg@info{Option: kurdish, variant=\val}%
+ \xpg@info{Option: kurdish, variant=\xpg@val}%
}{\xpg@warning{Unknown Kurdish variant `#1'}}
\newif\if@kurdish@latin
\newif\if@kurdish@arabic
-\define@choicekey*+{kurdish}{script}[\val\nr]{Arabic,Latin}{%
- \ifcase\nr\relax
+\define@choicekey*+{kurdish}{script}[\xpg@val\xpg@nr]{Arabic,Latin}{%
+ \ifcase\xpg@nr\relax
% Arabic:
\@kurdish@latinfalse%
\@kurdish@arabictrue%
@@ -10768,7 +10776,7 @@ and may look very wrong.}
\@kurdish@arabicfalse%
\fi
\kurdish@set@variety%
- \xpg@info{Option: kurdish, script=\val}%
+ \xpg@info{Option: kurdish, script=\xpg@val}%
}{\xpg@warning{Unknown Kurdish script `#1'}}
@@ -11331,7 +11339,7 @@ and may look very wrong.}
%
% \subsection{gloss-latin.ldf}
% \begin{macrocode}
-\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.2 2020-01-03]
+\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.3 2020-03-08]
\ExplSyntaxOn
@@ -11433,9 +11441,10 @@ and may look very wrong.}
\str_case:Vn \l_polyglossia_latin_variant_str
{
{classic} {
- \str_if_eq:nnTF{#1}{liturgicallatin}
- { \adddialect \l@classiclatin { \use:c {l@#1} } }
- {}
+ \str_if_eq:nnF {#1} {classiclatin}
+ {
+ \adddialect \l@classiclatin { \use:c {l@#1} }
+ }
}
{medieval} { \adddialect \l@medievallatin { \use:c {l@#1} } }
{modern} { \adddialect \l@latin { \use:c {l@#1} } }
@@ -11641,10 +11650,15 @@ and may look very wrong.}
%%%%% Messages and commands concerning footnotes
-\cs_if_exist:NT \@makefntext
- {
- \cs_set_eq:NN \polyglossia_latin_original_footnote:n \@makefntext
- }
+% Save original footnote definition
+% Do this at the end of the preamble to catch other
+% packages' footnote changes (#391)
+\AtEndPreamble{%
+ \cs_if_exist:NT \@makefntext
+ {
+ \cs_set_eq:NN \polyglossia_latin_original_footnote:n \@makefntext
+ }
+}
% This is the footnote style as defined by the "ecclesiastic" package.
\cs_new:Npn \polyglossia_latin_variant_footnote:n #1
@@ -11947,9 +11961,12 @@ and may look very wrong.}
\shorthandoff {^}
\shorthandoff {=}
-% The active '=' character may cause problems with key=value interfaces.
+% The active = character may cause problems with key=value interfaces.
% We have to make sure here that no problems can occur outside a Latin
% prosodic shorthand environment.
+% The active ' character may cause problems with the unicode-math package
+% (in case Latin is used as a secondary language, see #394). We have to
+% turn it of if Latin is not the main language.
\protected@write \@auxout { } { \shorthandoff {=} } % for the aux file
@@ -11964,9 +11981,13 @@ and may look very wrong.}
}
{
% The following command should not be called if the main language
- % defines a '=' shorthand. However, there are no languages besides
+ % defines a = shorthand. However, there are no languages besides
% Latin defining such a shorthand in polyglossia.
\shorthandoff {=}
+ % The following command should not be called if the main language
+ % defines a ' shorthand. However, there are no languages besides
+ % Latin defining such a shorthand in polyglossia.
+ \shorthandoff {'}
}
}
@@ -11984,12 +12005,18 @@ and may look very wrong.}
\polyglossia_latin_apply_quotemark:N
}
}
+ % The ' shorthand is normally turned off to avoid problems with the unicode-math
+ % package. We have to turn it on here.
+ \shorthandon {'}
\bbl@activate {'}
\declare@shorthand {latin} {'}
{
\mode_if_math:TF
{
\active@math@prime % defined in "latex.ltx"
+ % This definition is differing from the primes of the unicode-math package.
+ % TO DO: Make sure that the appearance of primes is the same as with the
+ % unicode-math package if this package is loaded.
}
{
\polyglossia_latin_put_acute:N
@@ -12260,7 +12287,9 @@ and may look very wrong.}
\def \noextras@latin
{
- \polyglossia_latin_no_shorthands:
+ \iflatin@babelshorthands
+ \polyglossia_latin_no_shorthands:
+ \fi
\xpgla@savedvalues
\polyglossia_latin_no_punctuation_spacing:
\polyglossia_latin_modern_character_codes:
@@ -12728,8 +12757,8 @@ and may look very wrong.}
\providebool{malay@melayu}
\malay@melayufalse
\def\malay@variant{malay}
-\define@choicekey*+{malay}{variant}[\val\nr]{indonesian,malaysian}[malaysian]{%
- \ifcase\nr\relax
+\define@choicekey*+{malay}{variant}[\xpg@val\xpg@nr]{indonesian,malaysian}[malaysian]{%
+ \ifcase\xpg@nr\relax
% indonesian:
\def\malay@variant{indonesian}%
\malay@melayufalse
@@ -12775,7 +12804,7 @@ and may look very wrong.}
}%
}%
\fi
- \xpg@info{Option: malay, variant=\val}%
+ \xpg@info{Option: malay, variant=\xpg@val}%
}{\xpg@warning{Unknown malay variant `#1'}}
% Register default options
@@ -12998,15 +13027,15 @@ and may look very wrong.}
\newif\ifmarathi@devanagari@numerals
\marathi@devanagari@numeralstrue
-\define@choicekey*+{marathi}{numerals}[\val\nr]{Western,Devanagari}[Devanagari]{%
- \ifcase\nr\relax
+\define@choicekey*+{marathi}{numerals}[\xpg@val\xpg@nr]{Western,Devanagari}[Devanagari]{%
+ \ifcase\xpg@nr\relax
% Western:
\marathi@devanagari@numeralsfalse%
\or
% Devanagari:
\marathi@devanagari@numeralstrue%
\fi
- \xpg@info{Option: Marathi, numerals=\val}%
+ \xpg@info{Option: Marathi, numerals=\xpg@val}%
}{\xpg@warning{Unknown Marathi numerals value `#1'}}
% Register default options
@@ -13202,8 +13231,8 @@ and may look very wrong.}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{mongolian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{mongolian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -13220,7 +13249,7 @@ and may look very wrong.}
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Mongolian, numerals=\val}%
+ \xpg@info{Option: Mongolian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Mongolian numerals value `#1'}}
\define@boolkey{mongolian}[mongolian@]{babelshorthands}[true]{}
@@ -13612,8 +13641,8 @@ and may look very wrong.}
\setlanguagealias[variant=nynorsk]{norwegian}{nynorsk}
\def\norwegian@variant{nynorsk}
-\define@choicekey*+{norwegian}{variant}[\val\nr]{nynorsk,bokmal}[nynorsk]{%
- \ifcase\nr\relax
+\define@choicekey*+{norwegian}{variant}[\xpg@val\xpg@nr]{nynorsk,bokmal}[nynorsk]{%
+ \ifcase\xpg@nr\relax
% nynorsk:
\def\norwegian@variant{nynorsk}%
\SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn}%
@@ -13624,7 +13653,7 @@ and may look very wrong.}
\SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb}%
\xpg@fontsetup@latin{norwegian}%
\fi
- \xpg@info{Option: norwegian, variant=\val}%
+ \xpg@info{Option: norwegian, variant=\xpg@val}%
}{\xpg@warning{Unknown norwegian variant `#1'}}
@@ -14310,8 +14339,8 @@ and may look very wrong.}
\setlanguagealias[variant=brazilian]{portuguese}{brazil}
\def\portuguese@variant{portuges}
-\define@choicekey*+{portuguese}{variant}[\val\nr]{portuguese,brazilian}[portuguese]{%
- \ifcase\nr\relax
+\define@choicekey*+{portuguese}{variant}[\xpg@val\xpg@nr]{portuguese,brazilian}[portuguese]{%
+ \ifcase\xpg@nr\relax
% portuguese:
\def\portuguese@variant{portuges}%
\SetLanguageKeys{portuguese}{babelname=portuges,bcp47=pt-PT}%
@@ -14324,7 +14353,7 @@ and may look very wrong.}
I will use the standard patterns for Portuguese instead}%
\adddialect\l@brazil\l@portuges\relax}%
\fi
- \xpg@info{Option: portuguese, variant=\val}%
+ \xpg@info{Option: portuguese, variant=\xpg@val}%
}{\xpg@warning{Unknown portuguese variant `#1'}}
@@ -14565,8 +14594,8 @@ and may look very wrong.}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{russian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{russian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -14583,7 +14612,7 @@ and may look very wrong.}
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Russian, numerals=\val}%
+ \xpg@info{Option: Russian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Russian numerals value `#1'}}
\define@boolkey{russian}[russian@]{indentfirst}[true]{
@@ -14930,8 +14959,8 @@ and may look very wrong.}
% TODO: Add other Sami varieties
\def\sami@variant{northern}
-%\define@choicekey*+{sami}{variant}[\val\nr]{northern}[nothern]{%
-% \ifcase\nr\relax
+%\define@choicekey*+{sami}{variant}[\xpg@val\xpg@nr]{northern}[nothern]{%
+% \ifcase\xpg@nr\relax
% % northern:
% \def\sami@variant{samin}%
% \SetLanguageKeys{sami}{language=Northern Sami,langtag=NSM}%
@@ -14942,7 +14971,7 @@ and may look very wrong.}
% \SetLanguageKeys{sami}{language= Sami,langtag=}%
% \xpg@fontsetup@latin{sami}%
% \fi
-% \xpg@info{Option: sami, variant=\val}%
+% \xpg@info{Option: sami, variant=\xpg@val}%
%}{\xpg@warning{Unknown sami variant `#1'}}
@@ -15089,15 +15118,15 @@ and may look very wrong.}
\newif\ifsanskrit@devanagari@numerals
\sanskrit@devanagari@numeralstrue
-\define@choicekey*+{sanskrit}{numerals}[\val\nr]{Devanagari,Western}[Devanagari]{%
- \ifcase\nr\relax
+\define@choicekey*+{sanskrit}{numerals}[\xpg@val\xpg@nr]{Devanagari,Western}[Devanagari]{%
+ \ifcase\xpg@nr\relax
% Devanagari:
\sanskrit@devanagari@numeralstrue%
\or
% Western:
\sanskrit@devanagari@numeralsfalse%
\fi
- \xpg@info{Option: Sanskrit, numerals=\val}%
+ \xpg@info{Option: Sanskrit, numerals=\xpg@val}%
}{\xpg@warning{Unknown Sanskrit numeral `#1'}}
@@ -15227,8 +15256,8 @@ and may look very wrong.}
\setlanguagealias[script=Cyrillic]{serbian}{serbianc}
\newif\if@serbian@cyr
-\define@choicekey*+{serbian}{Script}[\val\nr]{cyrillic,latin}[cyrillic]{%
- \ifcase\nr\relax
+\define@choicekey*+{serbian}{Script}[\xpg@val\xpg@nr]{cyrillic,latin}[cyrillic]{%
+ \ifcase\xpg@nr\relax
% cyrillic:
\@serbian@cyrtrue
\SetLanguageKeys{serbian}{scripttag=cyrl,script=Cyrillic,babelname=serbianc,bcp47=sr-Cyrl}
@@ -15241,15 +15270,15 @@ and may look very wrong.}
%TODO \def\serbian@language{\language=\l@serbianlat}%
% or should we use Croatian patterns as a fallback for the time being???
\fi
- \xpg@info{Option: Serbian, script=\val}%
+ \xpg@info{Option: Serbian, script=\xpg@val}%
}{\xpg@warning{Unknown Serbian script `#1'}}
\define@key{serbian}{script}[Cyrillic]{\setkeys{serbian}{Script=#1}}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{serbian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{serbian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -15266,7 +15295,7 @@ and may look very wrong.}
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Serbian, numerals=\val}%
+ \xpg@info{Option: Serbian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Serbian numerals value `#1'}}
\setkeys{serbian}{Script,numerals}
@@ -15387,7 +15416,7 @@ and may look very wrong.}
\def\serbian@numbers{%
\let\latin@alph\@alph
\let\latin@Alph\@Alph
- \ifserbian@numerals
+ \ifcyrillic@numerals
\def\serbian@alph##1{\expandafter\serbiannumeral\expandafter{\the##1}}%
\def\serbian@Alph##1{\expandafter\Serbiannumeral\expandafter{\the##1}}%
\let\@alph\serbian@alph%
@@ -15401,11 +15430,11 @@ and may look very wrong.}
}
\def\blockextras@serbian{%
- \ifserbian@numerals\serbian@numbers\fi
+ \ifcyrillic@numerals\serbian@numbers\fi
}
\def\noextras@serbian{%
- \ifserbian@numerals\noserbian@numbers\fi
+ \ifcyrillic@numerals\noserbian@numbers\fi
}
\def\Asbuk#1{\expandafter\serbian@asbuk@Alph\csname c@#1\endcsname}
@@ -15831,8 +15860,8 @@ and may look very wrong.}
\setlanguagealias[variant=upper]{sorbian}{uppersorbian}
\def\sorbian@variant{usorbian}
-\define@choicekey*+{sorbian}{variant}[\val\nr]{upper,lower}[upper]{%
- \ifcase\nr\relax
+\define@choicekey*+{sorbian}{variant}[\xpg@val\xpg@nr]{upper,lower}[upper]{%
+ \ifcase\xpg@nr\relax
% upper:
\def\sorbian@variant{usorbian}%
\SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian,bcp47=hsb}%
@@ -15873,7 +15902,7 @@ and may look very wrong.}
}
}%
\fi
- \xpg@info{Option: sorbian, variant=\val}%
+ \xpg@info{Option: sorbian, variant=\xpg@val}%
}{\xpg@warning{Unknown sorbian variant `#1'}}
@@ -16018,8 +16047,8 @@ and may look very wrong.}
\newif\if@spanish@mexico
\@spanish@mexicofalse
-\define@choicekey*+{spanish}{variant}[\val\nr]{spanish,mexican}[spanish]{%
- \ifcase\nr\relax
+\define@choicekey*+{spanish}{variant}[\xpg@val\xpg@nr]{spanish,mexican}[spanish]{%
+ \ifcase\xpg@nr\relax
% spanish:
\@spanish@mexicofalse%
\SetLanguageKeys{spanish}{babelname=spanish,bcp47=es-ES}%
@@ -16028,7 +16057,7 @@ and may look very wrong.}
\@spanish@mexicotrue%
\SetLanguageKeys{spanish}{babelname=spanishmx,bcp47=es-MX}%
\fi
- \xpg@info{Option: spanish, variant=\val}%
+ \xpg@info{Option: spanish, variant=\xpg@val}%
}{\xpg@warning{Unknown spanish variant `#1'}}
% Localized math operators à la babel
@@ -16036,8 +16065,8 @@ and may look very wrong.}
\newif\ifspanish@spacedoperators
\newif\ifspanish@locoperators
-\define@choicekey*+{spanish}{spanishoperators}[\val\nr]{all,accented,spaced,none}[all]{%
- \ifcase\nr\relax
+\define@choicekey*+{spanish}{spanishoperators}[\xpg@val\xpg@nr]{all,accented,spaced,none}[all]{%
+ \ifcase\xpg@nr\relax
% all:
\spanish@locoperatorstrue%
\spanish@accentedoperatorstrue%
@@ -16058,7 +16087,7 @@ and may look very wrong.}
\spanish@accentedoperatorsfalse%
\spanish@spacedoperatorsfalse%
\fi
- \xpg@info{Option: Spanish, spanishoperators=\val}%
+ \xpg@info{Option: Spanish, spanishoperators=\xpg@val}%
}{\xpg@warning{Unknown spanishoperators value `#1'}}
@@ -17183,8 +17212,8 @@ and may look very wrong.}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{ukrainian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{ukrainian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -17201,7 +17230,7 @@ and may look very wrong.}
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Ukrainian, numerals=\val}%
+ \xpg@info{Option: Ukrainian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Ukrainian numerals value `#1'}}
@@ -17700,15 +17729,15 @@ and may look very wrong.}
\providebool{welsh@formaldate}
-\define@choicekey*+{welsh}{date}[\val\nr]{long,short}[short]{%
- \ifcase\nr\relax
+\define@choicekey*+{welsh}{date}[\xpg@val\xpg@nr]{long,short}[short]{%
+ \ifcase\xpg@nr\relax
% long:
\welsh@formaldatetrue
\or
% accented:
\welsh@formaldatefalse
\fi
- \xpg@info{Option: Welsh, date=\val}%
+ \xpg@info{Option: Welsh, date=\xpg@val}%
}{\xpg@warning{Unknown date value `#1'}}
% Register default options
@@ -19337,7 +19366,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.48 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -19346,7 +19375,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
(with a few languages incompletely supported for the latter). This version
-includes support for 79 different languages, some of which in different
+includes support for over 70 different languages, some of which in different
regional or national varieties, or using a different writing system.
Polyglossia makes it possible to automate the following tasks:
@@ -19385,6 +19414,26 @@ This is more efficient than contacting the maintainer by email as it allows me
to track the issues and follow progress.
%</../README>
%<*Changelog>
+1.48 (25-03-2020)
+
+No new features
+
+Bug fixes:
+ * Fix use of Hebrew with LuaLaTeX (#389).
+ * Do not overwrite footnote redefinitions of other packages
+ with Latin and French (#391)
+ * Fix Serbian cyrillic numerals code (#392).
+ * Fix [no]localmarks option, whose logic was swapped (part of #395).
+ * Protect localmarks function against uppercased language names (part of #395).
+ * Fix buggy redefinition of \@markright with option localmarks (#396).
+ * Fix incompatibility between Latin and unicode-math (#394).
+ * Make (undocumented) \defineshorthand command (imported from babel) work.
+ * Fix usage of localmarks option without value.
+ * Emergency fixes for bugs caused by updates in Babel’s switch.def (#399 and #400).
+
+Interface and defaults changes:
+ * Use private macros in keyval choice keys (#390).
+
1.47 (29-01-2020)
New features:
diff --git a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def
index c525455fc02..99b1923d956 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def
+++ b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def
@@ -139,14 +139,30 @@
%
% ------------------------------------------------------------------------------
%
-% line 108 from babel.def
+% lines 108 and 109 from babel.def
%
% ------------------------------------------------------------------------------
%
\def\bbl@csarg#1#2{\expandafter#1\csname bbl@#2\endcsname}%
+\def\bbl@cs#1{\csname bbl@#1\endcsname}%
+
+% ------------------------------------------------------------------------------
+%
+% lines 110 to 116 from babel.def
%
% ------------------------------------------------------------------------------
%
+
+\def\bbl@loop#1#2#3{\bbl@@loop#1{#3}#2,\@nnil,}
+\def\bbl@loopx#1#2{\expandafter\bbl@loop\expandafter#1\expandafter{#2}}
+\def\bbl@@loop#1#2#3,{%
+ \ifx\@nnil#3\relax\else
+ \def#1{#3}#2\bbl@afterfi\bbl@@loop#1{#2}%
+ \fi}
+\def\bbl@for#1#2#3{\bbl@loopx#1{#2}{\ifx#1\@empty\else#3\fi}}
+
+% ------------------------------------------------------------------------------
+%
% lines 125 to 130 from babel.def
%
% ------------------------------------------------------------------------------
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
index add8aa5cb30..042bbabf660 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-armenian.ldf
@@ -16,15 +16,15 @@
\newif\if@eastern@armenian
\@eastern@armenianfalse
-\define@choicekey*+{armenian}{variant}[\val\nr]{western,eastern}[western]{%
- \ifcase\nr\relax
+\define@choicekey*+{armenian}{variant}[\xpg@val\xpg@nr]{western,eastern}[western]{%
+ \ifcase\xpg@nr\relax
% western:
\@eastern@armenianfalse%
\or
% eastern:
\@eastern@armeniantrue%
\fi
- \xpg@info{Option: Armenian, variant=\val}%
+ \xpg@info{Option: Armenian, variant=\xpg@val}%
}{\xpg@warning{Unknown Armenian variant `#1'}}
\newif\if@armenian@numerals
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf
index f6c78ad7595..dad28a48535 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-belarusian.ldf
@@ -20,8 +20,8 @@
\setlanguagealias*{belarusian}{be}
\def\belarusian@spelling{modern}
-\define@choicekey*+{belarusian}{spelling}[\val\nr]{modern,classic,tarask}[modern]{%
- \ifcase\nr\relax
+\define@choicekey*+{belarusian}{spelling}[\xpg@val\xpg@nr]{modern,classic,tarask}[modern]{%
+ \ifcase\xpg@nr\relax
% modern:
\def\belarusian@spelling{modern}%
\SetLanguageKeys{belarusian}{bcp47=be}%
@@ -38,8 +38,8 @@
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{belarusian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{belarusian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -56,7 +56,7 @@
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Belarusian, numerals=\val}%
+ \xpg@info{Option: Belarusian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Belarusian numerals value `#1'}}
\define@boolkey{belarusian}[belarusian@]{babelshorthands}[true]{}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
index 802a7db00b1..94f56070905 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-bengali.ldf
@@ -30,8 +30,8 @@
\newif\ifbengali@devanagari@numerals
\newif\ifbengali@bengali@numerals
-\define@choicekey*+{bengali}{numerals}[\val\nr]{Devanagari,Bengali,Western}[Devanagari]{%
- \ifcase\nr\relax
+\define@choicekey*+{bengali}{numerals}[\xpg@val\xpg@nr]{Devanagari,Bengali,Western}[Devanagari]{%
+ \ifcase\xpg@nr\relax
% Devanagari:
\bengali@bengali@numeralsfalse%
\bengali@devanagari@numeralstrue%
@@ -44,7 +44,7 @@
\bengali@bengali@numeralsfalse%
\bengali@devanagari@numeralsfalse%
\fi
- \xpg@info{Option: Bengali, numerals=\val}%
+ \xpg@info{Option: Bengali, numerals=\xpg@val}%
}{\xpg@warning{Unknown Bengali numeral `#1'}}
\def\extras@bengali{}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
index 5e5db8a2f46..e7830363820 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
@@ -37,8 +37,8 @@
% Option ordinalmonthday
\define@boolkey{english}[english@]{ordinalmonthday}[true]{}
-\define@choicekey*+{english}{variant}[\val\nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
- \ifcase\nr\relax
+\define@choicekey*+{english}{variant}[\xpg@val\xpg@nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
+ \ifcase\xpg@nr\relax
% uk:
\british@hyphentrue
\british@dateformattrue
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
index 43040b0c70b..40b1a3a2442 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
@@ -22,8 +22,8 @@
\setlanguagealias[variant=canadian]{french}{canadien}
\def\french@variant{french}
-\define@choicekey*+{french}{variant}[\val\nr]{french,canadian,acadian,swiss}[french]{%
- \ifcase\nr\relax
+\define@choicekey*+{french}{variant}[\xpg@val\xpg@nr]{french,canadian,acadian,swiss}[french]{%
+ \ifcase\xpg@nr\relax
% french:
\def\french@variant{french}%
\SetLanguageKeys{french}{babelname=french,bcp47=fr-FR}%
@@ -53,7 +53,7 @@
\adddialect\l@swissfrench\l@french\relax%
\french@thincolonspacetrue
\fi
- \xpg@info{Option: French, variant=\val}%
+ \xpg@info{Option: French, variant=\xpg@val}%
}{\xpg@warning{Unknown French variant `#1'}}
@@ -76,7 +76,11 @@
\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
% Save original footnote definition
-\let\xpg@orig@makefntext\@makefntext
+% Do this at the end of the preamble to catch other
+% packages' footnote changes (#391)
+\AtEndPreamble{%
+ \let\xpg@orig@makefntext\@makefntext
+}
\define@boolkey{french}[french@]{frenchfootnote}[true]{%
\AfterPreamble{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf
index b9cdccd0d96..6823821a6b3 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-gaelic.ldf
@@ -18,8 +18,8 @@
\setlanguagealias[variant=scottish]{gaelic}{scottish}
\def\gaelic@variant{irish}
-\define@choicekey*+{gaelic}{variant}[\val\nr]{irish,scottish}[irish]{%
- \ifcase\nr\relax
+\define@choicekey*+{gaelic}{variant}[\xpg@val\xpg@nr]{irish,scottish}[irish]{%
+ \ifcase\xpg@nr\relax
% irish:
\gdef\gaelic@variant{irish}%
\SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish,bcp47=ga}%
@@ -30,7 +30,7 @@
\SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish,bcp47=gd}%
\xpg@fontsetup@latin{gaelic}%
\fi
- \xpg@info{Option: gaelic, variant=\val}%
+ \xpg@info{Option: gaelic, variant=\xpg@val}%
}{\xpg@warning{Unknown gaelic variant `#1'}}
% Register default options
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
index 0cf07c8c6da..12147e1a45b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
@@ -41,8 +41,8 @@
\newif\if@german@oldspelling
\@german@oldspellingfalse
-\define@choicekey*+{german}{spelling}[\val\nr]{new,old,1901,1996}[new]{%
- \ifcase\nr\relax
+\define@choicekey*+{german}{spelling}[\xpg@val\xpg@nr]{new,old,1901,1996}[new]{%
+ \ifcase\xpg@nr\relax
% new:
\@german@oldspellingfalse
\or
@@ -56,15 +56,15 @@
\@german@oldspellingfalse
\fi
\german@set@babelname%
- \xpg@info{Option: German, spelling=\val}%
+ \xpg@info{Option: German, spelling=\xpg@val}%
}{\xpg@warning{Unknown German spelling `#1'}}
\newif\if@austrian@locale
\@austrian@localefalse
\newif\if@swiss@locale
\@swiss@localefalse
-\define@choicekey*+{german}{variant}[\val\nr]{german,austrian,swiss}[german]{%
- \ifcase\nr\relax
+\define@choicekey*+{german}{variant}[\xpg@val\xpg@nr]{german,austrian,swiss}[german]{%
+ \ifcase\xpg@nr\relax
% german:
\@swiss@localefalse%
\@austrian@localefalse%
@@ -84,7 +84,7 @@
}%
\fi
\german@set@babelname%
- \xpg@info{Option: German, variant=\val}%
+ \xpg@info{Option: German, variant=\xpg@val}%
}{\xpg@warning{Unknown German variant `#1'}}
\def\german@set@babelname{%
@@ -134,8 +134,8 @@
}
\newif\if@german@blackletter
-\define@choicekey*+{german}{script}[\val\nr]{latin,blackletter,fraktur}[latin]{%
- \ifcase\nr\relax
+\define@choicekey*+{german}{script}[\xpg@val\xpg@nr]{latin,blackletter,fraktur}[latin]{%
+ \ifcase\xpg@nr\relax
% latin:
\@german@blackletterfalse%
\or
@@ -146,7 +146,7 @@
\@german@blacklettertrue%
\fi
\german@set@babelname%
- \xpg@info{Option: German, script=\val}%
+ \xpg@info{Option: German, script=\xpg@val}%
}{\xpg@warning{Unknown German script `#1'}}
% Option defunc'ed, as bot XeTeX and LuaTeX meanwhile
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
index a21d5909cba..a72e0a03334 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
@@ -115,19 +115,19 @@ and may look very wrong.}
% RTL. Hebrew uses LTR numbers, though. So we insert an LTR mark to revert
% the directionality
\ifxetex
- \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\if@nonlatin\char"200E \fi}
+ \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\ifbool{@nonlatin}{\char"200E }{}}
\fi
\def\hebrew@ltr@numbers{%
\ifxetex
- \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks}
+ \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks}%
\fi%
}
\def\nohebrew@ltr@numbers{%
\ifxetex
% This is bidi's original intervention
- \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}
+ \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}%
\fi%
}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
index 78403e33d6f..84a2c26e59f 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
@@ -20,8 +20,8 @@
\newif\if@hungarian@swapcaptions
\newif\if@hungarian@swapheadings
\newif\if@hungarian@swapheaders
-\define@choicekey*+{hungarian}{swapstrings}[\val\nr]{all,captions,headings,headers,hheaders,none}[all]{%
- \ifcase\nr\relax
+\define@choicekey*+{hungarian}{swapstrings}[\xpg@val\xpg@nr]{all,captions,headings,headers,hheaders,none}[all]{%
+ \ifcase\xpg@nr\relax
% all:
\@hungarian@swapcaptionstrue%
\@hungarian@swapheadingstrue%
@@ -52,7 +52,7 @@
\@hungarian@swapheadingsfalse%
\@hungarian@swapheadersfalse%
\fi
- \xpg@info{Option: Hungarian, swapstrings=\val}%
+ \xpg@info{Option: Hungarian, swapstrings=\xpg@val}%
}{\xpg@warning{Unknown Hungarian swapstrings value `#1'}}
% Register default options
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
index 5918062e7a9..9bab8fc2de2 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
@@ -15,18 +15,18 @@
\setlanguagealias*{korean}{ko}
% variant : plain (0), classic (1), or modern (2)
-\define@choicekey{korean}{variant}[\val\nr]{plain,classic,modern}[plain]{%
- \let\xpg@korean@variant\nr
+\define@choicekey{korean}{variant}[\xpg@val\xpg@nr]{plain,classic,modern}[plain]{%
+ \let\xpg@korean@variant\xpg@nr
}
% captions : hangul (0) or hanja (1)
-\define@choicekey{korean}{captions}[\val\nr]{hangul,hanja}[hangul]{%
- \let\xpg@korean@captions\nr
+\define@choicekey{korean}{captions}[\xpg@val\xpg@nr]{hangul,hanja}[hangul]{%
+ \let\xpg@korean@captions\xpg@nr
}
% swapstrings: all (0), headings (1), headers (2), or none (3)
\newif\if@korean@swapheadings
\newif\if@korean@swapheaders
-\define@choicekey*+{korean}{swapstrings}[\val\nr]{all,headings,headers,none}[all]{%
- \ifcase\nr\relax
+\define@choicekey*+{korean}{swapstrings}[\xpg@val\xpg@nr]{all,headings,headers,none}[all]{%
+ \ifcase\xpg@nr\relax
% all:
\@korean@swapheadingstrue%
\@korean@swapheaderstrue%
@@ -43,7 +43,7 @@
\@korean@swapheadingsfalse%
\@korean@swapheadersfalse%
\fi
- \xpg@info{Option: Korean, swapstrings=\val}%
+ \xpg@info{Option: Korean, swapstrings=\xpg@val}%
}{\xpg@warning{Unknown Korean swapstrings value `#1'}}
% Register default options
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf
index 8072041b3e6..5871a435a82 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-kurdish.ldf
@@ -34,8 +34,8 @@
\newif\if@kurdish@kurmanji
\def\kurdish@variant{sorani}
-\define@choicekey*+{kurdish}{variant}[\val\nr]{sorani,kurmanji}[sorani]{%
- \ifcase\nr\relax
+\define@choicekey*+{kurdish}{variant}[\xpg@val\xpg@nr]{sorani,kurmanji}[sorani]{%
+ \ifcase\xpg@nr\relax
% sorani:
\def\kurdish@variant{sorani}%
\@kurdish@kurmanjifalse%
@@ -45,13 +45,13 @@
\@kurdish@kurmanjitrue%
\fi
\kurdish@set@variety%
- \xpg@info{Option: kurdish, variant=\val}%
+ \xpg@info{Option: kurdish, variant=\xpg@val}%
}{\xpg@warning{Unknown Kurdish variant `#1'}}
\newif\if@kurdish@latin
\newif\if@kurdish@arabic
-\define@choicekey*+{kurdish}{script}[\val\nr]{Arabic,Latin}{%
- \ifcase\nr\relax
+\define@choicekey*+{kurdish}{script}[\xpg@val\xpg@nr]{Arabic,Latin}{%
+ \ifcase\xpg@nr\relax
% Arabic:
\@kurdish@latinfalse%
\@kurdish@arabictrue%
@@ -61,7 +61,7 @@
\@kurdish@arabicfalse%
\fi
\kurdish@set@variety%
- \xpg@info{Option: kurdish, script=\val}%
+ \xpg@info{Option: kurdish, script=\xpg@val}%
}{\xpg@warning{Unknown Kurdish script `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
index 085f1939bc0..0700ad2637d 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
@@ -1,4 +1,4 @@
-\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.2 2020-01-03]
+\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.3 2020-03-08]
\ExplSyntaxOn
@@ -100,9 +100,10 @@
\str_case:Vn \l_polyglossia_latin_variant_str
{
{classic} {
- \str_if_eq:nnTF{#1}{liturgicallatin}
- { \adddialect \l@classiclatin { \use:c {l@#1} } }
- {}
+ \str_if_eq:nnF {#1} {classiclatin}
+ {
+ \adddialect \l@classiclatin { \use:c {l@#1} }
+ }
}
{medieval} { \adddialect \l@medievallatin { \use:c {l@#1} } }
{modern} { \adddialect \l@latin { \use:c {l@#1} } }
@@ -308,10 +309,15 @@
%%%%% Messages and commands concerning footnotes
-\cs_if_exist:NT \@makefntext
- {
- \cs_set_eq:NN \polyglossia_latin_original_footnote:n \@makefntext
- }
+% Save original footnote definition
+% Do this at the end of the preamble to catch other
+% packages' footnote changes (#391)
+\AtEndPreamble{%
+ \cs_if_exist:NT \@makefntext
+ {
+ \cs_set_eq:NN \polyglossia_latin_original_footnote:n \@makefntext
+ }
+}
% This is the footnote style as defined by the "ecclesiastic" package.
\cs_new:Npn \polyglossia_latin_variant_footnote:n #1
@@ -614,9 +620,12 @@
\shorthandoff {^}
\shorthandoff {=}
-% The active '=' character may cause problems with key=value interfaces.
+% The active = character may cause problems with key=value interfaces.
% We have to make sure here that no problems can occur outside a Latin
% prosodic shorthand environment.
+% The active ' character may cause problems with the unicode-math package
+% (in case Latin is used as a secondary language, see #394). We have to
+% turn it of if Latin is not the main language.
\protected@write \@auxout { } { \shorthandoff {=} } % for the aux file
@@ -631,9 +640,13 @@
}
{
% The following command should not be called if the main language
- % defines a '=' shorthand. However, there are no languages besides
+ % defines a = shorthand. However, there are no languages besides
% Latin defining such a shorthand in polyglossia.
\shorthandoff {=}
+ % The following command should not be called if the main language
+ % defines a ' shorthand. However, there are no languages besides
+ % Latin defining such a shorthand in polyglossia.
+ \shorthandoff {'}
}
}
@@ -651,12 +664,18 @@
\polyglossia_latin_apply_quotemark:N
}
}
+ % The ' shorthand is normally turned off to avoid problems with the unicode-math
+ % package. We have to turn it on here.
+ \shorthandon {'}
\bbl@activate {'}
\declare@shorthand {latin} {'}
{
\mode_if_math:TF
{
\active@math@prime % defined in "latex.ltx"
+ % This definition is differing from the primes of the unicode-math package.
+ % TO DO: Make sure that the appearance of primes is the same as with the
+ % unicode-math package if this package is loaded.
}
{
\polyglossia_latin_put_acute:N
@@ -927,7 +946,9 @@
\def \noextras@latin
{
- \polyglossia_latin_no_shorthands:
+ \iflatin@babelshorthands
+ \polyglossia_latin_no_shorthands:
+ \fi
\xpgla@savedvalues
\polyglossia_latin_no_punctuation_spacing:
\polyglossia_latin_modern_character_codes:
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf
index be81a5829fd..a03227174e5 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-malay.ldf
@@ -25,8 +25,8 @@
\providebool{malay@melayu}
\malay@melayufalse
\def\malay@variant{malay}
-\define@choicekey*+{malay}{variant}[\val\nr]{indonesian,malaysian}[malaysian]{%
- \ifcase\nr\relax
+\define@choicekey*+{malay}{variant}[\xpg@val\xpg@nr]{indonesian,malaysian}[malaysian]{%
+ \ifcase\xpg@nr\relax
% indonesian:
\def\malay@variant{indonesian}%
\malay@melayufalse
@@ -72,7 +72,7 @@
}%
}%
\fi
- \xpg@info{Option: malay, variant=\val}%
+ \xpg@info{Option: malay, variant=\xpg@val}%
}{\xpg@warning{Unknown malay variant `#1'}}
% Register default options
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
index b644a43d5de..9e7d09d81c2 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
@@ -29,15 +29,15 @@ and may look very wrong.}
\newif\ifmarathi@devanagari@numerals
\marathi@devanagari@numeralstrue
-\define@choicekey*+{marathi}{numerals}[\val\nr]{Western,Devanagari}[Devanagari]{%
- \ifcase\nr\relax
+\define@choicekey*+{marathi}{numerals}[\xpg@val\xpg@nr]{Western,Devanagari}[Devanagari]{%
+ \ifcase\xpg@nr\relax
% Western:
\marathi@devanagari@numeralsfalse%
\or
% Devanagari:
\marathi@devanagari@numeralstrue%
\fi
- \xpg@info{Option: Marathi, numerals=\val}%
+ \xpg@info{Option: Marathi, numerals=\xpg@val}%
}{\xpg@warning{Unknown Marathi numerals value `#1'}}
% Register default options
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf
index dd113a2fabc..62b5ce7f3d0 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-mongolian.ldf
@@ -26,8 +26,8 @@
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{mongolian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{mongolian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -44,7 +44,7 @@
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Mongolian, numerals=\val}%
+ \xpg@info{Option: Mongolian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Mongolian numerals value `#1'}}
\define@boolkey{mongolian}[mongolian@]{babelshorthands}[true]{}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf
index a8d7a857847..59266d675d0 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf
@@ -16,8 +16,8 @@
\setlanguagealias[variant=nynorsk]{norwegian}{nynorsk}
\def\norwegian@variant{nynorsk}
-\define@choicekey*+{norwegian}{variant}[\val\nr]{nynorsk,bokmal}[nynorsk]{%
- \ifcase\nr\relax
+\define@choicekey*+{norwegian}{variant}[\xpg@val\xpg@nr]{nynorsk,bokmal}[nynorsk]{%
+ \ifcase\xpg@nr\relax
% nynorsk:
\def\norwegian@variant{nynorsk}%
\SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn}%
@@ -28,7 +28,7 @@
\SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb}%
\xpg@fontsetup@latin{norwegian}%
\fi
- \xpg@info{Option: norwegian, variant=\val}%
+ \xpg@info{Option: norwegian, variant=\xpg@val}%
}{\xpg@warning{Unknown norwegian variant `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf
index 1196bc4075f..a58e9784c30 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-portuguese.ldf
@@ -19,8 +19,8 @@
\setlanguagealias[variant=brazilian]{portuguese}{brazil}
\def\portuguese@variant{portuges}
-\define@choicekey*+{portuguese}{variant}[\val\nr]{portuguese,brazilian}[portuguese]{%
- \ifcase\nr\relax
+\define@choicekey*+{portuguese}{variant}[\xpg@val\xpg@nr]{portuguese,brazilian}[portuguese]{%
+ \ifcase\xpg@nr\relax
% portuguese:
\def\portuguese@variant{portuges}%
\SetLanguageKeys{portuguese}{babelname=portuges,bcp47=pt-PT}%
@@ -33,7 +33,7 @@
I will use the standard patterns for Portuguese instead}%
\adddialect\l@brazil\l@portuges\relax}%
\fi
- \xpg@info{Option: portuguese, variant=\val}%
+ \xpg@info{Option: portuguese, variant=\xpg@val}%
}{\xpg@warning{Unknown portuguese variant `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
index 0088a6438df..60681c5d034 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
@@ -38,8 +38,8 @@
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{russian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{russian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -56,7 +56,7 @@
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Russian, numerals=\val}%
+ \xpg@info{Option: Russian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Russian numerals value `#1'}}
\define@boolkey{russian}[russian@]{indentfirst}[true]{
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf
index 2e30cd953ed..ea62bc8b8f5 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sami.ldf
@@ -19,8 +19,8 @@
% TODO: Add other Sami varieties
\def\sami@variant{northern}
-%\define@choicekey*+{sami}{variant}[\val\nr]{northern}[nothern]{%
-% \ifcase\nr\relax
+%\define@choicekey*+{sami}{variant}[\xpg@val\xpg@nr]{northern}[nothern]{%
+% \ifcase\xpg@nr\relax
% % northern:
% \def\sami@variant{samin}%
% \SetLanguageKeys{sami}{language=Northern Sami,langtag=NSM}%
@@ -31,7 +31,7 @@
% \SetLanguageKeys{sami}{language= Sami,langtag=}%
% \xpg@fontsetup@latin{sami}%
% \fi
-% \xpg@info{Option: sami, variant=\val}%
+% \xpg@info{Option: sami, variant=\xpg@val}%
%}{\xpg@warning{Unknown sami variant `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
index daa34b398d2..07f4c3e4689 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
@@ -62,15 +62,15 @@ and may look very wrong.}
\newif\ifsanskrit@devanagari@numerals
\sanskrit@devanagari@numeralstrue
-\define@choicekey*+{sanskrit}{numerals}[\val\nr]{Devanagari,Western}[Devanagari]{%
- \ifcase\nr\relax
+\define@choicekey*+{sanskrit}{numerals}[\xpg@val\xpg@nr]{Devanagari,Western}[Devanagari]{%
+ \ifcase\xpg@nr\relax
% Devanagari:
\sanskrit@devanagari@numeralstrue%
\or
% Western:
\sanskrit@devanagari@numeralsfalse%
\fi
- \xpg@info{Option: Sanskrit, numerals=\val}%
+ \xpg@info{Option: Sanskrit, numerals=\xpg@val}%
}{\xpg@warning{Unknown Sanskrit numeral `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
index 11c774e5fe1..afcfba36aa2 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
@@ -27,8 +27,8 @@
\setlanguagealias[script=Cyrillic]{serbian}{serbianc}
\newif\if@serbian@cyr
-\define@choicekey*+{serbian}{Script}[\val\nr]{cyrillic,latin}[cyrillic]{%
- \ifcase\nr\relax
+\define@choicekey*+{serbian}{Script}[\xpg@val\xpg@nr]{cyrillic,latin}[cyrillic]{%
+ \ifcase\xpg@nr\relax
% cyrillic:
\@serbian@cyrtrue
\SetLanguageKeys{serbian}{scripttag=cyrl,script=Cyrillic,babelname=serbianc,bcp47=sr-Cyrl}
@@ -41,15 +41,15 @@
%TODO \def\serbian@language{\language=\l@serbianlat}%
% or should we use Croatian patterns as a fallback for the time being???
\fi
- \xpg@info{Option: Serbian, script=\val}%
+ \xpg@info{Option: Serbian, script=\xpg@val}%
}{\xpg@warning{Unknown Serbian script `#1'}}
\define@key{serbian}{script}[Cyrillic]{\setkeys{serbian}{Script=#1}}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{serbian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{serbian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -66,7 +66,7 @@
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Serbian, numerals=\val}%
+ \xpg@info{Option: Serbian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Serbian numerals value `#1'}}
\setkeys{serbian}{Script,numerals}
@@ -187,7 +187,7 @@
\def\serbian@numbers{%
\let\latin@alph\@alph
\let\latin@Alph\@Alph
- \ifserbian@numerals
+ \ifcyrillic@numerals
\def\serbian@alph##1{\expandafter\serbiannumeral\expandafter{\the##1}}%
\def\serbian@Alph##1{\expandafter\Serbiannumeral\expandafter{\the##1}}%
\let\@alph\serbian@alph%
@@ -201,11 +201,11 @@
}
\def\blockextras@serbian{%
- \ifserbian@numerals\serbian@numbers\fi
+ \ifcyrillic@numerals\serbian@numbers\fi
}
\def\noextras@serbian{%
- \ifserbian@numerals\noserbian@numbers\fi
+ \ifcyrillic@numerals\noserbian@numbers\fi
}
\def\Asbuk#1{\expandafter\serbian@asbuk@Alph\csname c@#1\endcsname}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf
index be24daa2bbf..53b1d3a6e15 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-sorbian.ldf
@@ -22,8 +22,8 @@
\setlanguagealias[variant=upper]{sorbian}{uppersorbian}
\def\sorbian@variant{usorbian}
-\define@choicekey*+{sorbian}{variant}[\val\nr]{upper,lower}[upper]{%
- \ifcase\nr\relax
+\define@choicekey*+{sorbian}{variant}[\xpg@val\xpg@nr]{upper,lower}[upper]{%
+ \ifcase\xpg@nr\relax
% upper:
\def\sorbian@variant{usorbian}%
\SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian,bcp47=hsb}%
@@ -64,7 +64,7 @@
}
}%
\fi
- \xpg@info{Option: sorbian, variant=\val}%
+ \xpg@info{Option: sorbian, variant=\xpg@val}%
}{\xpg@warning{Unknown sorbian variant `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
index d11286be63a..3a4cb2f08ac 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf
@@ -22,8 +22,8 @@
\newif\if@spanish@mexico
\@spanish@mexicofalse
-\define@choicekey*+{spanish}{variant}[\val\nr]{spanish,mexican}[spanish]{%
- \ifcase\nr\relax
+\define@choicekey*+{spanish}{variant}[\xpg@val\xpg@nr]{spanish,mexican}[spanish]{%
+ \ifcase\xpg@nr\relax
% spanish:
\@spanish@mexicofalse%
\SetLanguageKeys{spanish}{babelname=spanish,bcp47=es-ES}%
@@ -32,7 +32,7 @@
\@spanish@mexicotrue%
\SetLanguageKeys{spanish}{babelname=spanishmx,bcp47=es-MX}%
\fi
- \xpg@info{Option: spanish, variant=\val}%
+ \xpg@info{Option: spanish, variant=\xpg@val}%
}{\xpg@warning{Unknown spanish variant `#1'}}
% Localized math operators à la babel
@@ -40,8 +40,8 @@
\newif\ifspanish@spacedoperators
\newif\ifspanish@locoperators
-\define@choicekey*+{spanish}{spanishoperators}[\val\nr]{all,accented,spaced,none}[all]{%
- \ifcase\nr\relax
+\define@choicekey*+{spanish}{spanishoperators}[\xpg@val\xpg@nr]{all,accented,spaced,none}[all]{%
+ \ifcase\xpg@nr\relax
% all:
\spanish@locoperatorstrue%
\spanish@accentedoperatorstrue%
@@ -62,7 +62,7 @@
\spanish@accentedoperatorsfalse%
\spanish@spacedoperatorsfalse%
\fi
- \xpg@info{Option: Spanish, spanishoperators=\val}%
+ \xpg@info{Option: Spanish, spanishoperators=\xpg@val}%
}{\xpg@warning{Unknown spanishoperators value `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
index d63569b3021..7b82a76c775 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
@@ -22,8 +22,8 @@
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{ukrainian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\nr\relax
+\define@choicekey*+{ukrainian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
+ \ifcase\xpg@nr\relax
% arabic:
\cyrillic@numeralsfalse%
\cyrillic@asbuk@numeralsfalse%
@@ -40,7 +40,7 @@
\cyrillic@numeralstrue%
\cyrillic@asbuk@numeralstrue%
\fi
- \xpg@info{Option: Ukrainian, numerals=\val}%
+ \xpg@info{Option: Ukrainian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Ukrainian numerals value `#1'}}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
index bb2c9e87cca..c2b23de0aa7 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-welsh.ldf
@@ -13,15 +13,15 @@
\providebool{welsh@formaldate}
-\define@choicekey*+{welsh}{date}[\val\nr]{long,short}[short]{%
- \ifcase\nr\relax
+\define@choicekey*+{welsh}{date}[\xpg@val\xpg@nr]{long,short}[short]{%
+ \ifcase\xpg@nr\relax
% long:
\welsh@formaldatetrue
\or
% accented:
\welsh@formaldatefalse
\fi
- \xpg@info{Option: Welsh, date=\val}%
+ \xpg@info{Option: Welsh, date=\xpg@val}%
}{\xpg@warning{Unknown date value `#1'}}
% Register default options
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 118017d1f4f..1e872abb2f6 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2020/01/29 v1.47
+\ProvidesPackage{polyglossia}[2020/03/25 v1.48
Modern multilingual typesetting with XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}
@@ -301,7 +301,7 @@
\csdef{#1@language}{%
\polyglossia@setup@language@patterns{#1}%
}%
- % setup hypenmins
+ % setup hyphenmins
\exp_args:NNe \clist_set:Nn \l_tmpa_clist
{ \prop_item:Nn \polyglossia@langsetup {#1 / hyphenmins} }
\cs_if_eq:cNF {l@#1} \l@nohyphenation
@@ -959,34 +959,45 @@
%% ensure localization of \markright and \markboth commands
%%% THIS IS NOW DISABLED BY DEFAULT
-\newcommand{\local@marks}[1]{}
-\def\enable@local@marks{
+\cs_new_nopar:Nn {\polyglossia@local@marks:n} {}
+\cs_new_nopar:Nn {\polyglossia@enable@local@marks:}
+{
\xpg@info{Option:~ localmarks}%
- \def\local@marks##1{%
- \def\markboth####1####2{%
+ \cs_gset_nopar:Nn \polyglossia@local@marks:n
+ {%
+ \def\xpg@tmp@lang{##1}%
+ \DeclareRobustCommand\markboth[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}}}}%
+ {%
+ {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####1}}}%
+ {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\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}}}}}%
+ \if@nobreak\ifvmode\nobreak\fi\fi%
+ }%
+ \DeclareRobustCommand\markright[1]{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \expandafter\@markright\@themark
+ {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####1}}}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi%
+ }%
+% This part seems wrong (see #396 for explanation). Remove after a while.
+% \def\@markright####1####2####3{%
+% \@temptokena{\protect\@@ensure@maindir{####1}}%
+% \unrestored@protected@xdef\@themark{%
+% {\the\@temptokena}%
+% {\protect\@@ensure@maindir{####3}}%
+% }%
+% }%
+ }%
}
@@ -2021,7 +2032,7 @@
% via babelname (such as biblatex)
\cs_if_exist_use:c{captions@bbl@\babelname}%
\cs_if_exist_use:c{date@bbl@\babelname}%
- \local@marks{#2}%
+ \polyglossia@local@marks:n{#2}%
\csuse{init@extras@#2}%
\polyglossia@lang@indentfirst:n{#2}
\csuse{blockextras@#2}%
@@ -2141,7 +2152,7 @@
localmarks
.bool_set:N = \l_polyglossia_localmarks_bool,
localmarks
- .default:n = false,
+ .default:n = true,
% compatibility
nolocalmarks
.meta:n = { localmarks = false },
@@ -2171,8 +2182,8 @@
\gdef\xpg@info#1{\relax}% no polyglossia info
}
-\bool_if:nTF \l_polyglossia_localmarks_bool {} {
- \enable@local@marks{}
+\bool_if:nTF \l_polyglossia_localmarks_bool {
+ \polyglossia@enable@local@marks:
}{}
% compatibility