[latex3-commits] [git/LaTeX3-latex3-latex2e] main: Update l3backend and l3kernel to 2023-03-09 (8d00c024)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Mar 9 17:11:39 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : main
Link       : https://github.com/latex3/latex2e/commit/8d00c0248ac1ea051ef7a17932f319b4ae12d87d

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

commit 8d00c0248ac1ea051ef7a17932f319b4ae12d87d
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Mar 9 16:11:39 2023 +0000

    Update l3backend and l3kernel to 2023-03-09


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

8d00c0248ac1ea051ef7a17932f319b4ae12d87d
 texmf/tex/latex/l3backend/l3backend-dvipdfmx.def |  17 +--
 texmf/tex/latex/l3backend/l3backend-dvips.def    |  17 +--
 texmf/tex/latex/l3backend/l3backend-dvisvgm.def  |  17 +--
 texmf/tex/latex/l3backend/l3backend-luatex.def   |  29 +----
 texmf/tex/latex/l3backend/l3backend-luatex.lua   | 116 ++++++++++++++++++
 texmf/tex/latex/l3backend/l3backend-pdftex.def   |  28 +----
 texmf/tex/latex/l3backend/l3backend-xetex.def    |  17 +--
 texmf/tex/latex/l3kernel/expl3-code.tex          | 144 ++++++++++++++++++++---
 texmf/tex/latex/l3kernel/expl3-generic.tex       |   2 +-
 texmf/tex/latex/l3kernel/expl3.ltx               |   2 +-
 texmf/tex/latex/l3kernel/expl3.sty               |   2 +-
 11 files changed, 258 insertions(+), 133 deletions(-)

