diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-11 22:35:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-11 22:35:29 +0000 |
commit | 01f3d11f566adcadedd4374cf8c6aaeacd975d21 (patch) | |
tree | 6827295bfc8ee3e26232d1f923246a8303c2df9c /Master/texmf-dist/source | |
parent | 9a6724bc689081762a2dd8faecca766353c0c40b (diff) |
polyglossia (9apr20)
git-svn-id: svn://tug.org/texlive/trunk@54664 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx | 392 |
1 files changed, 204 insertions, 188 deletions
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 %</internal> %<*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 %</gloss-khmer.ldf> @@ -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. -%</../README> +%</../README.md> %<*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 |