From 827141d48274ee4c7c3c63fabe61287742805493 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 18 Jul 2022 20:13:44 +0000 Subject: polyglossia (18jul22) git-svn-id: svn://tug.org/texlive/trunk@63931 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/polyglossia/babelsh.def | 262 ++++++++++++--------- .../tex/latex/polyglossia/gloss-french.ldf | 28 +-- .../tex/latex/polyglossia/gloss-hebrew.ldf | 14 +- .../tex/latex/polyglossia/gloss-latin.ldf | 35 ++- .../tex/latex/polyglossia/gloss-polish.ldf | 2 +- .../texmf-dist/tex/latex/polyglossia/hebrewcal.sty | 86 ++++--- .../tex/latex/polyglossia/polyglossia.sty | 18 +- 7 files changed, 273 insertions(+), 172 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def index 68a0a45ada7..abb1ac7cb22 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/babelsh.def +++ b/Master/texmf-dist/tex/latex/polyglossia/babelsh.def @@ -3,9 +3,9 @@ \bbl@afterfi\endinput \fi \ProvidesFile{babelsh.def} - [2019/09/30 % + [2022/06/21 % Babel common definitions for shorthands^^J - Taken verbatim from babel files (2019/09/27 v3.34)] + Taken verbatim from babel files (2022/06/06 v3.76)] % % ------------------------------------------------------------------------------ % @@ -13,15 +13,40 @@ % % ------------------------------------------------------------------------------ % +\def\bbl@error#1#2{% + \begingroup + \def\\{\MessageBreak}% + \PackageError{babel}{#1}{#2}% + \endgroup} +% +% ------------------------------------------------------------------------------ +% +% lines 69 to 73 from babel.sty +% +% ------------------------------------------------------------------------------ +% +\def\bbl@info#1{% + \begingroup + \def\\{\MessageBreak}% + \PackageInfo{babel}{#1}% + \endgroup} +% +% ------------------------------------------------------------------------------ +% +% lines 75 to 80 from babel.sty +% +% ------------------------------------------------------------------------------ +% \def\bbl@stripslash{\expandafter\@gobble\string} \def\bbl@add#1#2{% \bbl@ifunset{\bbl@stripslash#1}% {\def#1{#2}}% {\expandafter\def\expandafter#1\expandafter{#1#2}}} +\def\bbl@xin@{\@expandtwoargs\in@} % % ------------------------------------------------------------------------------ % -% line 73 to 74 from babel.sty +% line 97 to 98 from babel.sty % % ------------------------------------------------------------------------------ % @@ -30,7 +55,7 @@ % % ------------------------------------------------------------------------------ % -% line 399 from babel.sty +% line 376 from babel.sty % % ------------------------------------------------------------------------------ % @@ -38,10 +63,18 @@ % % ------------------------------------------------------------------------------ % -% lines 432 to 445 from babel.sty +% lines 414 to 435 from babel.sty % % ------------------------------------------------------------------------------ % +\def\bbl@sh@string#1{% + \ifx#1\@empty\else + \ifx#1t\string~% + \else\ifx#1c\string,% + \else\string#1% + \fi\fi + \expandafter\bbl@sh@string + \fi} \ifx\bbl@opt@shorthands\@nnil \def\bbl@ifshorthand#1#2#3{#2}% \else\ifx\bbl@opt@shorthands\@empty @@ -59,7 +92,7 @@ % % ------------------------------------------------------------------------------ % -% line 450 from babel.sty +% line 440 from babel.sty % % ------------------------------------------------------------------------------ % @@ -67,91 +100,45 @@ % % ------------------------------------------------------------------------------ % -% lines 389 to 424 from switch.def +% lines 387 to 406 from babel.def % % ------------------------------------------------------------------------------ % -\ifx\PackageError\@undefined - \def\bbl@error#1#2{% - \begingroup - \newlinechar=`\^^J - \def\\{^^J(babel) }% - \errhelp{#2}\errmessage{\\#1}% - \endgroup} - \def\bbl@warning#1{% - \begingroup - \newlinechar=`\^^J - \def\\{^^J(polyglossia) }% - \message{\\#1}% - \endgroup} - \def\bbl@info#1{% - \begingroup - \newlinechar=`\^^J - \def\\{^^J}% - \wlog{#1}% - \endgroup} +\let\bbl@opt@shorthands\@nnil +\def\bbl@ifshorthand#1#2#3{#2}% +\let\bbl@language@opts\@empty +\ifx\babeloptionstrings\@undefined + \let\bbl@opt@strings\@nnil \else - \def\bbl@error#1#2{% - \begingroup - \def\\{\MessageBreak}% - \PackageError{polyglossia}{#1}{#2}% - \endgroup} - \def\bbl@warning#1{% - \begingroup - \def\\{\MessageBreak}% - \PackageWarning{polyglossia}{#1}% - \endgroup} - \def\bbl@info#1{% - \begingroup - \def\\{\MessageBreak}% - \PackageInfo{polyglossia}{#1}% - \endgroup} + \let\bbl@opt@strings\babeloptionstrings \fi -% -% ------------------------------------------------------------------------------ -% -% lines 48 to 69 from babel.def -% -% ------------------------------------------------------------------------------ -% -\ifx\bbl@ifshorthand\@undefined - \let\bbl@opt@shorthands\@nnil - \def\bbl@ifshorthand#1#2#3{#2}% - \let\bbl@language@opts\@empty - \ifx\babeloptionstrings\@undefined - \let\bbl@opt@strings\@nnil - \else - \let\bbl@opt@strings\babeloptionstrings - \fi - \def\BabelStringsDefault{generic} - \def\bbl@tempa{normal} - \ifx\babeloptionmath\bbl@tempa - \def\bbl@mathnormal{\noexpand\textormath} - \fi - \def\AfterBabelLanguage#1#2{} - \ifx\BabelModifiers\@undefined\let\BabelModifiers\relax\fi - \let\bbl@afterlang\relax - \def\bbl@opt@safe{BR} - \ifx\@uclclist\@undefined\let\@uclclist\@empty\fi - \ifx\bbl@trace\@undefined\def\bbl@trace#1{}\fi - \expandafter\newif\csname ifbbl@single\endcsname +\def\BabelStringsDefault{generic} +\def\bbl@tempa{normal} +\ifx\babeloptionmath\bbl@tempa + \def\bbl@mathnormal{\noexpand\textormath} \fi +\def\AfterBabelLanguage#1#2{} +\ifx\BabelModifiers\@undefined\let\BabelModifiers\relax\fi +\let\bbl@afterlang\relax +\def\bbl@opt@safe{BR} +\ifx\@uclclist\@undefined\let\@uclclist\@empty\fi +\ifx\bbl@trace\@undefined\def\bbl@trace#1{}\fi +\expandafter\newif\csname ifbbl@single\endcsname % % ------------------------------------------------------------------------------ % -% line 108 from babel.def +% line 938 from babel.def % % ------------------------------------------------------------------------------ % \def\bbl@csarg#1#2{\expandafter#1\csname bbl@#2\endcsname}% - +% % ------------------------------------------------------------------------------ % -% lines 110 to 116 from babel.def +% lines 941 to 947 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,{% @@ -159,36 +146,54 @@ \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 +% lines 956 to 965 from babel.def % % ------------------------------------------------------------------------------ % \def\bbl@exp#1{% \begingroup \let\\\noexpand - \def\<##1>{\expandafter\noexpand\csname##1\endcsname}% + \let\<\bbl@exp@en + \let\[\bbl@exp@ue \edef\bbl@exp@aux{\endgroup#1}% \bbl@exp@aux} +\def\bbl@exp@en#1>{\expandafter\noexpand\csname#1\endcsname}% +\def\bbl@exp@ue#1]{% + \unexpanded\expandafter\expandafter\expandafter{\csname#1\endcsname}}% % % ------------------------------------------------------------------------------ % -% lines 144 to 149 from babel.def +% lines 979 to 998 from babel.def % % ------------------------------------------------------------------------------ % -\def\bbl@ifunset#1{% - \expandafter\ifx\csname#1\endcsname\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi} +\begingroup + \gdef\bbl@ifunset#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + \bbl@ifunset{ifcsname}% TODO. A better test? + {}% + {\gdef\bbl@ifunset#1{% + \ifcsname#1\endcsname + \expandafter\ifx\csname#1\endcsname\relax + \bbl@afterelse\expandafter\@firstoftwo + \else + \bbl@afterfi\expandafter\@secondoftwo + \fi + \else + \expandafter\@firstoftwo + \fi}} +\endgroup % % ------------------------------------------------------------------------------ % -% lines 234 to 243 from babel.def +% lines 1075 to 1084 from babel.def % % ------------------------------------------------------------------------------ % @@ -205,7 +210,7 @@ % % ------------------------------------------------------------------------------ % -% lines 255 to 258 from babel.def +% lines 1152 to 1155 from babel.def % % ------------------------------------------------------------------------------ % @@ -216,7 +221,7 @@ % % ------------------------------------------------------------------------------ % -% lines 293 to 301 from babel.def +% line 1185 from babel.def % % NOTE: In order to avoid importing more unneeded definitions, this macro % does nothing for us. @@ -227,7 +232,7 @@ % % ------------------------------------------------------------------------------ % -% lines 443 to 558 from babel.def +% lines 1348 to 1463 from babel.def % % ------------------------------------------------------------------------------ % @@ -278,7 +283,7 @@ \def\@initiate@active@char#1#2#3{% \bbl@csarg\edef{oricat@#2}{\catcode`#2=\the\catcode`#2\relax}% \ifx#1\@undefined - \bbl@csarg\edef{oridef@#2}{\let\noexpand#1\noexpand\@undefined}% + \bbl@csarg\def{oridef@#2}{\def#1{\active@prefix#1\@undefined}}% \else \bbl@csarg\let{oridef@@#2}#1% \bbl@csarg\edef{oridef@#2}{% @@ -350,7 +355,7 @@ % % ------------------------------------------------------------------------------ % -% lines 561 to 755 from babel.def +% lines 1466 to 1516 from babel.def % % ------------------------------------------------------------------------------ % @@ -363,27 +368,55 @@ \else \bbl@afterfi\csname#1@sh@#2@sel\endcsname \fi} -\def\active@prefix#1{% - \ifx\protect\@typeset@protect - \else - \ifx\protect\@unexpandable@protect - \noexpand#1% - \else - \protect#1% - \fi - \expandafter\@gobble - \fi} +\begingroup +\bbl@ifunset{ifincsname}% TODO. Ugly. Correct? Only Plain? + {\gdef\active@prefix#1{% + \ifx\protect\@typeset@protect + \else + \ifx\protect\@unexpandable@protect + \noexpand#1% + \else + \protect#1% + \fi + \expandafter\@gobble + \fi}} + {\gdef\active@prefix#1{% + \ifincsname + \string#1% + \expandafter\@gobble + \else + \ifx\protect\@typeset@protect + \else + \ifx\protect\@unexpandable@protect + \noexpand#1% + \else + \protect#1% + \fi + \expandafter\expandafter\expandafter\@gobble + \fi + \fi}} +\endgroup \newif\if@safe@actives \@safe@activesfalse \def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi} +\chardef\bbl@activated\z@ \def\bbl@activate#1{% + \chardef\bbl@activated\@ne \bbl@withactive{\expandafter\let\expandafter}#1% \csname bbl@active@\string#1\endcsname} \def\bbl@deactivate#1{% + \chardef\bbl@activated\tw@ \bbl@withactive{\expandafter\let\expandafter}#1% \csname bbl@normal@\string#1\endcsname} \def\bbl@firstcs#1#2{\csname#1\endcsname} \def\bbl@scndcs#1#2{\csname#2\endcsname} +% +% ------------------------------------------------------------------------------ +% +% lines 1525 to 1702 from babel.def +% +% ------------------------------------------------------------------------------ +% \def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil} \def\@decl@short#1#2#3\@nil#4{% \def\bbl@tempa{#3}% @@ -417,7 +450,7 @@ \expandafter\@firstoftwo \fi} \def\user@group{user} -\def\language@group{english} +\def\language@group{english} % TODO. I don't like defaults \def\system@group{system} \def\useshorthands{% \@ifstar\bbl@usesh@s{\bbl@usesh@x{}}} @@ -432,8 +465,8 @@ #1% \bbl@activate{#2}}% {\bbl@error - {Cannot declare a shorthand turned off (\string#2)} - {Sorry, but you cannot use shorthands which have been\\% + {I can't declare a shorthand turned off (\string#2)} + {Sorry, but you can't use shorthands which have been\\% turned off in the package options}}} \def\user@language@group{user@\language@group} \def\bbl@set@user@generic#1#2{% @@ -475,7 +508,7 @@ turned off in the package options}}} \def\@notshorthand#1{% \bbl@error{% - The character `\string #1' should be made a shorthand character;\\% + The character '\string #1' should be made a shorthand character;\\% add the command \string\useshorthands\string{#1\string} to the preamble.\\% I will ignore your instruction}% @@ -488,14 +521,27 @@ \ifx#2\@nnil\else \bbl@ifunset{bbl@active@\string#2}% {\bbl@error - {I cannot switch `\string#2' on or off--not a shorthand}% + {I can't switch '\string#2' on or off--not a shorthand}% {This character is not a shorthand. Maybe you made\\% - a typing mistake? I will ignore your instruction}}% - {\ifcase#1% + a typing mistake? I will ignore your instruction.}}% + {\ifcase#1% off, on, off* \catcode`#212\relax \or \catcode`#2\active + \bbl@ifunset{bbl@shdef@\string#2}% + {}% + {\bbl@withactive{\expandafter\let\expandafter}#2% + \csname bbl@shdef@\string#2\endcsname + \bbl@csarg\let{shdef@\string#2}\relax}% + \ifcase\bbl@activated\or + \bbl@activate{#2}% + \else + \bbl@deactivate{#2}% + \fi \or + \bbl@ifunset{bbl@shdef@\string#2}% + {\bbl@withactive{\bbl@csarg\let{shdef@\string#2}}#2}% + {}% \csname bbl@oricat@\string#2\endcsname \csname bbl@oridef@\string#2\endcsname \fi}% @@ -507,7 +553,7 @@ {\bbl@putsh@i#1\@empty\@nnil}% {\csname bbl@active@\string#1\endcsname}} \def\bbl@putsh@i#1#2\@nnil{% - \csname\languagename @sh@\string#1@% + \csname\language@group @sh@\string#1@% \ifx\@empty#2\else\string#2@\fi\endcsname} \ifx\bbl@opt@shorthands\@nnil\else \let\bbl@s@initiate@active@char\initiate@active@char @@ -552,7 +598,7 @@ % % ------------------------------------------------------------------------------ % -% lines 890 to 927 from babel.def +% lines 1863 to 1900 from babel.def % % ------------------------------------------------------------------------------ % diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf index a9e66772a7a..a7c797d59a2 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf @@ -364,9 +364,9 @@ % Change part heading % With titlesec \ifcsdef{titleformat}{% - \ifcsdef{H@old@part}{% Hyperref - \let\xpg@save@part@format\H@old@part% - \patchcmd{\H@old@part}% + \ifcsdef{NR@part}{% Hyperref (nameref) + \let\xpg@save@part@format\NR@part% + \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\xpg@french@part\nobreakspace\partname}% {}% @@ -391,9 +391,9 @@ }{% (not \ifdefined\sectionformat) % With memoir \ifcsdef{@memptsize}{% - \ifcsdef{H@old@part}{% Hyperref - \let\xpg@save@part@format\H@old@part% - \patchcmd{\H@old@part}{\printpartname \partnamenum \printpartnum}% + \ifcsdef{NR@part}{% Hyperref (nameref) + \let\xpg@save@part@format\NR@part% + \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}% {\partnamefont\xpg@french@part\partnamenum\printpartname}% {}% {\xpg@warning{Failed to patch part for French}}% @@ -408,9 +408,9 @@ }% }{% (not \ifdefined\@memptsize) % With standard classes - \ifcsdef{H@old@part}{% Hyperref - \let\xpg@save@part@format\H@old@part% - \patchcmd{\H@old@part}% + \ifcsdef{NR@part}{% Hyperref + \let\xpg@save@part@format\NR@part% + \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\xpg@french@part\nobreakspace\partname}% {}% @@ -423,7 +423,7 @@ {\xpg@french@part\nobreakspace\partname}% {}% {\ifcsdef{part}{\xpg@warning{Failed to patch part for French}}{}}% - }{}% (end \ifdefined \H@old@part) + }{}% (end \ifdefined \NR@part) }% (end \ifdefined\@part) }% (end \ifdefined\@memptsize) }% (end \ifdefined\sectionformat) @@ -435,8 +435,8 @@ \ifcsdef{titleformat}{% % With titlesec \ifcsdef{xpg@save@part@format}{% - \ifcsdef{H@old@part}{% - \let\H@old@part\xpg@save@part@format% + \ifcsdef{NR@part}{% + \let\NR@part\xpg@save@part@format% }{% \let\@part\xpg@save@part@format% }% @@ -450,8 +450,8 @@ }{% % With memoir and standard classes \ifcsdef{xpg@save@part@format}{% - \ifcsdef{H@old@part}{% - \let\H@old@part\xpg@save@part@format% + \ifcsdef{NR@part}{% + \let\NR@part\xpg@save@part@format% }{% \let\@part\xpg@save@part@format% }% diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf index 6c9f5bbe11a..debf03a8e6e 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf @@ -19,6 +19,11 @@ % BCP-47 compliant aliases \setlanguagealias*{hebrew}{he} +% hebrewcal options +\define@key{hebrew}{marcheshvan}[true]{\setkeys{hebrewcal}{marcheshvan=#1}} +\define@key{hebrew}{transliteration}[alt]{\setkeys{hebrewcal}{transliteration=#1}} +\define@key{hebrew}{fullyear}[true]{\setkeys{hebrewcal}{fullyear=#1}} + \newif\if@calendar@hebrew \def\tmp@hebrew{hebrew} \define@key{hebrew}{calendar}[gregorian]{% @@ -30,13 +35,6 @@ \@calendar@hebrewfalse% \fi} -\newif\if@xpg@hebrew@marcheshvan -\@xpg@hebrew@marcheshvanfalse - -\define@boolkey{hebrew}[@xpg@hebrew@]{marcheshvan}[true]{} - -% hebrewcal.sty also defines the boolean key fullyear (default=false) - \newif\if@hebrew@numerals \def\tmp@hebrew{hebrew} \define@key{hebrew}{numerals}[arabic]{% @@ -50,7 +48,7 @@ \setkeys{hebrew}{numerals} % Register default options -\xpg@initialize@gloss@options{hebrew}{numerals=arabic,calendar=gregorian,marcheshvan=false} +\xpg@initialize@gloss@options{hebrew}{numerals=arabic,calendar=gregorian,marcheshvan=false,fullyear=false} \def\captionshebrew{% \def\prefacename{מבוא}% diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf index c692b985d04..ae731af7b8a 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.4 2021-10-25] +\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.5 2022-06-21] \ExplSyntaxOn @@ -623,6 +623,9 @@ % 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 TeX's ^^xx convention +% for hexadecimal input. 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 off if Latin is not the main language. @@ -636,6 +639,7 @@ \iflatin@prosodicshorthands \else \shorthandoff {=} + \shorthandoff* {^} \fi } { @@ -644,6 +648,10 @@ % 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* {^} + % 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 {'} @@ -686,8 +694,9 @@ \cs_new:Npn \polyglossia_latin_prosodic_shorthands: { \def \language@group {latin} - % The '=' shorthand is normally turned off to avoid problems with key=value - % interfaces. We turn it on here to enable prosodic shorthands. + % The '=' and '^' shorthands are normally turned off to avoid problems with + % key=value interfaces and TeX's ^^xx convention for hexadecimal input. We + % turn them on here to enable prosodic shorthands. \shorthandon {=} \bbl@activate {=} \declare@shorthand {latin} {=} @@ -700,6 +709,7 @@ \polyglossia_latin_put_macron:N } } + \shorthandon {^} \bbl@activate {^} \declare@shorthand {latin} {^} { @@ -925,7 +935,7 @@ \peek_meaning:NTF #2 { #1 - \iffontchar \font "35E \relax % U+35E: combining double macron + \iffontchar \font "35E \relax % U+035E: combining double macron \char "35E \relax \else \msg_warning:nn {polyglossia} {latin / no-double-macron-font} @@ -971,12 +981,20 @@ { \bbl@deactivate {"} \bbl@deactivate {'} + } + +\cs_new:Npn \polyglossia_latin_no_prosodic_shorthands: + { \bbl@deactivate {=} \bbl@deactivate {^} % 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. \shorthandoff {=} + % The active '^' character may cause problems with TeX's ^^xx convention + % for hexadecimal input. We have to make sure here that no problems can + % occur outside a Latin prosodic shorthand environment. + \shorthandoff* {^} } @@ -1000,6 +1018,9 @@ \iflatin@babelshorthands \polyglossia_latin_no_shorthands: \fi + \iflatin@prosodicshorthands + \polyglossia_latin_no_prosodic_shorthands: + \fi \xpgla@savedvalues \polyglossia_latin_no_punctuation_spacing: \polyglossia_latin_modern_character_codes: @@ -1017,9 +1038,13 @@ } \iflatin@babelshorthands \polyglossia_latin_shorthands: + \else + \polyglossia_latin_no_shorthands: \fi \iflatin@prosodicshorthands \polyglossia_latin_prosodic_shorthands: + \else + \polyglossia_latin_no_prosodic_shorthands: \fi } @@ -1048,7 +1073,7 @@ %% Copyright (C) Claudio Beccari 2013-2016 %% Copyright (C) Élie Roux 2016-2019 -%% Copyright (C) Keno Wehr 2019-2020 +%% Copyright (C) Keno Wehr 2019-2022 %% %% Permission is hereby granted, free of charge, to any person obtaining %% a copy of this software and associated documentation files diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf index d6305cf06ea..e6c246f9ed2 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf @@ -143,7 +143,7 @@ \def\polish@vlna{% \ifluatex - \singlechars{polish}{AaIiOoUuWwZz} + \singlechars{polish}{AaIiOoUuWwZz}% \preventsingleon \else % Code taken and adapted from xevlna.sty diff --git a/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty b/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty index 60f41491147..ea21ce1fa3d 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty +++ b/Master/texmf-dist/tex/latex/polyglossia/hebrewcal.sty @@ -1,27 +1,50 @@ \ProvidesPackage{hebrewcal} - [2019/12/03 v2.7 % + [2022/07/18 v2.8 % Hebrew calendar for polyglossia (adapted from hebcal.sty in Babel)] -\RequirePackage{xkeyval} -\ifluatex\RequirePackage{luabidi}\else\RequirePackage{bidi}\fi - -\newif\if@xpg@hebrewcal@marcheshvan -\@xpg@hebrewcal@marcheshvanfalse - -\DeclareOption{marcheshvan}{\@xpg@hebrewcal@marcheshvantrue} -\@ifundefined{if@xpg@hebrew@marcheshvan}{}{% - \if@xpg@hebrew@marcheshvan - \@xpg@hebrewcal@marcheshvantrue - \fi -} +\RequirePackage{iftex} +\ifluatex + \RequirePackage{luabidi} +\else + \RequirePackage{bidi} +\fi %% TODO rewrite this on the basis of Reingold & Dershowitz %% on the model of hijrical (using calc) \@ifundefined{@Remainder}{\input{cal-util.def}}{} -\define@boolkey{hebrew}[@hebrew@]{fullyear}[true]{} -\setkeys{hebrew}{fullyear=false} +% +% OPTIONS +% +\RequirePackage{xkeyval} + +% marcheshvan=true|false +\define@boolkey{hebrewcal}[@xpg@hebrew@]{marcheshvan}[true]{} + +% fullyear=true|false +\define@boolkey{hebrewcal}[@xpg@hebrew@]{fullyear}[true]{} + +% transliteration=academy|alt +\newif\if@hebrewcal@academytrans +\@hebrewcal@academytransfalse +\define@choicekey*+{hebrewcal}{transliteration}[\hcal@val\hcal@nr]{academy,alt}[alt]{% + \ifcase\hcal@nr\relax + % academy: + \@hebrewcal@academytranstrue + \or + % alt: + \@hebrewcal@academytransfalse + \fi + \PackageInfo{hebrewcal}{Setting transliteration=\hcal@val}% +}{% + \PackageWarning{hebrewcal}{Unknown transliteration option `#1'}% +} + +% Process +\ProcessOptionsX* +%% +%% END OPTIONS \newcount\hebrewday \newcount\hebrewmonth \newcount\hebrewyear \def\hebrewdate#1#2#3{% @@ -52,7 +75,7 @@ \else \ifnum#1<6000 % current millenium, print without thousands \@tempcnta=#1\relax - \if@hebrew@fullyear\else\advance\@tempcnta by -5000\fi + \if@xpg@hebrew@fullyear\else\advance\@tempcnta by -5000\fi \Hebrewnumeral{\@tempcnta}% \else % #1>6000 \Hebrewnumeral{#1}% @@ -70,7 +93,7 @@ \ifcase#1% % nothing for 0 \or תשרי% - \or\if@xpg@hebrewcal@marcheshvan מרחשון\else חשון\fi% + \or\if@xpg@hebrew@marcheshvan מרחשון\else חשון\fi% \or כסלו% \or טבת% \or שבט% @@ -94,18 +117,23 @@ \else% \ifcase #1% % nothing for 0 - \or Tishrei% - \or\if@xpg@hebrewcal@marcheshvan Marcheshvan\else Heshvan\fi% + \or \if@hebrewcal@academytrans Tishri \else Tishrei \fi% + \or% + \if@hebrewcal@academytrans% + \if@xpg@hebrew@marcheshvan Marẖeshvan\else Heshvan\fi% + \else% + \if@xpg@hebrew@marcheshvan Marcheshvan\else Heshvan\fi% + \fi% \or Kislev% - \or Tebeth% - \or Shebat% + \or \if@hebrewcal@academytrans Tevet \else Tebeth \fi% + \or \if@hebrewcal@academytrans Shvat \else Shebat \fi% \or Adar I% \or Adar II% \or Nisan% - \or Iyar% + \or \if@hebrewcal@academytrans Iyyar \else Iyar \fi% \or Sivan% \or Tammuz% - \or Av% + \or \if@hebrewcal@academytrans Av \else Ab \fi% \or Elul% \fi \fi} @@ -216,12 +244,12 @@ 0 \or% % Tishri 30 \or% % Heshvan 59 \or% % Kislev - 89 \or% % Tebeth - 118 \or% % Shebat + 89 \or% % Tevet + 118 \or% % Shvat 148 \or% % Adar I 148 \or% % Adar II 177 \or% % Nisan - 207 \or% % Iyar + 207 \or% % Iyyar 236 \or% % Sivan 266 \or% % Tammuz 295 \or% % Av @@ -343,6 +371,8 @@ \tmpy = \tmpx% \repeat% \global\advance #5 by -1% - \global\advance #4 by -\tmpy}} -\ProcessOptions* + \global\advance #4 by -\tmpy% + }% +} + \endinput diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty index 5f61ebe1062..fde381d2416 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/04/20 v1.56 +\ProvidesPackage{polyglossia}[2022/07/18 v1.57 Modern multilingual typesetting with XeLaTeX and LuaLaTeX] \RequirePackage{etoolbox} \RequirePackage{makecmds} @@ -1403,7 +1403,8 @@ } } -\newcommand{\setdefaultlanguage}[2][]{% +\DeclareDocumentCommand \setdefaultlanguage { O{} m } +{ % latex is an internal language, so do not record \str_if_eq:eeF{#2}{latex} { @@ -1416,11 +1417,11 @@ \polyglossia_load_lang_definition:nn{#1}{#2} % define environment and command if not alias \str_if_eq:eeT {\prop_item:Ne \__xpg_alias {#2/target}} {#2} { - \use:c{\prop_item:Nn{\polyglossia@langsetup} + \use:c{\prop_item:Ne{\polyglossia@langsetup} {#2/DefineCommandsCmd}} {#2} } - \seq_gput_right:Nn \__xpg_langs_loaded {#2} + \exp_args:Nnx \seq_gput_right:Nn \__xpg_langs_loaded {#2} } \polyglossia@set@default@language:ee {\xpg_alias_add_to_option_i:nn{#2}{#1}} {\xpg_alias_base_lang:n{#2}}% @@ -1716,13 +1717,13 @@ \polyglossia_load_lang_definition:ee {#1} {#2}% % define environment and command if not alias \str_if_eq:eeT {\prop_item:Ne \__xpg_alias {#2/target}} {#2} { - \use:c{\prop_item:Nn{\polyglossia@langsetup} + \use:c{\prop_item:Ne{\polyglossia@langsetup} {#2/DefineCommandsCmd}} {#2} } \polyglossia@set@other@language:ee {\xpg_alias_add_to_option_i:nn{#2}{#1}} {\xpg_alias_base_lang:n{#2}}% - \seq_gput_right:Nn \__xpg_langs_loaded {#2} + \exp_args:Nnx \seq_gput_right:Nn \__xpg_langs_loaded {#2} } } @@ -1866,7 +1867,7 @@ {% \__xpg_otherlanguage:eee {#1} {#2} {\xpg_alias_base_lang:n{#2}} } -{\group_end:} +{\egroup} % internal wrapper % #1 option @@ -1879,7 +1880,8 @@ \msg_show:nnn { polyglossia } { languagenotloaded } {#2} } \xpg@otherlanguage[\xpg_alias_add_to_option_i:nn{#2}{#1}]{#3}% - \polyglossia@lang@settextdirection:nn{#3}\group_begin:% + \polyglossia@lang@settextdirection:nn{#3}% + \bgroup } \cs_generate_variant:Nn \__xpg_otherlanguage:nnn { eee -- cgit v1.2.3