[latex3-commits] [git/LaTeX3-latex3-latex3] main: Uppercasing Greek: correct el-x-iota output (d413122f5)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Feb 2 16:49:31 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/d413122f54c31a6ee4eecc36493c390a804550c1

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

commit d413122f54c31a6ee4eecc36493c390a804550c1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Feb 2 15:49:31 2023 +0000

    Uppercasing Greek: correct el-x-iota output


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

d413122f54c31a6ee4eecc36493c390a804550c1
 l3kernel/l3text-case.dtx                | 100 +++++++++++++++++++++-----------
 l3kernel/testfiles/m3text002.luatex.tlg |  10 +++-
 l3kernel/testfiles/m3text002.lvt        |   8 +++
 l3kernel/testfiles/m3text002.tlg        |  10 +++-
 l3kernel/testfiles/m3text002.xetex.tlg  |  10 +++-
 5 files changed, 99 insertions(+), 39 deletions(-)

diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 41ea3c6b1..b411239c7 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -861,8 +861,6 @@
 %     \@@_change_case_upper_el_aux:nnnn ,
 %     \@@_change_case_upper_el-x-iota:nnnn
 %   }
-% \begin{macro}[EXP]
-%   {\@@_change_case_upper_el:n, \@@_change_case_upper_el-x-iota:n}
 % \begin{macro}[EXP]{\@@_change_case_upper_el:nnn}
 % \begin{macro}[EXP]{\@@_change_case_upper_el:nnnw}
 % \begin{macro}[EXP]
@@ -873,8 +871,14 @@
 % \begin{macro}[EXP]{\@@_change_case_upper_el_dialytika:nnn}
 % \begin{macro}[EXP]{\@@_change_case_upper_el_dialytika:n}
 % \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnnw}
-% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnN}
-% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnn}
+% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnnN}
+% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnnn}
+% \begin{macro}[EXP]
+%   {
+%     \@@_change_case_upper_el_ypogegrammeni:n        ,
+%     \@@_change_case_upper_el-x-iota_ypogegrammeni:n ,
+%     \@@_change_case_upper_el_ypogegrammeni_aux:n
+%   }
 % \begin{macro}[EXP]{\@@_change_case_upper_el_gobble:nnw}
 % \begin{macro}[EXP]{\@@_change_case_upper_el_gobble:nnN}
 % \begin{macro}[EXP]{\@@_change_case_upper_el_gobble:nnn}
