summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf50
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf95
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf2
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty32
5 files changed, 160 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
index fdc720bc001..3d08e2207f3 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-albanian.ldf
@@ -19,7 +19,7 @@
\def\prefacename{Parathenia}%
\def\chaptername{Kapitulli}%
\def\appendixname{Shtesa}%
- \def\contentsname{Përmbajta}%
+ \def\contentsname{Përmbajtja}%
\def\listfigurename{Figurat}%
\def\listtablename{Tabelat}%
\def\indexname{Indeksi}%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
index 4a698be9fa7..aae310ca027 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
@@ -12,12 +12,18 @@
% BCP-47 compliant aliases
\setlanguagealias*{croatian}{hr}
+\ifluatex
+ \RequirePackage{luavlna}
+\fi
+
\define@boolkey{croatian}[croatian@]{babelshorthands}[true]{}
\define@boolkey{croatian}[croatian@]{disableligatures}[true]{}
+\define@boolkey{croatian}[croatian@]{splithyphens}[true]{}
+
% Register default options
-\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disableligatures=false}
+\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disableligatures=false,splithyphens=true}
\ifsystem@babelshorthands
\setkeys{croatian}{babelshorthands=true}
@@ -31,6 +37,19 @@
\shorthandoff{"}%
}{}
+\def\croatian@@splhyphen#1{%
+ \ifnum\hyphenchar \font>0%
+ \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
+ \nobreak\hskip\z@%
+ \else%
+ #1%
+ \fi%
+}
+
+\def\croatian@splhyphen{%
+ \croatian@@splhyphen{-}%
+}
+
\def\croatian@shorthands{%
\bbl@activate{"}%
\def\language@group{croatian}%
@@ -60,6 +79,32 @@
\@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
}
+\ifxetex
+ % splithyphens
+ \newXeTeXintercharclass\croatian@hyphen % -
+ \newXeTeXintercharclass\croatian@nonsyllabicpreposition%
+\fi
+
+\def\croatian@hyphens{%
+ \ifluatex
+ \AfterPreamble{\enablesplithyphens{croatian}}%
+ \else
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\- \croatian@hyphen
+ \XeTeXinterchartoks \z@ \croatian@hyphen = {\croatian@@splhyphen}% "-" -> "\croatian@@splhyphen-"
+ % necessary if used together with vlna:
+ \XeTeXinterchartoks \croatian@nonsyllabicpreposition \croatian@hyphen = {\croatian@@splhyphen}% "-" -> "\croatian@@splhyphen-"
+ \fi%
+}
+
+\def\nocroatian@hyphens{%
+ \ifluatex
+ \AfterPreamble{\disablesplithyphens{croatian}}%
+ \else
+ \XeTeXcharclass `\- \z@
+ \fi%
+}
+
\newcommand*\hr@charifavailable[2]{%
\ifcroatian@disableligatures
\bgroup#2\egroup%
@@ -164,14 +209,17 @@
\def\noextras@croatian{%
\ifcroatian@babelshorthands\nocroatian@shorthands\fi%
+ \nocroatian@hyphens%
}
\def\blockextras@croatian{%
\ifcroatian@babelshorthands\croatian@shorthands\fi%
+ \ifcroatian@splithyphens\croatian@hyphens\else\nocroatian@hyphens\fi%
}
\def\inlineextras@croatian{%
\ifcroatian@babelshorthands\croatian@shorthands\fi%
+ \ifcroatian@splithyphens\croatian@hyphens\else\nocroatian@hyphens\fi%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
index 40b1a3a2442..8048c93ae83 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
@@ -104,6 +104,9 @@
\define@boolkey{french}[french@]{autospacing}[true]{}
\french@autospacingtrue
+\define@boolkey{french}[french@]{frenchpart}[true]{}
+\french@frenchparttrue
+
\newif\iffrench@autospaceguillemets
\define@boolkey{french}[french@]{autospaceguillemets}[true]{}
\french@autospaceguillemetstrue
@@ -203,7 +206,7 @@
\let\ttfamily\french@ttfamilyORI
}
-\def\xpg@french@thinsp{\kern 0.5\fontdimen2\font}
+\def\xpg@french@thinsp{\kern 0.5\fontdimen2\font\nobreak\hskip\z@skip}
\def\french@punctuation{%
\lccode"2019="2019
@@ -326,14 +329,11 @@
\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{\@Fpt partie}%
- \def\partname{}%
+ \iffrench@frenchpart
+ \def\partname{partie}%
+ \else
+ \def\partname{Partie}%
+ \fi%
\def\pagename{page}%
\def\seename{\emph{voir}}%
\def\alsoname{\emph{voir aussi}}%
@@ -353,9 +353,83 @@
décembre\fi
\space \number\year}}
+\def\xpg@french@part{\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}%
+
+\def\french@capsformat{%
+ % Change part heading
+ % With titlesec
+ \ifcsdef{titleformat}{%
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\xpg@french@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for French}}%
+ }{}%
+ }{% (not \ifdefined\titleformat)
+ % With KOMA
+ \ifcsdef{sectionformat}{%
+ \ifcsdef{partformat}{%
+ \let\xpg@save@part@format\partformat%
+ \renewcommand{\partformat}{\xpg@french@part~\partname}%
+ }{}%
+ }{% (not \ifdefined\sectionformat)
+ % With memoir
+ \ifcsdef{@memptsize}{%
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+ {\partnamefont\xpg@french@part\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for French}}%
+ }{}%
+ }{% (not \ifdefined\@memptsize)
+ % With standard classes
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\xpg@french@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for French}}%
+ }{}% (end \ifdefined\@part)
+ }% (end \ifdefined\@memptsize)
+ }% (end \ifdefined\sectionformat)
+ }% (end \ifdefined\titleformat)
+}
+
+\def\nofrench@capsformat{%
+ % Reset chapter and part heading
+ \ifcsdef{titleformat}{%
+ % With titlesec
+ \ifcsdef{xpg@save@part@format}{%
+ \let\@part\xpg@save@part@format
+ }{}%
+ }{% (not \ifdefined\titleformat)
+ \ifcsdef{sectionformat}{%
+ % With KOMA
+ \ifcsdef{xpg@save@part@format}{%
+ \let\partformat\xpg@save@part@format
+ }{}%
+ }{%
+ % With memoir and standard classes
+ \ifcsdef{xpg@save@part@format}{%
+ \let\@part\xpg@save@part@format
+ }{}%
+ }% (end \ifdefined\sectionformat)
+ }% (end \ifdefined\titleformat)
+}
+
\def\noextras@french{%
\nofrench@punctuation%
\nofrench@fontsetup%
+ \nofrench@capsformat%
}
\def\blockextras@french{%
@@ -363,6 +437,9 @@
\french@punctuation%
\fi
\french@fontsetup%
+ \iffrench@frenchpart
+ \french@capsformat%
+ \fi%
}
\def\inlineextras@french{%
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
index 2c69288d635..6c9f5bbe11a 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf
@@ -115,7 +115,7 @@
% Bidi inserts an RTL mark (0x200f) between number and number separator (- .),
% forcing numbers to RTL. This is wrong for Hebrew.
% So we defunc the respective command.
- \renewcommand*{\DigitsDotDashInterCharToks}{}
+ \renewcommand*{\DigitsDotDashInterCharToks}{}%
\fi%
}
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 03b2db77e92..7aee393a353 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/10/15 v1.50a
+\ProvidesPackage{polyglossia}[2020/12/08 v1.51
Modern multilingual typesetting with XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}
@@ -10,19 +10,23 @@
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
\RequirePackage{xparse}
-\RequirePackage{filehook}
+
+% fontspec now uses LaTeX3 packages such as expl3, so we need this:
+\ExplSyntaxOn
+
+% Execute code #3 if package #1 has been loaded already, else
+% add to package hook #2
+\newcommand\xpg@at@package[3]{%
+ \@ifpackageloaded{#1}{#3}{\AddToHook{#2}{#3}}%
+}
% correct a bug in tracklang
-\AtBeginOfPackageFile*{tracklang}{
+\xpg@at@package{tracklang}{file/after/tracklang.sty}{%
\@ifpackagelater{tracklang}{2019/08/30}{}{\global\def\AddTrackedLangage{\AddTrackedLanguage}}
}
-% fontspec now uses LaTeX3 packages such as expl3, so we need this:
-\ExplSyntaxOn
-
%% 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
\def\bbl@cs#1{\csname bbl@#1\endcsname}%
\AtEndPreamble{\let\bbl@set@language\xpg@set@language@aux} %for biblatex
@@ -168,7 +172,7 @@
{}%
{\xpg@error{Unknown~ language~ direction~ #1 ~(base~ wrapper)}}%
}
-\AtEndOfPackageFile*{bidi}{%
+\xpg@at@package{bidi}{package/after/bidi}{%
\ExplSyntaxOn%
\cs_gset_nopar:Nn{\polyglossia@setpardirection:n}{%
\str_case_e:nnTF{#1}{%
@@ -188,7 +192,7 @@
}%
\ExplSyntaxOff%
}
-\AtEndOfPackageFile*{luabidi}{%
+\xpg@at@package{luabidi}{package/after/luabidi}{%
\ExplSyntaxOn%
\cs_gset_nopar:Nn{\polyglossia@setpardirection:n}{%
\str_case_e:nnTF{#1}{%
@@ -1153,6 +1157,16 @@
\newcommand{\setdefaultlanguage}[2][]{%
+ % latex is an internal language, so do not record
+ \ifstrequal{#2}{latex}{}{%
+ % register polyglossia language name
+ \ifcsundef{#2@registered}{%
+ \global\edef\xpg@loaded{%
+ \ifx\xpg@loaded\@empty\else\xpg@loaded,\fi #2%
+ }%
+ }{}%
+ \csgdef{#2@registered}{}%
+ }%
\ifcsundef{#2@loaded}%
{
\polyglossia_load_lang_definition:nn{#1}{#2}