[latex3-commits] [git/LaTeX3-latex3-latex3] main: Add "hy-x-yiwn" option for Armenian (90e7923dd)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun May 1 20:45:59 CEST 2022


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

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

commit 90e7923dd7be1356ae7c1ca0ea6dc40ac60f9230
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun May 1 19:45:05 2022 +0100

    Add "hy-x-yiwn" option for Armenian


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

90e7923dd7be1356ae7c1ca0ea6dc40ac60f9230
 l3kernel/CHANGELOG.md                   |  4 ++++
 l3kernel/l3text-case.dtx                | 41 +++++++++++++++++++++++++++++++++
 l3kernel/l3text.dtx                     |  5 ++++
 l3kernel/testfiles/m3text002.luatex.tlg | 34 ++++++++++++++++-----------
 l3kernel/testfiles/m3text002.lvt        |  6 +++++
 l3kernel/testfiles/m3text002.tlg        | 34 ++++++++++++++++-----------
 l3kernel/testfiles/m3text002.xetex.tlg  | 34 ++++++++++++++++-----------
 7 files changed, 116 insertions(+), 42 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 33fd84809..ee60c9432 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 "hy-x-yiwn" for handling of ech-yiwm ligature
+  uppercasing
+
 ### Fixed
 - Correct `el-xiota` and `de-xeszett` to `el-x-iota` and `de-x-eszett`
 
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 148f1de4c..578c13f52 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -1227,6 +1227,47 @@
 % \end{macro}
 %
 % \begin{macro}[EXP]
