summaryrefslogtreecommitdiff
path: root/macros/unicodetex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-19 03:00:51 +0000
committerNorbert Preining <norbert@preining.info>2022-07-19 03:00:51 +0000
commit8ff4930a7a6c0dcfef1066c5537747570c7967b3 (patch)
tree41b8e0712644eb7027b8e1be0ba48166b291a8fd /macros/unicodetex
parentfd8e2e79d92b88ea6e5598d3edc6972750a43e38 (diff)
CTAN sync 202207190300
Diffstat (limited to 'macros/unicodetex')
-rw-r--r--macros/unicodetex/latex/polyglossia/README.md2
-rw-r--r--macros/unicodetex/latex/polyglossia/polyglossia.dtx477
-rw-r--r--macros/unicodetex/latex/polyglossia/polyglossia.pdfbin351613 -> 352848 bytes
3 files changed, 301 insertions, 178 deletions
diff --git a/macros/unicodetex/latex/polyglossia/README.md b/macros/unicodetex/latex/polyglossia/README.md
index 28f8d5209d..4108d0d484 100644
--- a/macros/unicodetex/latex/polyglossia/README.md
+++ b/macros/unicodetex/latex/polyglossia/README.md
@@ -1,4 +1,4 @@
-# THE POLYGLOSSIA PACKAGE v1.56
+# THE POLYGLOSSIA PACKAGE v1.57
## Multilingual typesetting with XeLaTeX and LuaLaTeX
This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX.
diff --git a/macros/unicodetex/latex/polyglossia/polyglossia.dtx b/macros/unicodetex/latex/polyglossia/polyglossia.dtx
index 8b53cdf70b..af83430c71 100644
--- a/macros/unicodetex/latex/polyglossia/polyglossia.dtx
+++ b/macros/unicodetex/latex/polyglossia/polyglossia.dtx
@@ -8,7 +8,7 @@
\iffalse
%</internal>
%<*README>
-# THE POLYGLOSSIA PACKAGE v1.56
+# THE POLYGLOSSIA PACKAGE v1.57
## Multilingual typesetting with XeLaTeX and LuaLaTeX
This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX.
@@ -372,7 +372,7 @@ to track the issues and follow progress.
%<*driver>
% !TeX spellcheck = en_US
% !TeX TS-program = xelatex
-\documentclass[11pt]{ltxdoc}
+\documentclass[11pt,nohyperref]{ltxdoc}
\usepackage{xcolor}
\usepackage{xspace,fancyvrb,longtable,booktabs}
\usepackage[neverdecrease]{paralist}
@@ -1640,12 +1640,17 @@ to track the issues and follow progress.
% \subsection{hebrew}\label{hebrew}
% \paragraph*{Options:}
% \begin{itemize}
+% \item \xpgboolkeyfalse[1.57]{fullyear} causes years from the current millenium to be printed with the thousands digit
+% (he-tav-shin-samekh-gimel). Without this option, thousands are not printed for the current millenium.
% \item \xpgchoicekey{numerals}{\xpgvalue{hebrew} or \xpgpresetvalue{arabic}}
% \item \xpgchoicekey{calendar}{\xpgvalue{hebrew} or \xpgpresetvalue{gregorian}}
% \item \xpgboolkeyfalse{marcheshvan}
% If \xpgvalue{true}, the second month of the civil year will be output as
% \texthebrew{מרחשון} (Marcheshvan) rather than \texthebrew{חשון} (Heshvan),
% which is the default.
+% \item \xpgchoicekey[1.57]{transliteration}{\xpgvalue{academy} or \xpgpresetvalue{alt}} With value \xpgvalue{academy}, transliteration
+% follows the recommendations of the Hebrew Language Academy. The default (\xpgvalue{alt}) uses the received settings of
+% \pkg{babel} (\pkg{hebcal}) and \pkg{polyglossia} (\pkg{hebrewcal}).
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
@@ -2807,6 +2812,23 @@ to track the issues and follow progress.
% \section{Revision history}
%
% \bgroup\footnotesize
+% \subsection*{1.57 (18-07-2022)}
+%
+% \subsubsection*{Bug fixes}
+% \begin{itemize}
+% \item Fix passing of macros to \cmd\setmainlanguage\ and \cmd\setotherlanguage\ (\TXI{543}).
+% \item Fix ¦otherlanguage*¦ environment with bidi text (\TXP{544}).
+% \item Re-fix patching of French part headings with hyperref (\TXI{546}).
+% \item Fix Latin prosodic shorthand issues (\TXI{547}, \href{https://github.com/latex3/babel/issues/126}{Babel/\#126},
+% \href{https://github.com/latex3/babel/issues/129}{Babel/\#129}).
+% \end{itemize}
+%
+% \subsubsection*{New features}
+% \begin{itemize}
+% \item New option \xpgoption{transliteration} to Hebrew and hebrewcal (\TXI{540}).
+% \item New option \xpgoption{fullyear} to Hebrew.
+% \end{itemize}
+%
% \subsection*{1.56 (20-04-2022)}
%
% \subsubsection*{Bug fixes}
@@ -3673,9 +3695,9 @@ to track the issues and follow progress.
% \TA{Zgarbul Andrey}, \TA{Oleg Domanov}, user \TA{fakhriaunur}, \TA{Philipp Gesang}, \TA{Kevin Godby}, \TA{Enrico Gregorio},
% \TA{Khaled Hosny}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime}, \TA{Mike Kroutikov},
% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Miquel Ortega}, \TA{Yevgen Pogribnyi}, \TA{Will Robertson},
-% \TA{Maïeul Rouquette}, \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Niranjan Tambe},
-% \TA{Osman Tursun}, \TA{Keno Wehr}, \TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou},
-% and \TA{Stefan Zlatinov}.
+% \TA{Maïeul Rouquette}, \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Marcin Serwin}, \TA{Philipp Stephani},
+% \TA{Niranjan Tambe}, \TA{Osman Tursun}, \TA{Keno Wehr}, \TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev},
+% \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
% Their respective contributions can be identified from the contributor statistics on
% \href{https://github.com/reutenauer/polyglossia/graphs/contributors}{GitHub}.
%
@@ -3701,7 +3723,7 @@ to track the issues and follow progress.
% \subsection{polyglossia.sty}
% \begin{macrocode}
\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}
@@ -5105,7 +5127,8 @@ to track the issues and follow progress.
}
}
-\newcommand{\setdefaultlanguage}[2][]{%
+\DeclareDocumentCommand \setdefaultlanguage { O{} m }
+{
% latex is an internal language, so do not record
\str_if_eq:eeF{#2}{latex}
{
@@ -5118,11 +5141,11 @@ to track the issues and follow progress.
\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}}%
@@ -5418,13 +5441,13 @@ to track the issues and follow progress.
\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}
}
}
@@ -5568,7 +5591,7 @@ to track the issues and follow progress.
{%
\__xpg_otherlanguage:eee {#1} {#2} {\xpg_alias_base_lang:n{#2}}
}
-{\group_end:}
+{\egroup}
% internal wrapper
% #1 option
@@ -5581,7 +5604,8 @@ to track the issues and follow progress.
\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
@@ -6510,29 +6534,52 @@ to track the issues and follow progress.
% \subsection{hebrewcal.sty}
% \begin{macrocode}
\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*<hebrewcal>
+%%
+%% END OPTIONS
\newcount\hebrewday \newcount\hebrewmonth \newcount\hebrewyear
\def\hebrewdate#1#2#3{%
@@ -6563,7 +6610,7 @@ to track the issues and follow progress.
\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}%
@@ -6581,7 +6628,7 @@ to track the issues and follow progress.
\ifcase#1%
% nothing for 0
\or תשרי%
- \or\if@xpg@hebrewcal@marcheshvan מרחשון\else חשון\fi%
+ \or\if@xpg@hebrew@marcheshvan מרחשון\else חשון\fi%
\or כסלו%
\or טבת%
\or שבט%
@@ -6605,18 +6652,23 @@ to track the issues and follow progress.
\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}
@@ -6727,12 +6779,12 @@ to track the issues and follow progress.
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
@@ -6854,8 +6906,10 @@ to track the issues and follow progress.
\tmpy = \tmpx%
\repeat%
\global\advance #5 by -1%
- \global\advance #4 by -\tmpy}}
-\ProcessOptions*
+ \global\advance #4 by -\tmpy%
+ }%
+}
+
% \end{macrocode}
% \iffalse
%</hebrewcal.sty>
@@ -8495,9 +8549,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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)]
%
% ------------------------------------------------------------------------------
%
@@ -8505,15 +8559,40 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
+\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
%
% ------------------------------------------------------------------------------
%
@@ -8522,7 +8601,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% line 399 from babel.sty
+% line 376 from babel.sty
%
% ------------------------------------------------------------------------------
%
@@ -8530,10 +8609,18 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% 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
@@ -8551,7 +8638,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% line 450 from babel.sty
+% line 440 from babel.sty
%
% ------------------------------------------------------------------------------
%
@@ -8559,91 +8646,45 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% 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,{%
@@ -8651,36 +8692,54 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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
%
% ------------------------------------------------------------------------------
%
@@ -8697,7 +8756,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% lines 255 to 258 from babel.def
+% lines 1152 to 1155 from babel.def
%
% ------------------------------------------------------------------------------
%
@@ -8708,7 +8767,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% 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.
@@ -8719,7 +8778,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% lines 443 to 558 from babel.def
+% lines 1348 to 1463 from babel.def
%
% ------------------------------------------------------------------------------
%
@@ -8770,7 +8829,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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}{%
@@ -8842,7 +8901,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% lines 561 to 755 from babel.def
+% lines 1466 to 1516 from babel.def
%
% ------------------------------------------------------------------------------
%
@@ -8855,27 +8914,55 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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}%
@@ -8909,7 +8996,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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{}}}
@@ -8924,8 +9011,8 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
#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{%
@@ -8967,7 +9054,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
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}%
@@ -8980,14 +9067,27 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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}%
@@ -8999,7 +9099,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{\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
@@ -9044,7 +9144,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% ------------------------------------------------------------------------------
%
-% lines 890 to 927 from babel.def
+% lines 1863 to 1900 from babel.def
%
% ------------------------------------------------------------------------------
%
@@ -14301,9 +14401,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% 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}%
{}%
@@ -14328,9 +14428,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}{% (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}}%
@@ -14345,9 +14445,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}%
}{% (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}%
{}%
@@ -14360,7 +14460,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{\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)
@@ -14372,8 +14472,8 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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%
}%
@@ -14387,8 +14487,8 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}{%
% 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%
}%
@@ -15846,6 +15946,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% 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]{%
@@ -15857,13 +15962,6 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\@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]{%
@@ -15877,7 +15975,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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{מבוא}%
@@ -18620,7 +18718,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-latin.ldf}
% \begin{macrocode}
-\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
@@ -19245,6 +19343,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% 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.
@@ -19258,6 +19359,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\iflatin@prosodicshorthands
\else
\shorthandoff {=}
+ \shorthandoff* {^}
\fi
}
{
@@ -19266,6 +19368,10 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% 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 {'}
@@ -19308,8 +19414,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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} {=}
@@ -19322,6 +19429,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\polyglossia_latin_put_macron:N
}
}
+ \shorthandon {^}
\bbl@activate {^}
\declare@shorthand {latin} {^}
{
@@ -19547,7 +19655,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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}
@@ -19593,12 +19701,20 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{
\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* {^}
}
@@ -19622,6 +19738,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\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:
@@ -19639,9 +19758,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\iflatin@babelshorthands
\polyglossia_latin_shorthands:
+ \else
+ \polyglossia_latin_no_shorthands:
\fi
\iflatin@prosodicshorthands
\polyglossia_latin_prosodic_shorthands:
+ \else
+ \polyglossia_latin_no_prosodic_shorthands:
\fi
}
@@ -19670,7 +19793,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%% 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
@@ -21680,7 +21803,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\polish@vlna{%
\ifluatex
- \singlechars{polish}{AaIiOoUuWwZz}
+ \singlechars{polish}{AaIiOoUuWwZz}%
\preventsingleon
\else
% Code taken and adapted from xevlna.sty
diff --git a/macros/unicodetex/latex/polyglossia/polyglossia.pdf b/macros/unicodetex/latex/polyglossia/polyglossia.pdf
index 9da4544c2b..c9d8dbbc9b 100644
--- a/macros/unicodetex/latex/polyglossia/polyglossia.pdf
+++ b/macros/unicodetex/latex/polyglossia/polyglossia.pdf
Binary files differ