@@ -915,7 +919,8 @@
           {
             \@@_change_case_store:e
               {
-                \use:c { @@_change_case_upper_ #3 :n } {#4}
+                \codepoint_generate:nn { "0399 }
+                  { \char_value_catcode:n { "0399 } }
               }
             \@@_change_case_loop:nnw {#2} {#3}
           }
@@ -924,13 +929,6 @@
   }
 \cs_new_eq:cN { @@_change_case_upper_el-x-iota:nnnn }
   \@@_change_case_upper_el:nnnn
-\cs_new:Npn \@@_change_case_upper_el:n #1
-  {
-    \codepoint_generate:nn { "0399 }
-      { \char_value_catcode:n { "0399 } }
-  }
-\cs_new:cpn { @@_change_case_upper_el-x-iota:n } #1
-  { \exp_not:n {#1} }
 \cs_new:Npn \@@_change_case_upper_el:nnn #1#2#3
   {
     \@@_codepoint_process:nN
@@ -1033,19 +1031,19 @@
           { \@@_change_case_upper_el_hiatus:nnnw {#2} {#3} {#1} }
           {
             \@@_change_case_if_greek_diacritic:nTF {#4}
-              {
-                \@@_change_case_store:e
-                  { \@@_change_case_codepoint:nn { upper } {#1} }
-                \@@_change_case_upper_el_gobble:nnw {#2} {#3}
-              }
+              { \@@_change_case_upper_el:nnn {#1} {#2} {#3} }
               {
                 \@@_codepoint_compare:nNnTF {#4} = { "0345 }
-                  { \@@_change_case_store:e { [XXX] } }
+                  {
+                    \@@_change_case_store:e
+                      { \use:c { @@_change_case_upper_ #3 _ypogegrammeni:n } {#1} }
+                    \@@_change_case_loop:nnw {#2} {#3}
+                  }
                   {
                     \@@_change_case_store:e
                       { \@@_change_case_codepoint:nn { upper } {#1} }
+                    \@@_change_case_loop:nnw {#2} {#3} #4
                   }
-                \@@_change_case_loop:nnw {#2} {#3} #4
               }
           }
       }
@@ -1089,32 +1087,65 @@
 \cs_new:Npn \@@_change_case_upper_el_hiatus:nnnw
   #1#2#3#4 \q_@@_recursion_stop
   {
-    \@@_change_case_store:e
-      { \@@_change_case_codepoint:nn { upper } {#3} }
     \tl_if_head_is_N_type:nTF {#4}
-      { \@@_change_case_upper_el_hiatus:nnN }
-      { \@@_change_case_loop:nnw }
+      { \@@_change_case_upper_el_hiatus:nnnN {#3} }
+      {
+        \@@_change_case_store:e
+          { \@@_change_case_codepoint:nn { upper } {#3} }
+        \@@_change_case_loop:nnw
+      }
         {#1} {#2} #4 \q_@@_recursion_stop
   }
-\cs_new:Npn \@@_change_case_upper_el_hiatus:nnN #1#2#3
+\cs_new:Npn \@@_change_case_upper_el_hiatus:nnnN #1#2#3#4
   {
-    \token_if_cs:NTF #3
-      { \@@_change_case_loop:nnw {#1} {#2} #3 }
+    \token_if_cs:NTF #4
+      {
+        \@@_change_case_store:e
+          { \@@_change_case_codepoint:nn { upper } {#1} }
+        \@@_change_case_loop:nnw {#2} {#3} #4
+      }
       {
         \@@_codepoint_process:nN
-          { \@@_change_case_upper_el_hiatus:nnn {#1} {#2} } #3
+          { \@@_change_case_upper_el_hiatus:nnnn {#1} {#2} {#3} } #4
       }
   }
-\cs_new:Npn \@@_change_case_upper_el_hiatus:nnn #1#2#3
+\cs_new:Npn \@@_change_case_upper_el_hiatus:nnnn #1#2#3#4
   {
-    \@@_change_case_if_takes_dialytika:nTF {#3}
+    \@@_change_case_if_takes_dialytika:nTF {#4}
       {
-        \@@_change_case_upper_el_dialytika:n {#3}
-        \@@_change_case_upper_el_gobble:nnw {#1} {#2}
+        \@@_change_case_store:e
+          { \@@_change_case_codepoint:nn { upper } {#1} }
+        \@@_change_case_upper_el_dialytika:n {#4}
+        \@@_change_case_upper_el_gobble:nnw {#2} {#3}
       }
-      { \@@_change_case_loop:nnw {#1} {#2} #3 }
+      { \@@_change_case_upper_el:nnn {#1} {#2} {#3} #4 }
   }
 %    \end{macrocode}
+%   Handling the \emph{ypogegrammeni} output depends on the selected approach
+%    \begin{macrocode}
+\cs_new:Npn \@@_change_case_upper_el_ypogegrammeni:n #1
+  {
+    \@@_change_case_codepoint:nn { upper } {#1}
+    \codepoint_generate:nn { "0399 }
+      { \char_value_catcode:n { "0399 } }
+  }
+\cs_new:cpn { @@_change_case_upper_el-x-iota_ypogegrammeni:n } #1
+  {
+    \int_case:nnF
+      { \@@_codepoint_from_chars:Nw #1 }
+      {
+        { "0391 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FBC } }
+        { "03B1 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FBC } }
+        { "0397 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FCC } }
+        { "03B7 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FCC } }
+        { "03A9 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FFC } }
+        { "03C9 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FFC } }
+      }
+      { \@@_change_case_upper_el_ypogegrammeni:n {#1} }
+  }
+\cs_new:Npn \@@_change_case_upper_el_ypogegrammeni_aux:n #1
+  { \codepoint_generate:nn {#1} { \char_value_catcode:n {#1} } }
+%    \end{macrocode}
 %   For clearing out trailing combining marks after we have dealt with
 %   the first one.
 %    \begin{macrocode}
@@ -1316,7 +1347,8 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:Nnnw}
+% \begin{macro}[EXP]
+%   {\@@_change_case_boundary_upper_el:Nnnw, \@@_change_case_boundary_upper_el-x-iota:Nnnw}
 % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnN}
 % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnn}
 % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnnw}
@@ -1333,6 +1365,8 @@
       { \@@_change_case_loop:nnw }
         {#2} {#3} #4 \q_@@_recursion_stop
   }
+\cs_new_eq:cN { @@_change_case_boundary_upper_el-x-iota:Nnnw }
+  \@@_change_case_boundary_upper_el:Nnnw
 \cs_new:Npn \@@_change_case_boundary_upper_el:nnN #1#2#3
   {
     \token_if_cs:NTF #3
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index b9356aa07..c6913199f 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -193,10 +193,10 @@ TEST 17: Greek
 Ὀδυσσεύς
 ΉΙ
 ΗΙ
-ῌ
+ῌ
 ΗΊ
 ΗΙ
-ῌ
+ῌ
 ἈἉἊἋἌἍἎἏ
 ΑΑΑΑΑΑΑΑ
 ἘἙἚἛἜἝ
@@ -211,6 +211,12 @@ TEST 17: Greek
 ΥΥΥΥΥΥΥΥ
 ὨὩὪὫὬὭὮὯ
 ΩΩΩΩΩΩΩΩ
+ΑΙΑΙΑΙΑΙΑΙΑΙΑΙΑΙ
+ᾼᾼᾼᾼᾼᾼᾼᾼ
+ΗΙΗΙΗΙΗΙΗΙΗΙΗΙΗΙ
+ῌῌῌῌῌῌῌῌ
+ΩΙΩΙΩΙΩΙΩΙΩΙΩΙΩΙ
+ῼῼῼῼῼῼῼῼ
 ============================================================
 ============================================================
 TEST 18: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index ee9a712c6..698e80c6f 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -176,6 +176,11 @@
       \text_uppercase:n         {#1} \NEWLINE
       \text_uppercase:nn { el } {#1}
     }
+  \cs_set:Npn \greektestiota:n #1
+    {
+      \text_uppercase:nn { el }        {#1} \NEWLINE
+      \text_uppercase:nn { el-x-iota } {#1}
+    }
 \TIMO
 
 \TESTEXP { Greek }
@@ -213,6 +218,9 @@
     \greektest:n { ὀὁὂὃὄὅ }                               \NEWLINE
     \greektest:n { ὐὑὒὓὔὕὖὗ }                             \NEWLINE
     \greektest:n { ὠὡὢὣὤὥὦὧ }                             \NEWLINE
+    \greektestiota:n { ᾀᾁᾂᾃᾄᾅᾆᾇ }                         \NEWLINE
+    \greektestiota:n { ᾐᾑᾒᾓᾔᾕᾖᾗ }                         \NEWLINE
+    \greektestiota:n { ᾠᾡᾢᾣᾤᾦᾧᾥ }                         \NEWLINE
   }
 
 \TESTEXP { Turkish/Azeri }
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index 4caa73387..f10b6e3d0 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -193,10 +193,10 @@ TEST 17: Greek
 ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82
 ^^ce^^89^^ce^^99
 ^^ce^^97^^ce^^99
-^^ce^^97^^cd^^85
+^^e1^^bf^^8c
 ^^ce^^97^^ce^^99^^cc^^81
 ^^ce^^97^^ce^^99
-^^ce^^97^^cd^^85
+^^e1^^bf^^8c
 ^^e1^^bc^^88^^e1^^bc^^89^^e1^^bc^^8a^^e1^^bc^^8b^^e1^^bc^^8c^^e1^^bc^^8d^^e1^^bc^^8e^^e1^^bc^^8f
 ^^ce^^91^^ce^^91^^ce^^91^^ce^^91^^ce^^91^^ce^^91^^ce^^91^^ce^^91
 ^^e1^^bc^^98^^e1^^bc^^99^^e1^^bc^^9a^^e1^^bc^^9b^^e1^^bc^^9c^^e1^^bc^^9d
@@ -211,6 +211,12 @@ TEST 17: Greek
 ^^ce^^a5^^ce^^a5^^ce^^a5^^ce^^a5^^ce^^a5^^ce^^a5^^ce^^a5^^ce^^a5
 ^^e1^^bd^^a8^^e1^^bd^^a9^^e1^^bd^^aa^^e1^^bd^^ab^^e1^^bd^^ac^^e1^^bd^^ad^^e1^^bd^^ae^^e1^^bd^^af
 ^^ce^^a9^^ce^^a9^^ce^^a9^^ce^^a9^^ce^^a9^^ce^^a9^^ce^^a9^^ce^^a9
+^^ce^^91^^ce^^99^^ce^^91^^ce^^99^^ce^^91^^ce^^99^^ce^^91^^ce^^99^^ce^^91^^ce^^99^^ce^^91^^ce^^99^^ce^^91^^ce^^99^^ce^^91^^ce^^99
+^^e1^^be^^bc^^e1^^be^^bc^^e1^^be^^bc^^e1^^be^^bc^^e1^^be^^bc^^e1^^be^^bc^^e1^^be^^bc^^e1^^be^^bc
+^^ce^^97^^ce^^99^^ce^^97^^ce^^99^^ce^^97^^ce^^99^^ce^^97^^ce^^99^^ce^^97^^ce^^99^^ce^^97^^ce^^99^^ce^^97^^ce^^99^^ce^^97^^ce^^99
+^^e1^^bf^^8c^^e1^^bf^^8c^^e1^^bf^^8c^^e1^^bf^^8c^^e1^^bf^^8c^^e1^^bf^^8c^^e1^^bf^^8c^^e1^^bf^^8c
+^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99^^ce^^a9^^ce^^99
+^^e1^^bf^^bc^^e1^^bf^^bc^^e1^^bf^^bc^^e1^^bf^^bc^^e1^^bf^^bc^^e1^^bf^^bc^^e1^^bf^^bc^^e1^^bf^^bc
 ============================================================
 ============================================================
 TEST 18: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index b9356aa07..c6913199f 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -193,10 +193,10 @@ TEST 17: Greek
 Ὀδυσσεύς
 ΉΙ
 ΗΙ
-ῌ
+ῌ
 ΗΊ
 ΗΙ
-ῌ
+ῌ
 ἈἉἊἋἌἍἎἏ
 ΑΑΑΑΑΑΑΑ
 ἘἙἚἛἜἝ
@@ -211,6 +211,12 @@ TEST 17: Greek
 ΥΥΥΥΥΥΥΥ
 ὨὩὪὫὬὭὮὯ
 ΩΩΩΩΩΩΩΩ
+ΑΙΑΙΑΙΑΙΑΙΑΙΑΙΑΙ
+ᾼᾼᾼᾼᾼᾼᾼᾼ
+ΗΙΗΙΗΙΗΙΗΙΗΙΗΙΗΙ
+ῌῌῌῌῌῌῌῌ
+ΩΙΩΙΩΙΩΙΩΙΩΙΩΙΩΙ
+ῼῼῼῼῼῼῼῼ
 ============================================================
 ============================================================
 TEST 18: Turkish/Azeri





More information about the latex3-commits mailing list.