[latex3-commits] [git/LaTeX3-latex3-latex3] main: Add option "el-xiota" for uppercasing Greek (229c094e6)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Apr 29 08:44:07 CEST 2022


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

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

commit 229c094e65787b4ab7a825f8fa4ab3ddcd062779
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Apr 29 07:44:07 2022 +0100

    Add option "el-xiota" for uppercasing Greek


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

229c094e65787b4ab7a825f8fa4ab3ddcd062779
 l3kernel/CHANGELOG.md                   |  4 ++++
 l3kernel/l3text-case.dtx                | 18 +++++++++++++++---
 l3kernel/l3text.dtx                     |  5 ++++-
 l3kernel/testfiles/m3text002.luatex.tlg |  2 ++
 l3kernel/testfiles/m3text002.lvt        |  2 ++
 l3kernel/testfiles/m3text002.tlg        |  2 ++
 l3kernel/testfiles/m3text002.uptex.tlg  |  2 ++
 l3kernel/testfiles/m3text002.xetex.tlg  |  2 ++
 8 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 21341a087..414d67b9c 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Added
+- Language setting `el-xiota` for retention of ypogegrammeni when uppercasing
+  Greek
+
 ### Changed
 - Rename case-changing variant `de-alt` to `de-xeszett` to align with
   `luaotfload`
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 507819a27..58aca7ee6 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -778,7 +778,10 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}[EXP]{\@@_change_case_upper_el:nnnN}
+% \begin{macro}[EXP]
+%   {\@@_change_case_upper_el:nnnN, \@@_change_case_upper_el-xiota:nnnN}
+% \begin{macro}[EXP]
+%   {\@@_change_case_upper_el:N, \@@_change_case_upper_el-xiota:N}
 % \begin{macro}[EXP]{\@@_change_case_upper_el:nnn}
 % \begin{macro}[EXP]{\@@_change_case_upper_el:nnNw}
 % \begin{macro}[EXP]{\@@_change_case_upper_el:NnnN}
@@ -823,14 +826,22 @@
               {
                 \@@_change_case_store:e
                   {
-                    \char_generate:nn { "0399 }
-                      { \char_value_catcode:n { "0399 } }
+                    \use:c { @@_change_case_upper_ #3 :N } #4
                   }
                 \@@_change_case_loop:nnw {#2} {#3}
               }
               { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 }
           }
       }
+    \cs_new_eq:cN { @@_change_case_upper_el-xiota:nnnN }
+      \@@_change_case_upper_el:nnnN
+    \cs_new:Npn \@@_change_case_upper_el:N #1
+      {
+        \char_generate:nn { "0399 }
+          { \char_value_catcode:n { "0399 } }
+      }
+    \cs_new:cpn { @@_change_case_upper_el-xiota:N } #1
+      { \exp_not:n {#1} }
     \cs_new:Npn \@@_change_case_upper_el:nnn #1#2#3
       { \@@_change_case_upper_el:nnNw {#2} {#3} #1 }
 %    \end{macrocode}
@@ -1139,6 +1150,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:Nnnw}
 % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnN}
 % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnNw}
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 63d5eca00..0afa41870 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -163,7 +163,10 @@
 %     \item Greek (\texttt{el}).
 %       Removes accents from Greek letters when uppercasing; titlecasing
 %       leaves accents in place. (At present this is implemented only
-%       for Unicode engines.)
+%       for Unicode engines.) A variant \texttt{el-xiota} is available
+%       which retains the \textit{ypogegrammeni} (subscript muted iota)
+%       when uppercasing: the standard version converts these to a following
+%       capital iota.
 %     \item Lithuanian (\texttt{lt}).
 %       The lowercase letters i and j should retain a dot above when the
 %       accents grave, acute or tilde are present. This is implemented for
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index 95717433c..8f80b6ba7 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -178,8 +178,10 @@ TEST 15: Greek
 Ὀδυσσεύς
 ΉΙ
 ΗΙ
+ῌ
 ΗΊ
 ΗΙ
+ῌ
 ============================================================
 ============================================================
 TEST 16: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index a5ef007af..5f670a138 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -187,7 +187,9 @@
     \text_titlecase:nn { el } { ὈΔΥΣΣΕΎΣ } \NEWLINE
     % Taken from luaotfload tests
     \greektest:n { ῄ }                                    \NEWLINE
+    \text_uppercase:nn { el-xiota } { ῄ }                 \NEWLINE
     \greektest:n { ῄ }                                   \NEWLINE
+    \text_uppercase:nn { el-xiota } { ῄ }                \NEWLINE
   }
 
 \TESTEXP { Turkish/Azeri }
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index d0b3bf81b..3076201ef 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -178,6 +178,8 @@ TEST 15: Greek
 ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82
 ^^e1^^bf^^84
 ^^e1^^bf^^84
+^^e1^^bf^^84
+^^e1^^bf^^8c^^cc^^81
 ^^e1^^bf^^8c^^cc^^81
 ^^e1^^bf^^8c^^cc^^81
 ============================================================
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index 96997cabc..f2e876039 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -178,6 +178,8 @@ TEST 15: Greek
 ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82
 ^^e1^^bf^^84
 ^^e1^^bf^^84
+^^e1^^bf^^84
+^^e1^^bf^^83^^cc^^81
 ^^e1^^bf^^83^^cc^^81
 ^^e1^^bf^^83^^cc^^81
 ============================================================
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index 95717433c..8f80b6ba7 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -178,8 +178,10 @@ TEST 15: Greek
 Ὀδυσσεύς
 ΉΙ
 ΗΙ
+ῌ
 ΗΊ
 ΗΙ
+ῌ
 ============================================================
 ============================================================
 TEST 16: Turkish/Azeri





More information about the latex3-commits mailing list.