[latex3-commits] [latex3/latex3] main: Check for customised case mapping for non-std BCP47 (fixes #1239) (6c3bf9f5e)
github at latex-project.org
github at latex-project.org
Sat Oct 14 15:41:42 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/6c3bf9f5e82e7fe10ddb1a01123de0ac40922805
>---------------------------------------------------------------
commit 6c3bf9f5e82e7fe10ddb1a01123de0ac40922805
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Oct 14 14:27:36 2023 +0100
Check for customised case mapping for non-std BCP47 (fixes #1239)
>---------------------------------------------------------------
6c3bf9f5e82e7fe10ddb1a01123de0ac40922805
l3kernel/l3text-case.dtx | 5 ++++-
l3kernel/testfiles/m3text002.luatex.tlg | 5 ++++-
l3kernel/testfiles/m3text002.lvt | 3 +++
l3kernel/testfiles/m3text002.ptex.tlg | 5 ++++-
l3kernel/testfiles/m3text002.tlg | 5 ++++-
l3kernel/testfiles/m3text002.uptex.tlg | 5 ++++-
l3kernel/testfiles/m3text002.xetex.tlg | 5 ++++-
7 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 8d41dfb39..7872ed9ef 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -261,7 +261,9 @@
{ \@@_change_case_BCP:nnnnnw {#1} {#2} {#3} {#5} {#4} #4 - \q_@@_stop }
\cs_new:Npn \@@_change_case_BCP:nnnnnw #1#2#3#4#5#6 - #7 \q_@@_stop
{
- \cs_if_exist:cTF { @@_change_case_ #2 _ #6 -x- #4 :nnnnn }
+ \bool_lazy_or:nnTF
+ { \cs_if_exist_p:c { @@_change_case_ #2 _ #6 -x- #4 :nnnnn } }
+ { \tl_if_exist_p:c { l_@@_ #2 case_special_ #6 -x- #4 _tl } }
{ \@@_change_case_auxii:nnnn {#1} {#2} {#3} { #6 -x- #4 } }
{
\cs_if_exist:cTF { @@_change_case_ #2 _ #6 :nnnnn }
@@ -932,6 +934,7 @@
{
\tl_clear_new:c { l_@@_ #2 case _ #1 _ #3 _tl }
\tl_set:cn { l_@@_ #2 case _ #1 _ #3 _ tl } {#4}
+ \tl_clear_new:c { l_@@_ #2 case_special_ #3 _tl }
}
% \end{macrocode}
% \end{macro}
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index 5248d97e0..bcb7da80f 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -413,7 +413,10 @@ TEST 33: Case change customisation
============================================================
Defining \l__text_uppercase_ǰ_tl on line ...
Defining \l__text_uppercase_ǰ_xx_tl on line ...
-> ǰ\v J\v JXǰǰ\v I\v IXǰ.
+Defining \l__text_uppercase_special_xx_tl on line ...
+Defining \l__text_uppercase_ǰ_la-x-new_tl on line ...
+Defining \l__text_uppercase_special_la-x-new_tl on line ...
+> ǰ\v J\v JXǰǰ\v I\v I\v IXǰXǰ.
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index c6db23bf9..408136bce 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -412,6 +412,7 @@
{
\text_declare_uppercase_mapping:nn { "01F0 } { \v J }
\text_declare_uppercase_mapping:nnn { xx } { "01F0 } { \v I }
+ \text_declare_uppercase_mapping:nnn { la-x-new } { "01F0 } { \v I }
\tl_show:e
{
\text_lowercase:n { ǰ }
@@ -420,8 +421,10 @@
\text_titlecase_all:n { xǰ }
\text_lowercase:nn { xx } { ǰ }
\text_uppercase:nn { xx } { ǰ }
+ \text_uppercase:nn { la-x-new } { ǰ }
\text_titlecase_all:nn { xx } { ǰ }
\text_titlecase_all:nn { xx } { xǰ }
+ \text_titlecase_all:nn { la-x-new } { xǰ }
}
}
diff --git a/l3kernel/testfiles/m3text002.ptex.tlg b/l3kernel/testfiles/m3text002.ptex.tlg
index 9ea21a3dc..67172fd5c 100644
--- a/l3kernel/testfiles/m3text002.ptex.tlg
+++ b/l3kernel/testfiles/m3text002.ptex.tlg
@@ -412,7 +412,10 @@ l. ... }
TEST 33: Case change customisation
============================================================
Defining \l__text_uppercase_^^c7^^b0_xx_tl on line ...
-> ^^c7^^b0\v J\v JX^^c7^^b0^^c7^^b0\v I\v IX^^c7^^b0.
+Defining \l__text_uppercase_special_xx_tl on line ...
+Defining \l__text_uppercase_^^c7^^b0_la-x-new_tl on line ...
+Defining \l__text_uppercase_special_la-x-new_tl on line ...
+> ^^c7^^b0\v J\v JX^^c7^^b0^^c7^^b0\v I\v I\v IX^^c7^^b0X^^c7^^b0.
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index 96ab8cfe5..9fc858202 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -412,7 +412,10 @@ l. ... }
TEST 33: Case change customisation
============================================================
Defining \l__text_uppercase_^^c7^^b0_xx_tl on line ...
-> ^^c7^^b0\v J\v JX^^c7^^b0^^c7^^b0\v I\v IX^^c7^^b0.
+Defining \l__text_uppercase_special_xx_tl on line ...
+Defining \l__text_uppercase_^^c7^^b0_la-x-new_tl on line ...
+Defining \l__text_uppercase_special_la-x-new_tl on line ...
+> ^^c7^^b0\v J\v JX^^c7^^b0^^c7^^b0\v I\v I\v IX^^c7^^b0X^^c7^^b0.
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index d8350c2c6..fcade24d7 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -412,7 +412,10 @@ l. ... }
TEST 33: Case change customisation
============================================================
Defining \l__text_uppercase_^^c7^^b0_xx_tl on line ...
-> ^^c7^^b0\v J\v JX^^c7^^b0^^c7^^b0\v I\v IX^^c7^^b0.
+Defining \l__text_uppercase_special_xx_tl on line ...
+Defining \l__text_uppercase_^^c7^^b0_la-x-new_tl on line ...
+Defining \l__text_uppercase_special_la-x-new_tl on line ...
+> ^^c7^^b0\v J\v JX^^c7^^b0^^c7^^b0\v I\v I\v IX^^c7^^b0X^^c7^^b0.
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index 5248d97e0..bcb7da80f 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -413,7 +413,10 @@ TEST 33: Case change customisation
============================================================
Defining \l__text_uppercase_ǰ_tl on line ...
Defining \l__text_uppercase_ǰ_xx_tl on line ...
-> ǰ\v J\v JXǰǰ\v I\v IXǰ.
+Defining \l__text_uppercase_special_xx_tl on line ...
+Defining \l__text_uppercase_ǰ_la-x-new_tl on line ...
+Defining \l__text_uppercase_special_la-x-new_tl on line ...
+> ǰ\v J\v JXǰǰ\v I\v I\v IXǰXǰ.
<recently read> }
l. ... }
============================================================
More information about the latex3-commits
mailing list.