From 01f3d11f566adcadedd4374cf8c6aaeacd975d21 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 11 Apr 2020 22:35:29 +0000 Subject: polyglossia (9apr20) git-svn-id: svn://tug.org/texlive/trunk@54664 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/polyglossia/README | 49 --- Master/texmf-dist/doc/latex/polyglossia/README.md | 42 +++ .../doc/latex/polyglossia/example-arabic.pdf | Bin 70234 -> 70318 bytes .../doc/latex/polyglossia/example-korean.pdf | Bin 17281 -> 17271 bytes .../doc/latex/polyglossia/example-thai.pdf | Bin 23452 -> 23326 bytes .../texmf-dist/doc/latex/polyglossia/examples.pdf | Bin 150167 -> 150624 bytes .../doc/latex/polyglossia/polyglossia.pdf | Bin 268164 -> 269164 bytes .../doc/latex/polyglossia/polyglossia.tex | 11 + .../source/latex/polyglossia/polyglossia.dtx | 392 +++++++++++---------- .../texmf-dist/tex/latex/polyglossia/babelsh.def | 3 +- .../tex/latex/polyglossia/gloss-finnish.ldf | 2 +- .../tex/latex/polyglossia/gloss-greek.ldf | 2 +- .../tex/latex/polyglossia/gloss-hungarian.ldf | 4 +- .../tex/latex/polyglossia/gloss-khmer.ldf | 204 +++++------ .../tex/latex/polyglossia/polyglossia.sty | 17 +- 15 files changed, 378 insertions(+), 348 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/polyglossia/README create mode 100644 Master/texmf-dist/doc/latex/polyglossia/README.md diff --git a/Master/texmf-dist/doc/latex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README deleted file mode 100644 index acac78e598b..00000000000 --- a/Master/texmf-dist/doc/latex/polyglossia/README +++ /dev/null @@ -1,49 +0,0 @@ - - ¦----------------------------------------------¦ - ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.48 ¦ - ¦ ¦ - ¦ Modern multilingual typesetting ¦ - ¦ with XeLaTeX and LuaLaTeX ¦ - ¦ ¦ - ¦----------------------------------------------¦ - -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 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: - -* Loading the appropriate hyphenation patterns. -* Setting the script and language tags of the current font (if possible and - available), using the package fontspec. -* Switching to a font assigned by the user to a particular script or language. -* Adjusting some typographical conventions in function of the current language - (such as afterindent, frenchindent, spaces before or after punctuation marks, - etc.). -* Redefining the document strings (like “chapter”, “figure”, “bibliography”). -* Adapting the formatting of dates (for non-gregorian calendars via external - packages bundled with polyglossia: currently the Hebrew, Islamic and Farsi - calendars are supported). -* For languages that have their own numeration system, modifying the formatting - of numbers appropriately. -* Ensuring the proper directionality if the document contains languages - written from right to left (via the packages bidi and luabidi, available - separately). - -LICENSE - -Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, -Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller - -Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence -(https://opensource.org/licenses/MIT). - -BUGS - -If you run into a bug, or suspect you do, or you have a request or comment, please -use the GitHub issue tracker: http://github.com/reutenauer/polyglossia/issues - -This is more efficient than contacting the maintainer by email as it allows me -to track the issues and follow progress. diff --git a/Master/texmf-dist/doc/latex/polyglossia/README.md b/Master/texmf-dist/doc/latex/polyglossia/README.md new file mode 100644 index 00000000000..79b922ef93b --- /dev/null +++ b/Master/texmf-dist/doc/latex/polyglossia/README.md @@ -0,0 +1,42 @@ +# THE POLYGLOSSIA PACKAGE v1.49 +## Multilingual typesetting with XeLaTeX and LuaLaTeX + +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 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: + +* Loading the appropriate hyphenation patterns. +* Setting the script and language tags of the current font (if possible and + available), using the package fontspec. +* Switching to a font assigned by the user to a particular script or language. +* Adjusting some typographical conventions in function of the current language + (such as afterindent, frenchindent, spaces before or after punctuation marks, + etc.). +* Redefining the document strings (like “chapter”, “figure”, “bibliography”). +* Adapting the formatting of dates (for non-gregorian calendars via external + packages bundled with polyglossia: currently the Hebrew, Islamic and Farsi + calendars are supported). +* For languages that have their own numeration system, modifying the formatting + of numbers appropriately. +* Ensuring the proper directionality if the document contains languages + written from right to left (via the packages bidi and luabidi, available + separately). + +# LICENCE + +Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, +Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller + +Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence +(https://opensource.org/licenses/MIT). + +# BUGS + +If you run into a bug, or suspect you do, or you have a request or comment, please +use the GitHub issue tracker: http://github.com/reutenauer/polyglossia/issues + +This is more efficient than contacting the maintainer by email as it allows me +to track the issues and follow progress. diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf index 41654eb6a2f..1029c5440bb 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf and b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf index 96acc681eb1..f7f05b2f7da 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf and b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf index 483619ac82e..b479b45bb09 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf and b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf index 56f11105e05..21f2f2a0249 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf and b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf index 6ac006692b1..6c1979411b4 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf and b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex index 67eec479ec5..92cc3179b7d 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex +++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex @@ -1821,6 +1821,17 @@ For instance, to add a new caption \cmd\footnotename\ to the Swiss variety of Ge If you do this in a document preamble rather than in a package, you need to embrace the redefinition by \cmd\makeatletter\ and \cmd\makeatother\ due to the ¦@¦ in the macro names. +Finally, as soon as the language has been switched (either inline or as a block), \pkg{polyglossia} +executes the (by default empty) hook +\begin{itemize} + \item \Cmd{\polyglossia@language@switched} +\end{itemize} +to which you can append arbitrary code (via \cmd\gappto) that should be executed if (a particular) +language is being activated. This is done before any of the above +macros are issued (so you can still alter them), but at a point where \cmd\languagename, \cmd\babelname\ +and \cmd\languageid\ are already set, so you can condition on specific languages in your code. +This hook is particularly provided for package authors. + \section{Script-specific numbering} Languages and scripts have specific numbering conventions. Some use decimal digits diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx index ad0a94e9491..246c37edb00 100644 --- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx +++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx @@ -1,6 +1,6 @@ %\iffalse % polyglossia.dtx generated using mkpolyglossiadtx.pl -% (derived from makedtx.pl version 0.94b (c) Nicola Talbot) +% (derived from makedtx.pl version 1.49 (c) Nicola Talbot) % % To extract the files, use xetex polyglossia.dtx or luatex polyglossia.dtx % @@ -8,15 +8,8 @@ \iffalse % %<*README> - - ¦----------------------------------------------¦ - ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.48 ¦ - ¦ ¦ - ¦ Modern multilingual typesetting ¦ - ¦ with XeLaTeX and LuaLaTeX ¦ - ¦ ¦ - ¦----------------------------------------------¦ +# THE POLYGLOSSIA PACKAGE v1.49 +## Multilingual typesetting with XeLaTeX and LuaLaTeX This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX (with a few languages incompletely supported for the latter). This version @@ -42,7 +35,7 @@ Polyglossia makes it possible to automate the following tasks: written from right to left (via the packages bidi and luabidi, available separately). -LICENSE +# LICENCE Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller @@ -50,7 +43,7 @@ Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence (https://opensource.org/licenses/MIT). -BUGS +# BUGS If you run into a bug, or suspect you do, or you have a request or comment, please use the GitHub issue tracker: http://github.com/reutenauer/polyglossia/issues @@ -74,8 +67,10 @@ to track the issues and follow progress. The polyglossia package (C) 2008–2010 François Charette - (C) 2011-2020 Arthur Reutenauer + (C) 2011–2020 Arthur Reutenauer (C) 2013 Elie Roux + (C) 2019 Bastien Roucariès + (C) 2019–2020 Jürgen Spitzmüller License information appended @@ -351,7 +346,7 @@ to track the issues and follow progress. %<*internal> \generate{\file{polyglossia.ins}{\from{polyglossia.dtx}{batchfile}}} \nopreamble\nopostamble -\generate{\file{../README}{\from{polyglossia.dtx}{../README}}} +\generate{\file{../README.md}{\from{polyglossia.dtx}{../README.md}}} \generate{\file{Changelog}{\from{polyglossia.dtx}{Changelog}}} \generate{\file{examples.tex}{\from{polyglossia.dtx}{examples.tex}}} \generate{\file{example-arabic.tex}{\from{polyglossia.dtx}{example-arabic.tex}}} @@ -2194,6 +2189,17 @@ to track the issues and follow progress. % If you do this in a document preamble rather than in a package, you need to embrace the redefinition % by \cmd\makeatletter\ and \cmd\makeatother\ due to the ¦@¦ in the macro names. % +% Finally, as soon as the language has been switched (either inline or as a block), \pkg{polyglossia} +% executes the (by default empty) hook +% \begin{itemize} +% \item \Cmd{\polyglossia@language@switched} +% \end{itemize} +% to which you can append arbitrary code (via \cmd\gappto) that should be executed if (a particular) +% language is being activated. This is done before any of the above +% macros are issued (so you can still alter them), but at a point where \cmd\languagename, \cmd\babelname\ +% and \cmd\languageid\ are already set, so you can condition on specific languages in your code. +% This hook is particularly provided for package authors. +% % \section{Script-specific numbering} % % Languages and scripts have specific numbering conventions. Some use decimal digits @@ -6690,7 +6696,7 @@ and may look very wrong.} \def\prefacename{Esipuhe}% \def\chaptername{Luku}% \def\appendixname{Liite}% - \def\contentsname{Sisältö}% + \def\contentsname{Sisällys}% \def\listfigurename{Kuvat}% \def\listtablename{Taulukot}% \def\indexname{Hakemisto}% @@ -8187,7 +8193,7 @@ and may look very wrong.} \xpg@ifdefined{greek}{}{% \xpg@nopatterns{greek}% \adddialect\l@greek\l@nohyphenation - } + }% \ifx\@tmpa\tmp@poly\def\@tmpa{polytonic}\fi \ifx\@tmpa\tmp@ancientgreek\def\@tmpa{ancient}\fi \ifx\@tmpa\tmp@polytonic% @@ -9151,9 +9157,9 @@ and may look very wrong.} \renewcommand*\chaptermark[1]{% \markboth{\memUChead{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter + \ifbool{@mainmatter}{% \thechapter.\ \@chapapp\ % - \fi + }{}% \fi ##1}}{}}% }{% (not \ifdefined\@memptsize) @@ -9979,164 +9985,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 % @@ -19362,16 +19368,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages % \Finale % % \iffalse -%<*../README> - - ¦----------------------------------------------¦ - ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.48 ¦ - ¦ ¦ - ¦ Modern multilingual typesetting ¦ - ¦ with XeLaTeX and LuaLaTeX ¦ - ¦ ¦ - ¦----------------------------------------------¦ +%<*../README.md> +# THE POLYGLOSSIA PACKAGE v1.49 +## Multilingual typesetting with XeLaTeX and LuaLaTeX This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX (with a few languages incompletely supported for the latter). This version @@ -19397,7 +19396,7 @@ Polyglossia makes it possible to automate the following tasks: written from right to left (via the packages bidi and luabidi, available separately). -LICENSE +# LICENCE Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller @@ -19405,15 +19404,32 @@ Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence (https://opensource.org/licenses/MIT). -BUGS +# BUGS If you run into a bug, or suspect you do, or you have a request or comment, please use the GitHub issue tracker: http://github.com/reutenauer/polyglossia/issues This is more efficient than contacting the maintainer by email as it allows me to track the issues and follow progress. -% +% %<*Changelog> +1.49 (???) + +New features: + + * Add hook \polyglossia@language@switched to the external package interface (#398). + * Real fix for #400, that wasn’t properly taken care of in 1.48. + +Bug fixes: + + * Fix compilation error with some swapstring options in Hungarian (#373). + * Fix whitespace problem in Greek language. + +Interface and defaults changes: + + * Changed Finnish caption for "Table of Contents" to "Sisällys" (#403). + + 1.48 (25-03-2020) No new features diff --git a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def index 99b1923d956..61c3e6d1fd8 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def +++ b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def @@ -139,12 +139,11 @@ % % ------------------------------------------------------------------------------ % -% lines 108 and 109 from babel.def +% line 108 from babel.def % % ------------------------------------------------------------------------------ % \def\bbl@csarg#1#2{\expandafter#1\csname bbl@#2\endcsname}% -\def\bbl@cs#1{\csname bbl@#1\endcsname}% % ------------------------------------------------------------------------------ % diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf index d59a7eaf52e..1745b6f8a0c 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-finnish.ldf @@ -51,7 +51,7 @@ \def\prefacename{Esipuhe}% \def\chaptername{Luku}% \def\appendixname{Liite}% - \def\contentsname{Sisältö}% + \def\contentsname{Sisällys}% \def\listfigurename{Kuvat}% \def\listtablename{Taulukot}% \def\indexname{Hakemisto}% diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf index 90d34f14550..7cb48fdc9e6 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-greek.ldf @@ -44,7 +44,7 @@ \xpg@ifdefined{greek}{}{% \xpg@nopatterns{greek}% \adddialect\l@greek\l@nohyphenation - } + }% \ifx\@tmpa\tmp@poly\def\@tmpa{polytonic}\fi \ifx\@tmpa\tmp@ancientgreek\def\@tmpa{ancient}\fi \ifx\@tmpa\tmp@polytonic% diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf index 84a2c26e59f..3f92ee63c0a 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf @@ -212,9 +212,9 @@ \renewcommand*\chaptermark[1]{% \markboth{\memUChead{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter + \ifbool{@mainmatter}{% \thechapter.\ \@chapapp\ % - \fi + }{}% \fi ##1}}{}}% }{% (not \ifdefined\@memptsize) diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf index 6b62813ed29..1b2aba10412 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-khmer.ldf @@ -1,75 +1,75 @@ \ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer] \PolyglossiaSetup{khmer}{ bcp47=km, - script=Khmer,% - scripttag=khmr,% - langtag=KHM,% - hyphennames={nohyphenation},% - fontsetup=true,% - localnumeral=khmernumerals% + 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% + \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\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\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 + \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 } @@ -77,18 +77,18 @@ \newcommand{\khmernumerals}[2]{\khmernumber{#2}} \def\khmernumber#1{% - \if@khmer@numerals% - \khmerdigits{\number#1}% - \else% - \number#1% - \fi} + \if@khmer@numerals% + \khmerdigits{\number#1}% + \else% + \number#1% + \fi} \def\khmer@globalnumbers{% - \let\orig@arabic\@arabic% - \let\@arabic\khmernumber% - \renewcommand{\thefootnote}{\localnumeral*{footnote}}% + \let\orig@arabic\@arabic% + \let\@arabic\khmernumber% + \renewcommand{\thefootnote}{\localnumeral*{footnote}}% } \def\nokhmer@globalnumbers{% - \let\@arabic\orig@arabic% + \let\@arabic\orig@arabic% } \def\thepart{\arabic{part}} \def\@khmeralph#1{% @@ -111,49 +111,49 @@ \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% + \if@khmer@numerals + \let\@alph\@khmeralph% + \let\@Alph\@khmerAlph% + \fi% } \def\nokhmer@numbers{% - \let\@alph\latin@alph% - \let\@Alph\latin@Alph% + \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 + \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% + \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}}}}}}% + \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}}}}}}% }{} \endinput diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty index 1e872abb2f6..620d946b416 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/03/25 v1.48 +\ProvidesPackage{polyglossia}[2020/04/08 v1.49 Modern multilingual typesetting with XeLaTeX and LuaLaTeX] \RequirePackage{etoolbox} \RequirePackage{makecmds} @@ -29,6 +29,7 @@ %% 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 \AtEndPreamble{\let\bbl@main@language\xpg@main@language} %for biblatex @@ -1551,6 +1552,8 @@ \polyglossia@error@iflangnotloaded:n{#2} \exp_args:Nne \setkeys{#2}{#1}% \polyglossia@setforeignlanguage[#1]{#2} + % Hook for external packages such as biblatex + \polyglossia@language@switched% % buggy restoration heure \csuse{inlineextras@#2}% % This is a hook for external packages which want to access variants @@ -1631,8 +1634,8 @@ } -%Hook that other package authors can use -%(for instance biblatex): +% Hook that other package authors can use +% (for instance biblatex): \newcommand*{\xpg@hook@setlanguage}{} \def\xpg@pop@language@i#1#2{% @@ -2025,6 +2028,8 @@ \xpg@set@bbl@hyphendata{\the\language} \xpg@initial@setup% \select@@language[#1]{#2}% + % Hook for external packages such as biblatex + \polyglossia@language@switched% \polyglossia@lang@setpardirection:n{#2}% \csuse{captions#2}% \csuse{date#2}% @@ -2042,8 +2047,14 @@ } % hook for compatibility with biblatex +% (probably no longer used due to the +% more general hook that follows, but +% we keep it for backwards comp.) \def\select@language#1{} +% Hook for external packages such as biblatex +\def\polyglossia@language@switched{} + \def\noextrascurrent#1{% \csuse{noextras@#1}% % This is a hook for external packages which want to access variants -- cgit v1.2.3