summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-04-09 20:30:34 +0000
committerKarl Berry <karl@freefriends.org>2022-04-09 20:30:34 +0000
commit6c470d1d7d65071defe8e0b9d8e90a935720fd17 (patch)
treec41dc94d0af4d225b23b537adc7993c146570c31 /Master/texmf-dist/tex/latex/polyglossia
parentdc3f6c27d3ca58b293c798446665a35176d9ffc0 (diff)
polyglossia (9apr22)
git-svn-id: svn://tug.org/texlive/trunk@62988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-latex.lde36
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf206
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty2
3 files changed, 240 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-latex.lde b/Master/texmf-dist/tex/latex/polyglossia/gloss-latex.lde
new file mode 100644
index 00000000000..fe217db47b3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-latex.lde
@@ -0,0 +1,36 @@
+\ProvidesLanguageDefinitionExtension{gloss-latex}{2021/07/10}{v1.53}{polyglossia: module for default language}
+
+\PolyglossiaSetup{latex}{
+ hyphennames={english},
+ hyphenmins={2,3},
+ langtag=ENG,
+ fontsetup=true,
+ % ignore command
+ DefineCommandsCmd={use_none:n}
+}
+
+\def\captionslatex{%
+ \def\prefacename{Preface}%
+ \def\refname{References}%
+ \def\abstractname{Abstract}%
+ \def\bibname{Bibliography}%
+ \def\chaptername{Chapter}%
+ \def\appendixname{Appendix}%
+ \def\contentsname{Contents}%
+ \def\listfigurename{List of Figures}%
+ \def\listtablename{List of Tables}%
+ \def\indexname{Index}%
+ \def\figurename{Figure}%
+ \def\tablename{Table}%
+ \def\partname{Part}%
+ \def\enclname{encl}%
+ \def\ccname{cc}%
+ \def\headtoname{To}%
+ \def\pagename{Page}%
+ \def\seename{see}%
+ \def\alsoname{see also}%
+ \def\proofname{Proof}%
+}
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
index 0649d087a92..d6305cf06ea 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf
@@ -1,4 +1,5 @@
\ProvidesFile{gloss-polish.ldf}[polyglossia: module for polish]
+
\PolyglossiaSetup{polish}{
bcp47=pl,
hyphennames={polish},
@@ -11,6 +12,186 @@
% BCP-47 compliant aliases
\setlanguagealias*{polish}{pl}
+\ifluatex
+ \RequirePackage{luavlna}
+\fi
+
+\define@boolkey{polish}[polish@]{babelshorthands}[true]{}
+
+\define@boolkey{polish}[polish@]{splithyphens}[true]{}
+
+\define@boolkey{polish}[polish@]{vlna}[true]{}
+
+% Register default options
+\xpg@initialize@gloss@options{polish}{babelshorthands=false,splithyphens=true,vlna=true}
+
+\ifsystem@babelshorthands
+ \setkeys{polish}{babelshorthands=true}
+\else
+ \setkeys{polish}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+ \input{babelsh.def}%
+ \initiate@active@char{"}%
+ \shorthandoff{"}%
+}{}
+
+\def\polish@@splhyphen#1{%
+ \def\polish@sh@tmp{%
+ \if\polish@sh@next-#1%
+ \else\expandafter\polish@@@splhyphen{#1}\fi%
+ }%
+ \futurelet\polish@sh@next\polish@sh@tmp%
+}
+
+\def\polish@@@splhyphen#1{%
+ \ifnum\hyphenchar \font>0%
+ \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
+ \nobreak\hskip\z@%
+ \else%
+ #1%
+ \fi%
+}
+
+\def\polish@splhyphen{%
+ \polish@@splhyphen{-}%
+}
+
+\def\polish@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{polish}%
+ \declare@shorthand{polish}{"=}{\polish@splhyphen}%
+ \declare@shorthand{polish}{""}{\hskip\z@skip}%
+ \declare@shorthand{polish}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{polish}{"-}{\nobreak\-\bbl@allowhyphens}%
+ \declare@shorthand{polish}{"|}{%
+ \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
+ \bbl@allowhyphens}{}%
+ }%
+ \declare@shorthand{polish}{"/}{\textormath
+ {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}}%
+ \declare@shorthand{polish}{"`}{„}%
+ \declare@shorthand{polish}{"'}{”}%
+ \declare@shorthand{polish}{"<}{«}%
+ \declare@shorthand{polish}{">}{»}%
+}
+
+\def\nopolish@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+
+\ifxetex
+ % splithyphens
+ \newXeTeXintercharclass\polish@hyphen % -
+ % vlna
+ \newXeTeXintercharclass\polish@openpunctuation
+ \newXeTeXintercharclass\polish@nonsyllabicpreposition
+ \ifdefined\e@alloc@intercharclass@top
+ \chardef\polish@boundary=\e@alloc@intercharclass@top
+ \else
+ \ifdefined\XeTeXinterwordspaceshaping
+ \chardef\polish@boundary=4095 %
+ \def\newXeTeXintercharclass{%
+ \e@alloc\XeTeXcharclass\chardef
+ \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}%
+ \else
+ \chardef\polish@boundary=255
+ \fi
+ \fi
+\fi
+
+\def\polish@hyphens{%
+ \ifluatex
+ \AfterPreamble{\enablesplithyphens{polish}}%
+ \else
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\- \polish@hyphen
+ \XeTeXinterchartoks \z@ \polish@hyphen = {\polish@@splhyphen}% "-" -> "\polish@@splhyphen-"
+ % necessary if used together with vlna:
+ \XeTeXinterchartoks \polish@nonsyllabicpreposition \polish@hyphen = {\polish@@splhyphen}% "-" -> "\polish@@splhyphen-"
+ \fi%
+}
+
+\def\nopolish@hyphens{%
+ \ifluatex
+ \AfterPreamble{\disablesplithyphens{polish}}%
+ \else
+ \XeTeXcharclass `\- \z@
+ \fi%
+}
+
+% Add nonbreakable space after single-letter word to
+% prevent them to land at the end of a line
+% vlna code taken and adapted from xevlna.sty
+\ifxetex
+ \def\polish@nointerchartoks{\let\polish@interchartoks\polish@PreCSpreposition}%
+ \def\polish@PreCSpreposition{%
+ \def\next{}%
+ \ifnum\catcode`\ =10 % nothing will be done in verbatim
+ \ifmmode % nothing in math
+ \else
+ \let\polish@interchartoks\polish@nointerchartoks
+ \let\next\polish@ExamineCSpreposition
+ \fi\fi
+ \next%
+ }%
+ \def\polish@ExamineCSpreposition #1{#1\futurelet\next\polish@ProcessCSpreposition}%
+ \def\polish@ProcessCSpreposition{\ifx\next\polish@XeTeXspace\nobreak\fi}%
+ \futurelet\polish@XeTeXspace{ }\polish@nointerchartoks
+\fi
+
+\def\polish@vlna{%
+ \ifluatex
+ \singlechars{polish}{AaIiOoUuWwZz}
+ \preventsingleon
+ \else
+ % Code taken and adapted from xevlna.sty
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\( \polish@openpunctuation
+ \XeTeXcharclass `\[ \polish@openpunctuation
+ \XeTeXcharclass `\„ \polish@openpunctuation
+ \XeTeXcharclass `\« \polish@openpunctuation
+ \XeTeXcharclass `\W \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\w \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\Z \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\z \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\O \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\o \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\U \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\u \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\A \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\a \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\I \polish@nonsyllabicpreposition
+ \XeTeXcharclass `\i \polish@nonsyllabicpreposition
+ \XeTeXinterchartoks \polish@boundary \polish@nonsyllabicpreposition {\polish@interchartoks}%
+ \XeTeXinterchartoks \polish@openpunctuation \polish@nonsyllabicpreposition {\polish@interchartoks}%
+ \fi
+}
+
+\def\nopolish@vlna{%
+ \ifluatex
+ \preventsingleoff
+ \else
+ \XeTeXcharclass`\(\z@
+ \XeTeXcharclass`\[\z@
+ \XeTeXcharclass`\„\z@
+ \XeTeXcharclass`\«\z@
+ \XeTeXcharclass`\W\z@
+ \XeTeXcharclass`\w\z@
+ \XeTeXcharclass`\Z\z@
+ \XeTeXcharclass`\z\z@
+ \XeTeXcharclass`\O\z@
+ \XeTeXcharclass`\o\z@
+ \XeTeXcharclass`\U\z@
+ \XeTeXcharclass`\u\z@
+ \XeTeXcharclass`\A\z@
+ \XeTeXcharclass`\a\z@
+ \XeTeXcharclass`\I\z@
+ \XeTeXcharclass`\i\z@
+ \fi
+}
+
\def\captionspolish{%
\def\prefacename{Przedmowa}%
\def\refname{Literatura}%
@@ -32,8 +213,8 @@
\def\seename{Zobacz}%
\def\alsoname{Zobacz też}%
\def\proofname{Dowód}%
- \def\glossaryname{Glossary}% <-- Needs translation
- }
+ \def\glossaryname{Słowniczek}%
+}
\def\datepolish{%
\def\today{\number\day\space\ifcase\month\or
@@ -41,6 +222,25 @@
lipca\or sierpnia\or września\or października\or
listopada\or grudnia\fi\space
\number\year}%
- }
+}
+
+\def\noextras@polish{%
+ \ifpolish@babelshorthands\nopolish@shorthands\fi%
+ \nopolish@hyphens%
+ \nopolish@vlna%
+ \ifxetex\XeTeXinterchartokenstate=0\fi%
+}
+
+\def\blockextras@polish{%
+ \ifpolish@babelshorthands\polish@shorthands\else\nopolish@shorthands\fi%
+ \ifpolish@vlna\polish@vlna\else\nopolish@vlna\fi%
+ \ifpolish@splithyphens\polish@hyphens\else\nopolish@hyphens\fi%
+}
+
+\def\inlineextras@polish{%
+ \ifpolish@babelshorthands\polish@shorthands\else\nopolish@shorthands\fi%
+ \ifpolish@vlna\polish@vlna\else\nopolish@vlna\fi%
+ \ifpolish@splithyphens\polish@hyphens\else\nopolish@hyphens\fi%
+}
\endinput
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 87196b182f5..4108c599b68 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}[2022/03/27 v1.54
+\ProvidesPackage{polyglossia}[2022/04/09 v1.55
Modern multilingual typesetting with XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}