diff --git a/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def b/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def
index 36a61dec..a7028c53 100644
--- a/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def
+++ b/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def
@@ -26,7 +26,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-dvipdfmx.def}{2023-01-16}{}
+  {l3backend-dvipdfmx.def}{2023-03-09}{}
   {L3 backend support: dvipdfmx}
 \cs_if_exist:NTF \__kernel_dependency_version_check:nn
   {
@@ -66,21 +66,6 @@
 \cs_new_protected:Npn \__kernel_backend_scope_end:
   { \__kernel_backend_literal:n { x:grestore } }
 %% File: l3backend-color.dtx
-\cs_new_protected:Npn \__color_backend_pickup:N #1
-  {
-    \exp_args:NV \tl_if_head_is_space:nTF \current at color
-      {
-        \tl_set:Nn #1 { { gray } { 0 } }
-        \msg_warning:nnx { color } { unhandled }
-          { \current at color }
-      }
-      {
-        \exp_last_unbraced:Nx \__color_backend_pickup:w
-          { \current at color } \s__color_stop #1
-      }
-  }
-\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-  { \tl_set:Nn #3 { {#1} {#2} } }
 \cs_new_protected:Npn \__color_backend_select:n #1
   { \__kernel_backend_literal:n { pdf : bc ~ [ #1 ] } }
 \cs_new_eq:NN \__color_backend_select_cmyk:n \__color_backend_select:n
diff --git a/texmf/tex/latex/l3backend/l3backend-dvips.def b/texmf/tex/latex/l3backend/l3backend-dvips.def
index ff1c6cd5..21b73f6a 100644
--- a/texmf/tex/latex/l3backend/l3backend-dvips.def
+++ b/texmf/tex/latex/l3backend/l3backend-dvips.def
@@ -26,7 +26,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-dvips.def}{2023-01-16}{}
+  {l3backend-dvips.def}{2023-03-09}{}
   {L3 backend support: dvips}
 \cs_if_exist:NTF \__kernel_dependency_version_check:nn
   {
@@ -83,21 +83,6 @@
 \cs_new_protected:Npn \__kernel_backend_scope_end:
   { \__kernel_backend_literal:n { ps:grestore } }
 %% File: l3backend-color.dtx
-\cs_new_protected:Npn \__color_backend_pickup:N #1
-  {
-    \exp_args:NV \tl_if_head_is_space:nTF \current at color
-      {
-        \tl_set:Nn #1 { { gray } { 0 } }
-        \msg_warning:nnx { color } { unhandled }
-          { \current at color }
-      }
-      {
-        \exp_last_unbraced:Nx \__color_backend_pickup:w
-          { \current at color } \s__color_stop #1
-      }
-  }
-\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-  { \tl_set:Nn #3 { {#1} {#2} } }
 \cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { cmyk ~ #1 } }
 \cs_new_protected:Npn \__color_backend_select_gray:n #1
diff --git a/texmf/tex/latex/l3backend/l3backend-dvisvgm.def b/texmf/tex/latex/l3backend/l3backend-dvisvgm.def
index 4d83257e..bee45a1b 100644
--- a/texmf/tex/latex/l3backend/l3backend-dvisvgm.def
+++ b/texmf/tex/latex/l3backend/l3backend-dvisvgm.def
@@ -26,7 +26,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-dvisvgm.def}{2023-01-16}{}
+  {l3backend-dvisvgm.def}{2023-03-09}{}
   {L3 backend support: dvisvgm}
 \cs_if_exist:NTF \__kernel_dependency_version_check:nn
   {
@@ -97,21 +97,6 @@
   }
 \cs_generate_variant:Nn \__kernel_backend_scope:n { x }
 %% File: l3backend-color.dtx
-\cs_new_protected:Npn \__color_backend_pickup:N #1
-  {
-    \exp_args:NV \tl_if_head_is_space:nTF \current at color
-      {
-        \tl_set:Nn #1 { { gray } { 0 } }
-        \msg_warning:nnx { color } { unhandled }
-          { \current at color }
-      }
-      {
-        \exp_last_unbraced:Nx \__color_backend_pickup:w
-          { \current at color } \s__color_stop #1
-      }
-  }
-\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-  { \tl_set:Nn #3 { {#1} {#2} } }
 \cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { cmyk ~ #1 } }
 \cs_new_protected:Npn \__color_backend_select_gray:n #1
diff --git a/texmf/tex/latex/l3backend/l3backend-luatex.def b/texmf/tex/latex/l3backend/l3backend-luatex.def
index e5b62586..3f89c1f9 100644
--- a/texmf/tex/latex/l3backend/l3backend-luatex.def
+++ b/texmf/tex/latex/l3backend/l3backend-luatex.def
@@ -26,7 +26,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-luatex.def}{2023-01-16}{}
+  {l3backend-luatex.def}{2023-03-09}{}
   {L3 backend support: PDF output (LuaTeX)}
 \cs_if_exist:NTF \__kernel_dependency_version_check:nn
   {
@@ -82,30 +82,6 @@
   }
 \cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
 %% File: l3backend-color.dtx
-\cs_new_protected:Npn \__color_backend_pickup:N #1
-  {
-    \exp_last_unbraced:Nx \__color_backend_pickup:w
-      { \current at color } ~ 0 ~ 0 ~ 0 \s__color_stop #1
-  }
-\cs_new_protected:Npn \__color_backend_pickup:w
-  #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7
-  {
-    \str_if_eq:nnTF {#2} { g }
-      { \tl_set:Nn #7 { { gray } {#1} } }
-      {
-        \str_if_eq:nnTF {#4} { rg }
-          { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } }
-          {
-            \str_if_eq:nnTF {#5} { k }
-              { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } }
-              {
-                \tl_set:Nn #1 { { gray } { 0 } }
-                \msg_warning:nnx { color } { unhandled }
-                  { \current at color }
-              }
-          }
-      }
-  }
 \int_new:N \l__color_backend_stack_int
 \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3
   {
@@ -128,6 +104,8 @@
   }
 \tl_new:N \l__color_backend_fill_tl
 \tl_new:N \l__color_backend_stroke_tl
+\tl_set:Nn \l__color_backend_fill_tl { 0 ~ g }
+\tl_set:Nn \l__color_backend_stroke_tl { 0 ~ G }
 \cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:nn { #1 ~ k } { #1 ~ K } }
 \cs_new_protected:Npn \__color_backend_select_gray:n #1
@@ -343,6 +321,7 @@
 \cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn
 \cs_new_eq:NN \__color_backend_fill_reset: \__color_backend_reset:
 \cs_new_eq:NN \__color_backend_stroke_reset: \__color_backend_reset:
+\lua_load_module:n {l3backend-luatex}
 %% File: l3backend-box.dtx
 \cs_new_protected:Npn \__box_backend_clip:N #1
   {
diff --git a/texmf/tex/latex/l3backend/l3backend-luatex.lua b/texmf/tex/latex/l3backend/l3backend-luatex.lua
new file mode 100644
index 00000000..d784e77c
--- /dev/null
+++ b/texmf/tex/latex/l3backend/l3backend-luatex.lua
@@ -0,0 +1,116 @@
+--
+-- This is file `l3backend-luatex.lua',
+-- generated with the docstrip utility.
+--
+-- The original source files were:
+--
+-- l3backend-color.dtx  (with options: `lua')
+-- l3backend-opacity.dtx  (with options: `lua')
+-- 
+-- Copyright (C) 2023 The LaTeX Project
+-- 
+-- It may be distributed and/or modified under the conditions of
+-- the LaTeX Project Public License (LPPL), either version 1.3c of
+-- this license or (at your option) any later version.  The latest
+-- version of this license is in the file:
+-- 
+--    https://www.latex-project.org/lppl.txt
+-- 
+-- This file is part of the "l3backend bundle" (The Work in LPPL)
+-- and all files in that bundle must be distributed together.
+-- 
+-- File: l3backend-color.dtx
+local l = lpeg
+local spaces = l.P' '^0
+local digit16 = l.R('09', 'af', 'AF')
+
+local octet = digit16 * digit16 / function(s)
+  return string.format('%.3g ', tonumber(s, 16) / 255)
+end
+
+if luaotfload and luaotfload.set_transparent_colorstack then
+  local htmlcolor = l.Cs(octet * octet * octet * -1 * l.Cc'rg')
+  local color_export = {
+    token.create'tex_endlocalcontrol:D',
+    token.create'tex_hpack:D',
+    token.new(0, 1),
+    token.create'color_export:nnN',
+    token.new(0, 1),
+    '',
+    token.new(0, 2),
+    token.new(0, 1),
+    'backend',
+    token.new(0, 2),
+    token.create'l_tmpa_tl',
+    token.create'exp_after:wN',
+    token.create'__color_select:nn',
+    token.create'l_tmpa_tl',
+    token.new(0, 2),
+  }
+  local group_end = token.create'group_end:'
+  local value = (1 - l.P'}')^0
+  luatexbase.add_to_callback('luaotfload.parse_color', function (value)
+    local html = htmlcolor:match(value)
+    if html then return html end
+
+    tex.runtoks(function()
+      token.get_next()
+      color_export[6] = value
+      tex.sprint(-2, color_export)
+    end)
+    local list = token.scan_list()
+    if not list.head or list.head.next
+        or list.head.subtype ~= node.subtype'pdf_colorstack' then
+      error'Unexpected backend behavior'
+    end
+    local cmd = list.head.data
+    node.free(list)
+    return cmd
+  end, 'l3color')
+end
+-- File: l3backend-opacity.dtx
+local pdfmanagement_active do
+  local pdfmanagement_if_active_p = token.create'pdfmanagement_if_active_p:'
+  local cmd = pdfmanagement_if_active_p.cmdname
+  if cmd == 'undefined_cs' then
+    pdfmanagement_active = false
+  else
+    token.put_next(pdfmanagement_if_active_p)
+    pdfmanagement_active = token.scan_int() ~= 0
+  end
+end
+
+if pdfmanagement_active and luaotfload and luaotfload.set_transparent_colorstack then
+  luaotfload.set_transparent_colorstack(token.create'c__opacity_backend_stack_int'.index)
+
+  local transparent_register = {
+    token.create'pdfmanagement_add:nnn',
+    token.new(0, 1),
+      'Page/Resources/ExtGState',
+    token.new(0, 2),
+    token.new(0, 1),
+      '',
+    token.new(0, 2),
+    token.new(0, 1),
+      '<</ca ',
+      '',
+      '/CA ',
+      '',
+      '>>',
+    token.new(0, 2),
+  }
+  luatexbase.add_to_callback('luaotfload.parse_transparent', function(value)
+    value = (octet * -1):match(value)
+    if not value then
+      tex.error'Invalid transparency value'
+      return
+    end
+    value = value:sub(1, -2)
+    local result = 'opacity' .. value
+    tex.runtoks(function()
+      transparent_register[6], transparent_register[10], transparent_register[12] = result, value, value
+      tex.sprint(-2, transparent_register)
+    end)
+    return '/' .. result .. ' gs'
+  end, 'l3opacity')
+end
diff --git a/texmf/tex/latex/l3backend/l3backend-pdftex.def b/texmf/tex/latex/l3backend/l3backend-pdftex.def
index 174146e2..89de73d8 100644
--- a/texmf/tex/latex/l3backend/l3backend-pdftex.def
+++ b/texmf/tex/latex/l3backend/l3backend-pdftex.def
@@ -26,7 +26,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-pdftex.def}{2023-01-16}{}
+  {l3backend-pdftex.def}{2023-03-09}{}
   {L3 backend support: PDF output (pdfTeX)}
 \cs_if_exist:NTF \__kernel_dependency_version_check:nn
   {
@@ -82,30 +82,6 @@
   }
 \cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
 %% File: l3backend-color.dtx
-\cs_new_protected:Npn \__color_backend_pickup:N #1
-  {
-    \exp_last_unbraced:Nx \__color_backend_pickup:w
-      { \current at color } ~ 0 ~ 0 ~ 0 \s__color_stop #1
-  }
-\cs_new_protected:Npn \__color_backend_pickup:w
-  #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7
-  {
-    \str_if_eq:nnTF {#2} { g }
-      { \tl_set:Nn #7 { { gray } {#1} } }
-      {
-        \str_if_eq:nnTF {#4} { rg }
-          { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } }
-          {
-            \str_if_eq:nnTF {#5} { k }
-              { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } }
-              {
-                \tl_set:Nn #1 { { gray } { 0 } }
-                \msg_warning:nnx { color } { unhandled }
-                  { \current at color }
-              }
-          }
-      }
-  }
 \int_new:N \l__color_backend_stack_int
 \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3
   {
@@ -128,6 +104,8 @@
   }
 \tl_new:N \l__color_backend_fill_tl
 \tl_new:N \l__color_backend_stroke_tl
+\tl_set:Nn \l__color_backend_fill_tl { 0 ~ g }
+\tl_set:Nn \l__color_backend_stroke_tl { 0 ~ G }
 \cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:nn { #1 ~ k } { #1 ~ K } }
 \cs_new_protected:Npn \__color_backend_select_gray:n #1
diff --git a/texmf/tex/latex/l3backend/l3backend-xetex.def b/texmf/tex/latex/l3backend/l3backend-xetex.def
index 3a37d457..6672e447 100644
--- a/texmf/tex/latex/l3backend/l3backend-xetex.def
+++ b/texmf/tex/latex/l3backend/l3backend-xetex.def
@@ -26,7 +26,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-xetex.def}{2023-01-16}{}
+  {l3backend-xetex.def}{2023-03-09}{}
   {L3 backend support: XeTeX}
 \cs_if_exist:NTF \__kernel_dependency_version_check:nn
   {
@@ -66,21 +66,6 @@
 \cs_new_protected:Npn \__kernel_backend_scope_end:
   { \__kernel_backend_literal:n { x:grestore } }
 %% File: l3backend-color.dtx
-\cs_new_protected:Npn \__color_backend_pickup:N #1
-  {
-    \exp_args:NV \tl_if_head_is_space:nTF \current at color
-      {
-        \tl_set:Nn #1 { { gray } { 0 } }
-        \msg_warning:nnx { color } { unhandled }
-          { \current at color }
-      }
-      {
-        \exp_last_unbraced:Nx \__color_backend_pickup:w
-          { \current at color } \s__color_stop #1
-      }
-  }
-\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-  { \tl_set:Nn #3 { {#1} {#2} } }
 \cs_new_protected:Npn \__color_backend_select:n #1
   { \__kernel_backend_literal:n { pdf : bc ~ [ #1 ] } }
 \cs_new_eq:NN \__color_backend_select_cmyk:n \__color_backend_select:n
diff --git a/texmf/tex/latex/l3kernel/expl3-code.tex b/texmf/tex/latex/l3kernel/expl3-code.tex
index 8f2c6f05..d2edbe10 100644
--- a/texmf/tex/latex/l3kernel/expl3-code.tex
+++ b/texmf/tex/latex/l3kernel/expl3-code.tex
@@ -71,7 +71,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-02-22}%
+\def\ExplFileDate{2023-03-09}%
 \begingroup
   \def\next{\endgroup}%
   \expandafter\ifx\csname PackageError\endcsname\relax
@@ -957,6 +957,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   \__kernel_primitive:NN \dvivariable           \tex_dvivariable:D
   \__kernel_primitive:NN \eTeXglueshrinkorder   \tex_eTeXglueshrinkorder:D
   \__kernel_primitive:NN \eTeXgluestretchorder  \tex_eTeXgluestretchorder:D
+  \__kernel_primitive:NN \endlocalcontrol       \tex_endlocalcontrol:D
   \__kernel_primitive:NN \etoksapp              \tex_etoksapp:D
   \__kernel_primitive:NN \etokspre              \tex_etokspre:D
   \__kernel_primitive:NN \exceptionpenalty      \tex_exceptionpenalty:D
@@ -28485,6 +28486,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
 \int_new:N \l__color_internal_int
 \tl_new:N \l__color_internal_tl
 \scan_new:N \s__color_mark
+\bool_new:N \l__color_ignore_error_bool
 \prg_new_conditional:Npnn \color_if_exist:n #1 { p , T, F, TF }
   {
     \prop_if_exist:cTF { l__color_named_ #1 _prop }
@@ -28651,17 +28653,11 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   }
 \cs_new_protected:Npn \__color_parse_loop:w #1 ! #2 ! #3 ! #4 ! #5 \s__color_stop
   {
-    \bool_lazy_or:nnF
-      { \tl_if_blank_p:n {#1} }
-      { \int_compare_p:nNn {#1} = { 100 } }
+    \tl_if_blank:nF {#1}
       {
-        \int_compare:nNnTF {#1} = { 0 }
-          {
-            \tl_if_blank:nTF {#2}
-              { \__color_extract:nNN { white } }
-              { \__color_extract:nNN {#2} }
-                \l__color_model_tl \l__color_value_tl
-          }
+        \bool_lazy_and:nnTF
+          { \fp_compare_p:nNn {#1} > { 0 } }
+          { \fp_compare_p:nNn {#1} < { 100 } }
           {
             \use:x
               {
@@ -28669,11 +28665,29 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
                   { \tl_if_blank:nTF {#2} { white } {#2} }
               }
           }
+          { \__color_parse_loop_check:nn {#1} {#2} }
       }
     \tl_if_blank:nF {#3}
       { \__color_parse_loop:w #3 ! #4 ! #5 \s__color_stop }
     \__color_parse_end:
   }
+\cs_new_protected:Npn \__color_parse_loop_check:nn #1#2
+  {
+    \bool_if:NF \l__color_ignore_error_bool
+      {
+        \bool_lazy_or:nnT
+          { \fp_compare_p:nNn {#1} < { 0 } }
+          { \fp_compare_p:nNn {#1} > { 100 } }
+          { \msg_error:nnnnn { color } { out-of-range } {#1} { 0 } { 100 } }
+      }
+    \fp_compare:nNnF {#1} > \c_zero_fp
+      {
+        \tl_if_blank:nTF {#2}
+          { \__color_extract:nNN { white } }
+          { \__color_extract:nNN {#2} }
+            \l__color_model_tl \l__color_value_tl
+      }
+  }
 \cs_new_protected:Npn \__color_parse_loop:nn #1#2
   {
     \color_if_exist:nTF {#2}
@@ -29184,6 +29198,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
             \prop_if_in:cnF { l__color_named_ #1 _prop } {##1}
               {
                 \group_begin:
+                  \bool_set_true:N \l__color_ignore_error_bool
                   \tl_set:cn { l__color_named_ #3 _tl } {##1}
                   \__color_parse:nN {#2} \l__color_internal_tl
                 \exp_args:NNNV \group_end:
@@ -30109,6 +30124,13 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
     LaTeX~was~asked~to~define~a~new~color~model~called~'#1',~but~
     this~color~model~already~exists.
   }
+\msg_new:nnnn { color } { out-of-range }
+  { Input~value~#1~out~of~range~[#2,~#3]. }
+  {
+    LaTeX~was~expecting~a~value~in~the~range~[#2,~#3]~as~part~of~a~color,~
+    but~you~gave~#1.~LaTeX~will~assume~you~meant~the~limit~of~the~range~
+    and~continue.
+  }
 \msg_new:nnnn { color } { separation-alternative-model }
   { Separation~color~space~'#1'~require~an~alternative~model. }
   {
@@ -33505,9 +33527,17 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
       { \__text_change_case_if_greek_p:n {#4} }
       { ! \__text_codepoint_compare_p:nNn {#4} = { "0374 } }
       {
-        \exp_args:Ne \__text_change_case_upper_el:nnn
+        \__text_change_case_if_greek_spacing_diacritic:nTF {#4}
           {
-            \codepoint_to_nfd:n { \__text_codepoint_from_chars:Nw #4 }
+            \__text_change_case_store:n {#4}
+            \__text_change_case_loop:nnw
+          }
+          {
+            \exp_args:Ne \__text_change_case_upper_el:nnn
+              {
+                \codepoint_to_nfd:n
+                  { \__text_codepoint_from_chars:Nw #4 }
+              }
           }
             {#2} {#3}
       }
@@ -33805,6 +33835,84 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
       \fi:
     \fi:
   }
+\prg_new_conditional:Npnn \__text_change_case_if_greek_spacing_diacritic:n
+  #1 { TF }
+  {
+    \exp_args:Nf \__text_change_case_if_greek_spacing_diacritic:n
+      { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } }
+  }
+\cs_new:Npn \__text_change_case_if_greek_spacing_diacritic:n #1
+  {
+    \if_int_compare:w #1 < "1FBD \exp_stop_f:
+      \if_int_compare:w #1 = "037A \exp_stop_f:
+        \prg_return_true:
+      \else:
+        \prg_return_false:
+      \fi:
+    \else:
+      \if_int_compare:w #1 = "1FBD \exp_stop_f:
+        \prg_return_true:
+      \else:
+        \if_int_compare:w #1 = "1FBF \exp_stop_f:
+          \prg_return_true:
+        \else:
+          \if_int_compare:w #1 = "1FC0 \exp_stop_f:
+            \prg_return_true:
+          \else:
+            \if_int_compare:w #1 = "1FC1 \exp_stop_f:
+              \prg_return_true:
+            \else:
+              \if_int_compare:w #1 = "1FCD \exp_stop_f:
+                \prg_return_true:
+              \else:
+                \if_int_compare:w #1 = "1FCE \exp_stop_f:
+                  \prg_return_true:
+                \else:
+                  \if_int_compare:w #1 = "1FCF \exp_stop_f:
+                    \prg_return_true:
+                   \else:
+                    \if_int_compare:w #1 = "1FDD \exp_stop_f:
+                      \prg_return_true:
+                    \else:
+                      \if_int_compare:w #1 = "1FDE \exp_stop_f:
+                        \prg_return_true:
+                      \else:
+                        \if_int_compare:w #1 = "1FDF \exp_stop_f:
+                          \prg_return_true:
+                        \else:
+                          \if_int_compare:w #1 = "1FED \exp_stop_f:
+                            \prg_return_true:
+                          \else:
+                            \if_int_compare:w #1 = "1FEE \exp_stop_f:
+                              \prg_return_true:
+                            \else:
+                              \if_int_compare:w #1 = "1FEF \exp_stop_f:
+                                \prg_return_true:
+                              \else:
+                                \if_int_compare:w #1 = "1FFD \exp_stop_f:
+                                  \prg_return_true:
+                                \else:
+                                  \if_int_compare:w #1 = "1FFE \exp_stop_f:
+                                    \prg_return_true:
+                                  \else:
+                                    \prg_return_false:
+                                  \fi:
+                                \fi:
+                              \fi:
+                            \fi:
+                          \fi:
+                        \fi:
+                      \fi:
+                    \fi:
+                  \fi:
+                \fi:
+              \fi:
+            \fi:
+          \fi:
+        \fi:
+      \fi:
+    \fi:
+  }
 \prg_new_conditional:Npnn \__text_change_case_if_greek_diacritic:n
   #1 { TF , p }
   {
@@ -33903,9 +34011,13 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   }
 \cs_new:Npn \__text_change_case_boundary_upper_el:nnn #1#2#3
   {
-    \bool_lazy_or:nnTF
-      { \__text_codepoint_compare_p:nNn {#3} = { "03AE } }
-      { \__text_codepoint_compare_p:nNn {#3} = { "1F22 } }
+    \bool_lazy_any:nTF
+      {
+        { \__text_codepoint_compare_p:nNn {#3} = { "0389 } }
+        { \__text_codepoint_compare_p:nNn {#3} = { "03AE } }
+        { \__text_codepoint_compare_p:nNn {#3} = { "1F22 } }
+        { \__text_codepoint_compare_p:nNn {#3} = { "1F2A } }
+      }
       { \__text_change_case_boundary_upper_el:nnnw {#1} {#2} {#3} }
       { \__text_change_case_loop:nnw {#1} {#2} #3 }
   }
diff --git a/texmf/tex/latex/l3kernel/expl3-generic.tex b/texmf/tex/latex/l3kernel/expl3-generic.tex
index 336d9a99..128b67be 100644
--- a/texmf/tex/latex/l3kernel/expl3-generic.tex
+++ b/texmf/tex/latex/l3kernel/expl3-generic.tex
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-02-22}%
+\def\ExplFileDate{2023-03-09}%
 \let\ExplLoaderFileDate\ExplFileDate
 \begingroup
   \catcode`\_=11
diff --git a/texmf/tex/latex/l3kernel/expl3.ltx b/texmf/tex/latex/l3kernel/expl3.ltx
index e94af311..a2266bdb 100644
--- a/texmf/tex/latex/l3kernel/expl3.ltx
+++ b/texmf/tex/latex/l3kernel/expl3.ltx
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-02-22}%
+\def\ExplFileDate{2023-03-09}%
 \let\ExplLoaderFileDate\ExplFileDate
 \begingroup
   \catcode`\_=11
diff --git a/texmf/tex/latex/l3kernel/expl3.sty b/texmf/tex/latex/l3kernel/expl3.sty
index 84451c96..f2cf12de 100644
--- a/texmf/tex/latex/l3kernel/expl3.sty
+++ b/texmf/tex/latex/l3kernel/expl3.sty
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-02-22}%
+\def\ExplFileDate{2023-03-09}%
 \let\ExplLoaderFileDate\ExplFileDate
 \ProvidesPackage{expl3}
   [%





More information about the latex3-commits mailing list.