+%   {\@@_change_case_upper_hy-x-yiwn:nnnN, \@@_change_case_title_hy-x-yiwn:nnNN}
+%     See \url{https://www.unicode.org/L2/L2020/20143-armenian-ech-yiwn.pdf}.
+%    \begin{macrocode}
+\bool_lazy_or:nnT
+  { \sys_if_engine_luatex_p: }
+  { \sys_if_engine_xetex_p: }
+  {
+    \cs_new:cpn { @@_change_case_upper_hy-x-yiwn:nnnN } #1#2#3#4
+      {
+        \int_compare:nNnTF { `#4 } = { "0587 }
+          {
+            \@@_change_case_store:e
+              {
+                \char_generate:nn { "0535 } { \@@_char_catcode:N #4 }
+                \char_generate:nn { "054E } { \@@_char_catcode:N #4 }
+              }
+            \use:c { @@_change_case_char_next_ #2 :nn }
+              {#2} {#3}
+          }
+          { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 }
+      }
+    \cs_new:cpn { @@_change_case_title_hy-x-yiwn:nnnN } #1#2#3#4
+      {
+        \int_compare:nNnTF { `#4 } = { "0587 }
+          {
+            \@@_change_case_store:e
+              {
+                \char_generate:nn { "0535 } { \@@_char_catcode:N #4 }
+                \char_generate:nn { "057E } { \@@_char_catcode:N #4 }
+              }
+            \use:c { @@_change_case_char_next_ #2 :nn }
+              {#2} {#3}
+          }
+          { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 }
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
 %   {
 %     \@@_change_cases_lower_lt:nnnN      ,
 %     \@@_change_cases_lower_lt_auxi:nnnN ,
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 6a9a0df30..a87827b45 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -154,6 +154,11 @@
 %       The case pairs I/i-dotless and I-dot/i are activated for these
 %       languages. The combining dot mark is removed when lowercasing
 %       I-dot and introduced when upper casing i-dotless.
+%     \item Eastern Armenian (\texttt{hy-x-yiwn})
+%       The standard settings map the codepoint U+0587, the ligature of
+%       letters ech and yiwn, to the two codepoints for the capital letters
+%       when uppercasing. In Eastern Armenian, the output should be ech and
+%       vew: this is activated using the \texttt{hy-x-yiwn} setting.
 %     \item German (\texttt{de-x-eszett}).
 %       An alternative mapping for German in which the lowercase
 %       \emph{Eszett} maps to a \emph{gro\ss{}es Eszett}. Since there is
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index 8f80b6ba7..e747a9bd1 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -132,13 +132,19 @@ TEST 13: Cyrillic
 Доклады Академии наук
 ============================================================
 ============================================================
-TEST 14: German-alternative
+TEST 14: Armenian
+============================================================
+ԵՐԵՒԱՆ
+ԵՐԵՎԱՆ
+============================================================
+============================================================
+TEST 15: German-alternative
 ============================================================
 FUSSBALL
 FUẞBALL
 ============================================================
 ============================================================
-TEST 15: Greek
+TEST 16: Greek
 ============================================================
 ΆΔΙΚΟΣ, ΚΕΊΜΕΝΟ, ΊΡΙΔΑ
 ΑΔΙΚΟΣ, ΚΕΙΜΕΝΟ, ΙΡΙΔΑ
@@ -184,7 +190,7 @@ TEST 15: Greek
 ῌ
 ============================================================
 ============================================================
-TEST 16: Turkish/Azeri
+TEST 17: Turkish/Azeri
 ============================================================
 ragıp hul^^fbsi ^^f6zdem
 ragip hul^^fbsi̇ ^^f6zdem
@@ -196,7 +202,7 @@ Ip hul^^fbsi ^^f6zdem
 Ip hul^^fbsi ^^f6zdem
 ============================================================
 ============================================================
-TEST 17: Lithuanian
+TEST 18: Lithuanian
 ============================================================
 i̇̀i̇́i̇̃i̇̀i̇́i̇̃j̇̀j̇́j̇̃į̇̀į̇́į̇̃
 ^^ec^^edĩìíĩj̀j́j̃į̀į́į̃
@@ -208,7 +214,7 @@ Ìi̇̀i̇̃i̇̀i̇́i̇̃j̇̀j̇́j̇̃į̇̀į̇́į̇̃
 İ̀i̇̀i̇̃i̇̀i̇́i̇̃j̇̀j̇́j̇̃į̇̀į̇́į̇̃
 ============================================================
 ============================================================
-TEST 18: Dutch
+TEST 19: Dutch
 ============================================================
 ijsselmeer
 ijsselmeer
@@ -224,13 +230,13 @@ Im
 Im
 ============================================================
 ============================================================
-TEST 19: Titlecase exceptions
+TEST 20: Titlecase exceptions
 ============================================================
 Ssoo
 Dž!
 ============================================================
 ============================================================
-TEST 20: Case changing braced arguments
+TEST 21: Case changing braced arguments
 ============================================================
 foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
@@ -242,7 +248,7 @@ FOO \emph {BAR} {BAZ}
 \emph {BAR} {BAZ}
 ============================================================
 ============================================================
-TEST 21: Expanding content
+TEST 22: Expanding content
 ============================================================
 some text hello
 SOME TEXT HELLO
@@ -270,7 +276,7 @@ Some text \cs_tmp:w
 \cs_tmp:w  Sometext
 ============================================================
 ============================================================
-TEST 22: Math-mode escape
+TEST 23: Math-mode escape
 ============================================================
 some text $y = mx + c$
 SOME TEXT $y = mx + c$
@@ -286,7 +292,7 @@ Opps not close token in $y = mx + c
 Opps not close token in $y = mx + c
 ============================================================
 ============================================================
-TEST 23: Nesting
+TEST 24: Nesting
 ============================================================
 HELLO
 hello
@@ -294,7 +300,7 @@ FUSSBALL
 ὈΔΥΣΣΕΎΣ
 ============================================================
 ============================================================
-TEST 24: Letter-like commands
+TEST 25: Letter-like commands
 ============================================================
 \aa \aa \J \ae \dh \ss \l \o 
 \AA \AA \J \AE \DH \SS \L \O 
@@ -302,7 +308,7 @@ TEST 24: Letter-like commands
 \AA \aa \J \ae \dh \ss \l \O 
 ============================================================
 ============================================================
-TEST 25: Accents
+TEST 26: Accents
 ============================================================
 \"{a}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {E}\H {I}\v {O}\.{U}
@@ -310,7 +316,7 @@ TEST 25: Accents
 \"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
-TEST 26: Active chars
+TEST 27: Active chars
 ============================================================
 "`lo"=rem"'
 "`LO"=REM"'
@@ -318,7 +324,7 @@ TEST 26: Active chars
 "`Lo"=rem"'
 ============================================================
 ============================================================
-TEST 27: Case changing exclusions
+TEST 28: Case changing exclusions
 ============================================================
 Variant \tl_show:x already defined; not changing it on line ...
 > foo\NoCaseChange {BAR}.
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index d6b8f7da1..bbb30b4ee 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -149,6 +149,12 @@
     \test:n { Доклады~Академии~наук }
   }
 
+\TESTEXP { Armenian }
+  {
+    \text_uppercase:n                { Երևան } \NEWLINE
+    \text_uppercase:nn { hy-x-yiwn } { Երևան }
+  }
+
 \TESTEXP { German-alternative }
   {
     \text_uppercase:n                  { Fußball } \NEWLINE
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index 3076201ef..0f86acc46 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -132,13 +132,19 @@ TEST 13: Cyrillic
 ^^d0^^94^^d0^^be^^d0^^ba^^d0^^bb^^d0^^b0^^d0^^b4^^d1^^8b ^^d0^^90^^d0^^ba^^d0^^b0^^d0^^b4^^d0^^b5^^d0^^bc^^d0^^b8^^d0^^b8 ^^d0^^bd^^d0^^b0^^d1^^83^^d0^^ba
 ============================================================
 ============================================================
-TEST 14: German-alternative
+TEST 14: Armenian
+============================================================
+^^d4^^b5^^d6^^80^^d6^^87^^d5^^a1^^d5^^b6
+^^d4^^b5^^d6^^80^^d6^^87^^d5^^a1^^d5^^b6
+============================================================
+============================================================
+TEST 15: German-alternative
 ============================================================
 FUSSBALL
 FU^^e1^^ba^^9eBALL
 ============================================================
 ============================================================
-TEST 15: Greek
+TEST 16: Greek
 ============================================================
 ^^ce^^86^^ce^^94^^ce^^99^^ce^^9a^^ce^^9f^^ce^^a3, ^^ce^^9a^^ce^^95^^ce^^8a^^ce^^9c^^ce^^95^^ce^^9d^^ce^^9f, ^^ce^^8a^^ce^^a1^^ce^^99^^ce^^94^^ce^^91
 ^^ce^^86^^ce^^94^^ce^^99^^ce^^9a^^ce^^9f^^ce^^a3, ^^ce^^9a^^ce^^95^^ce^^8a^^ce^^9c^^ce^^95^^ce^^9d^^ce^^9f, ^^ce^^8a^^ce^^a1^^ce^^99^^ce^^94^^ce^^91
@@ -184,7 +190,7 @@ TEST 15: Greek
 ^^e1^^bf^^8c^^cc^^81
 ============================================================
 ============================================================
-TEST 16: Turkish/Azeri
+TEST 17: Turkish/Azeri
 ============================================================
 rag^^c4^^b1p hul^^c3^^bbsi ^^c3^^b6zdem
 ragip hul^^c3^^bbs^^c4^^b0 ^^c3^^b6zdem
@@ -196,7 +202,7 @@ Rag^^c4^^b1p hul^^c3^^bbsi ^^c3^^b6zdem
 ^^c4^^b1p hul^^c3^^bbsi ^^c3^^b6zdem
 ============================================================
 ============================================================
-TEST 17: Lithuanian
+TEST 18: Lithuanian
 ============================================================
 ^^c3^^ac^^c3^^ad^^c4^^a9
 ^^c3^^ac^^c3^^ad^^c4^^a9
@@ -204,7 +210,7 @@ TEST 17: Lithuanian
 ^^c3^^8c^^c3^^ad^^c4^^a9
 ============================================================
 ============================================================
-TEST 18: Dutch
+TEST 19: Dutch
 ============================================================
 ijsselmeer
 ijsselmeer
@@ -220,13 +226,13 @@ Im
 Im
 ============================================================
 ============================================================
-TEST 19: Titlecase exceptions
+TEST 20: Titlecase exceptions
 ============================================================
 Ssoo
 ^^c7^^85!
 ============================================================
 ============================================================
-TEST 20: Case changing braced arguments
+TEST 21: Case changing braced arguments
 ============================================================
 foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
@@ -238,7 +244,7 @@ FOO \emph {BAR} {BAZ}
 \emph {BAR} {BAZ}
 ============================================================
 ============================================================
-TEST 21: Expanding content
+TEST 22: Expanding content
 ============================================================
 some text hello
 SOME TEXT HELLO
@@ -266,7 +272,7 @@ Some text \cs_tmp:w
 \cs_tmp:w  Sometext
 ============================================================
 ============================================================
-TEST 22: Math-mode escape
+TEST 23: Math-mode escape
 ============================================================
 some text $y = mx + c$
 SOME TEXT $y = mx + c$
@@ -282,7 +288,7 @@ Opps not close token in $y = mx + c
 Opps not close token in $y = mx + c
 ============================================================
 ============================================================
-TEST 23: Nesting
+TEST 24: Nesting
 ============================================================
 HELLO
 hello
@@ -290,7 +296,7 @@ FUSSBALL
 ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3
 ============================================================
 ============================================================
-TEST 24: Letter-like commands
+TEST 25: Letter-like commands
 ============================================================
 \aa \aa \J \ae \dh \ss \l \o 
 \AA \AA \J \AE \DH \SS \L \O 
@@ -298,7 +304,7 @@ TEST 24: Letter-like commands
 \AA \aa \J \ae \dh \ss \l \O 
 ============================================================
 ============================================================
-TEST 25: Accents
+TEST 26: Accents
 ============================================================
 \"{a}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {E}\H {I}\v {O}\.{U}
@@ -306,7 +312,7 @@ TEST 25: Accents
 \"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
-TEST 26: Active chars
+TEST 27: Active chars
 ============================================================
 "`lo"=rem"'
 "`LO"=REM"'
@@ -314,7 +320,7 @@ TEST 26: Active chars
 "`Lo"=rem"'
 ============================================================
 ============================================================
-TEST 27: Case changing exclusions
+TEST 28: Case changing exclusions
 ============================================================
 Variant \tl_show:x already defined; not changing it on line ...
 > foo\NoCaseChange {BAR}.
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index 8f80b6ba7..e747a9bd1 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -132,13 +132,19 @@ TEST 13: Cyrillic
 Доклады Академии наук
 ============================================================
 ============================================================
-TEST 14: German-alternative
+TEST 14: Armenian
+============================================================
+ԵՐԵՒԱՆ
+ԵՐԵՎԱՆ
+============================================================
+============================================================
+TEST 15: German-alternative
 ============================================================
 FUSSBALL
 FUẞBALL
 ============================================================
 ============================================================
-TEST 15: Greek
+TEST 16: Greek
 ============================================================
 ΆΔΙΚΟΣ, ΚΕΊΜΕΝΟ, ΊΡΙΔΑ
 ΑΔΙΚΟΣ, ΚΕΙΜΕΝΟ, ΙΡΙΔΑ
@@ -184,7 +190,7 @@ TEST 15: Greek
 ῌ
 ============================================================
 ============================================================
-TEST 16: Turkish/Azeri
+TEST 17: Turkish/Azeri
 ============================================================
 ragıp hul^^fbsi ^^f6zdem
 ragip hul^^fbsi̇ ^^f6zdem
@@ -196,7 +202,7 @@ Ip hul^^fbsi ^^f6zdem
 Ip hul^^fbsi ^^f6zdem
 ============================================================
 ============================================================
-TEST 17: Lithuanian
+TEST 18: Lithuanian
 ============================================================
 i̇̀i̇́i̇̃i̇̀i̇́i̇̃j̇̀j̇́j̇̃į̇̀į̇́į̇̃
 ^^ec^^edĩìíĩj̀j́j̃į̀į́į̃
@@ -208,7 +214,7 @@ Ìi̇̀i̇̃i̇̀i̇́i̇̃j̇̀j̇́j̇̃į̇̀į̇́į̇̃
 İ̀i̇̀i̇̃i̇̀i̇́i̇̃j̇̀j̇́j̇̃į̇̀į̇́į̇̃
 ============================================================
 ============================================================
-TEST 18: Dutch
+TEST 19: Dutch
 ============================================================
 ijsselmeer
 ijsselmeer
@@ -224,13 +230,13 @@ Im
 Im
 ============================================================
 ============================================================
-TEST 19: Titlecase exceptions
+TEST 20: Titlecase exceptions
 ============================================================
 Ssoo
 Dž!
 ============================================================
 ============================================================
-TEST 20: Case changing braced arguments
+TEST 21: Case changing braced arguments
 ============================================================
 foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
@@ -242,7 +248,7 @@ FOO \emph {BAR} {BAZ}
 \emph {BAR} {BAZ}
 ============================================================
 ============================================================
-TEST 21: Expanding content
+TEST 22: Expanding content
 ============================================================
 some text hello
 SOME TEXT HELLO
@@ -270,7 +276,7 @@ Some text \cs_tmp:w
 \cs_tmp:w  Sometext
 ============================================================
 ============================================================
-TEST 22: Math-mode escape
+TEST 23: Math-mode escape
 ============================================================
 some text $y = mx + c$
 SOME TEXT $y = mx + c$
@@ -286,7 +292,7 @@ Opps not close token in $y = mx + c
 Opps not close token in $y = mx + c
 ============================================================
 ============================================================
-TEST 23: Nesting
+TEST 24: Nesting
 ============================================================
 HELLO
 hello
@@ -294,7 +300,7 @@ FUSSBALL
 ὈΔΥΣΣΕΎΣ
 ============================================================
 ============================================================
-TEST 24: Letter-like commands
+TEST 25: Letter-like commands
 ============================================================
 \aa \aa \J \ae \dh \ss \l \o 
 \AA \AA \J \AE \DH \SS \L \O 
@@ -302,7 +308,7 @@ TEST 24: Letter-like commands
 \AA \aa \J \ae \dh \ss \l \O 
 ============================================================
 ============================================================
-TEST 25: Accents
+TEST 26: Accents
 ============================================================
 \"{a}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {E}\H {I}\v {O}\.{U}
@@ -310,7 +316,7 @@ TEST 25: Accents
 \"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
-TEST 26: Active chars
+TEST 27: Active chars
 ============================================================
 "`lo"=rem"'
 "`LO"=REM"'
@@ -318,7 +324,7 @@ TEST 26: Active chars
 "`Lo"=rem"'
 ============================================================
 ============================================================
-TEST 27: Case changing exclusions
+TEST 28: Case changing exclusions
 ============================================================
 Variant \tl_show:x already defined; not changing it on line ...
 > foo\NoCaseChange {BAR}.





More information about the latex3-commits mailing list.