[latex3-commits] [git/LaTeX3-latex3-latex2e] gh1035: Add \BCPdata and adapt \Make<thing>case (#1035) (0480b39e)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Apr 19 21:37:15 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : gh1035
Link       : https://github.com/latex3/latex2e/commit/0480b39e9f4f12cdb5b54bd2ba65031d7fa5e4ec

>---------------------------------------------------------------

commit 0480b39e9f4f12cdb5b54bd2ba65031d7fa5e4ec
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Apr 19 20:35:43 2023 +0100

    Add \BCPdata and adapt \Make<thing>case (#1035)


>---------------------------------------------------------------

0480b39e9f4f12cdb5b54bd2ba65031d7fa5e4ec
 base/changes.txt                           |  7 +++++
 base/doc/clsguide.tex                      | 43 ++++++++++++++++++++++++++++
 base/doc/ltnews37.tex                      | 14 +++++++++
 base/ltfinal.dtx                           | 46 ++++++++++++++++++------------
 base/testfiles-lthooks/ltcmdhooks-001.tlg  |  2 +-
 base/testfiles/tlb-rollback-005.luatex.tlg |  4 +--
 base/testfiles/tlb-rollback-005.tlg        |  4 +--
 base/testfiles/tlb-rollback-005.xetex.tlg  |  4 +--
 8 files changed, 99 insertions(+), 25 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 39990c78..7ea5523f 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -11,6 +11,13 @@ are not part of the distribution.
 	* lthooks.dtx (subsection{Specifying code for next invocation}):
 	Initialise hook structure when adding 'next' code (gh/1052)
 
+2023-04-17  Joseph Wright  <Joseph.Wright at latex-project.org>
+
+	* ltfinal.dtx (subsubsection{Lccodes and uccodes}):
+	Add \BCPdata (gh/1035)
+	Adapt \MakeLowercase, \MakeTitlecase and \MakeLowercase
+	to use \BCPdata for locale info
+
 2023-04-16  Phelype Oleinik  <phelype.oleinik at latex-project.org>
 
 	* lthooks.dtx (subsubsection{Setting hooks up}):
diff --git a/base/doc/clsguide.tex b/base/doc/clsguide.tex
index 93ccf0da..7225425e 100644
--- a/base/doc/clsguide.tex
+++ b/base/doc/clsguide.tex
@@ -1138,6 +1138,49 @@ It is normally given the correct definition automatically in |\begin{document}|
 and so need not be explicitly set; however, if it is explicitly made non-empty
 in a class file then automatic default setting will be over-ridden.
 
+\subsection{Querying localisation}
+
+Localisation information is needed to customise a range of outputs. The
+\LaTeX{} kernel does not itself manage localisation, which is well-served by
+the bundles \pkg{babel} and \pkg{polyglossia}. To allow the kernel and other
+packages to access the current localisation information provided by \pkg{babel}
+or \pkg{polyglossia}, the command \cs{BCPdata} is defined by the kernel. The
+initial kernel definition expands to tag parts for \texttt{en-US}, as the
+kernel does not track localisation but does start out with a broadly US~English
+setup. However, if \pkg{babel} or \pkg{polyglossia} are loaded, it is redefined
+expand to the BCP-47 information from the appropriate package. The supported
+arguments are the BCP-47 tag breakdowns:
+\begin{itemize}
+  \item \texttt{tag} The full BCP-47 tag (e.g.~\texttt{en-US})
+  \item \texttt{language} (e.g.,~\texttt{de})
+  \item \texttt{region} (e.g.,~\texttt{AT})
+  \item \texttt{script} (e.g.,~\texttt{Latn})
+  \item \texttt{variant} (e.g.,~\texttt{1901})
+  \item \texttt{extension.t} (transformation, e.g.,~\texttt{en-t-ja})
+  \item \texttt{extension.u} (additional locale
+    information, e.g.,~\texttt{ar-u-nu-latn})
+  \item \texttt{extension.x} (private use area, e.g.,~\texttt{la-x-classic})
+\end{itemize}
+The information for the \emph{main} language for a document is be provided
+if these are prefixed by \texttt{main.}, e.g.~\texttt{main.language} will
+expand to the main language even if another language is currently active.
+
+In addition to the tag breakdown, the following semantic arguments are
+supported
+\begin{itemize}
+  \item \texttt{casing} The tag for case changing, e.g.~\texttt{el-x-iota}
+    could be selected rather than \texttt{el} to select a capital adscript
+    iota on uppercasing an \emph{ypogegrammeni}
+\end{itemize}
+
+For example, the case changing command \cs{MakeUppercase} is (conceptually)
+defined as
+\begin{verbatim}
+\ExpandArgs{e}\MakeUppercaseAux{\BCPdata{casing}}{#1}
+\end{verbatim}
+where |#1| is the user input and the first argument to
+\cs{MakeUppercaseAux} takes two arguments, the locale and input text.
+
 \section{Commands superseded for new material}
 
 A small number of commands were introduced as part of \LaTeXe{} in the
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index 457b55a6..3bda6478 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -341,6 +341,20 @@ line.
 %
 \githubissue{1015}
 
+\subsection{\cs{BCPdata}}
+
+Improvements in the Unicode handling for case changing have highlighted that
+the kernel has not to-date been locale-aware. The packages \pkg{babel} and
+\pkg{polyglossia} provide comprehensive locale support, but did not have
+an agreed unified interface to pass that information back to other code.
+Following discussion with the maintainers of those two bundles, the kernel
+now defines \cs{BCPdata} as a stub (so it is always defined), and \pkg{babel}
+and \pkg{polyglossia} will redefine it to provide the locale data. An agreed
+set of keywords mean that \cs{BCPdata} can be queried in a structured way
+by both the kernel and any other \enquote{consumer} packages.
+%
+\githubissue{1035}
+
 \subsection{Improve \cs{samepage}}
 
 The \cs{samepage} declaration sets various parameters to
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 6e9209b5..f5d0474f 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfinal.dtx}
-             [2023/03/28 v2.2z LaTeX Kernel (Final Settings)]
+             [2023/04/17 v2.3a LaTeX Kernel (Final Settings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfinal.dtx}
@@ -1062,6 +1062,24 @@
 \fi % End of reset block for 8-bit engines
 %    \end{macrocode}
 %
+% \begin{macro}{\BCPdata}
+% \changes{v2.3a}{2023/04/16}{Command added}
+%   A stub for use by \pkg{babel}, \pkg{polyglossia}, etc.
+%    \begin{macrocode}
+\ExplSyntaxOn
+\newcommand*\BCPdata[1]{
+  \str_case:nn {#1}
+    {
+      { language } { en }
+      { region }   { US }
+      { script }   { Latn }
+      { tag }      { en-US }
+    }
+}
+\ExplSyntaxOff
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\MakeUppercase}
 % \begin{macro}{\MakeLowercase}
 % \begin{macro}{\MakeTitlecase}
@@ -1088,6 +1106,7 @@
 % \changes{v2.2x}{2022/10/26}{Introduce optional argument for case-changing commands}
 % \changes{v2.2x}{2022/10/26}{Make case changing commands language-aware}
 % \changes{v2.2x}{2022/10/26}{Auto-detect \pkg{babel} locale}
+% \changes{v2.3a}{2023/04/11}{Use new generic mechanism to detect locale}
 % Wrappers around the L3 case changing functions.
 % |\protected| to make them mostly safe as replacements for |uppercase|
 % and |\lowercase|.  
@@ -1121,33 +1140,24 @@
   {
     \cs_set_nopar:Npn \reserved at a { }
     \tl_if_blank:nTF {#2}
-      { \@@text at case@aux@ }
-      { \keys_set:nn { __kernel } {#2} }
-    \use:c { text_ #1 case:Vn } \reserved at a {#3}
-  }
-\cs_new_protected:Npn \@@text at case@aux@ { }
-\tl_gput_right:Nn \@kernel at after@begindocument
-  {
-    \@ifpackageloaded { babel }
       {
-        \@ifpackagelater { babel } { 2020-01-15 }
+        \str_set:Nx \reserved at a
+          { \BCPdata { casing } }
+        \str_if_empty:NT \reserved at a
           {
-            \cs_gset_protected:Npn \@@text at case@aux@
-              {
-                \str_set:Nx \reserved at a
-                  { \localeinfo* { tag.bcp47 } }
-              }
+            \str_set:Nx \reserved at a
+              { \BCPdata { language } }
           }
-          { }
       }
-      { }
+      { \keys_set:nn { __kernel } {#2} }
+    \use:c { text_ #1 case:Vn } \reserved at a {#3}
   }
-\exp_args_generate:n { cnx }
 %    \end{macrocode}
 % The odd use of \emph{three} spaces here is needed as \pkg{ltcmd} uses the
 % name with one and two spaces to give a `friendly' error message for a runaway
 % argument: that means we can't use it here.
 %    \begin{macrocode}
+\exp_args_generate:n { cnx }
 \cs_set_protected:Npn \reserved at a #1
   {
     \cs_generate_variant:cn { text_ \str_lowercase:n {#1} case:nn } { V }
diff --git a/base/testfiles-lthooks/ltcmdhooks-001.tlg b/base/testfiles-lthooks/ltcmdhooks-001.tlg
index f964056f..5b5fddf6 100644
--- a/base/testfiles-lthooks/ltcmdhooks-001.tlg
+++ b/base/testfiles-lthooks/ltcmdhooks-001.tlg
@@ -58,7 +58,7 @@ l. ...\ShowHook{cmd/foo/after}
 #1#2->FOO #1 #2.
 l. ...\show\foo
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ...\show\@kernel at after@begindocument
 Update code for hook 'para/before' on input line ...:
 Update code for hook 'para/after' on input line ...:
diff --git a/base/testfiles/tlb-rollback-005.luatex.tlg b/base/testfiles/tlb-rollback-005.luatex.tlg
index d021195b..b481d7ae 100644
--- a/base/testfiles/tlb-rollback-005.luatex.tlg
+++ b/base/testfiles/tlb-rollback-005.luatex.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                 \makeatother
 (latexrelease.sty
@@ -839,7 +839,7 @@ Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                  \makeatother
 (minimal.cls
diff --git a/base/testfiles/tlb-rollback-005.tlg b/base/testfiles/tlb-rollback-005.tlg
index 5452d873..efc6229b 100644
--- a/base/testfiles/tlb-rollback-005.tlg
+++ b/base/testfiles/tlb-rollback-005.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (latexrelease.sty
@@ -1264,7 +1264,7 @@ Now handling font encoding U ...
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ......eatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (minimal.cls
diff --git a/base/testfiles/tlb-rollback-005.xetex.tlg b/base/testfiles/tlb-rollback-005.xetex.tlg
index 9bafb130..b27566b1 100644
--- a/base/testfiles/tlb-rollback-005.xetex.tlg
+++ b/base/testfiles/tlb-rollback-005.xetex.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (latexrelease.sty
@@ -836,7 +836,7 @@ Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localeinfo *{tag.bcp47}}}}{}}{}.
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
 l. ......eatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (minimal.cls





More information about the latex3-commits mailing list.