[latex3-commits] [git/LaTeX3-latex3-latex3] master: Extend de-alt to pdfTeX (e7a64122a)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Feb 13 21:16:41 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/e7a64122a2f20c525b801400058d90f641e8da5e

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

commit e7a64122a2f20c525b801400058d90f641e8da5e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Feb 13 20:16:19 2020 +0000

    Extend de-alt to pdfTeX


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

e7a64122a2f20c525b801400058d90f641e8da5e
 l3kernel/CHANGELOG.md                  |  1 +
 l3kernel/l3text-case.dtx               | 43 ++++++++++++++++++++++++++++------
 l3kernel/l3text.dtx                    |  4 +++-
 l3kernel/testfiles/m3text002.tlg       |  2 +-
 l3kernel/testfiles/m3text002.uptex.tlg |  2 +-
 5 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 09787f4bb..bd629fe97 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,6 +9,7 @@ this project uses date-based 'snapshot' version identifiers.
 
 ### Changed
 - Leave implicit tokens unchanged by `\text_expand:n`
+- Extend the `de-alt` case changing locale to 8-bit engines
 
 ## [2020-02-11]
 
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 4b39343bd..ccc0bd580 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -648,9 +648,10 @@
 % \end{macro}
 %
 % \begin{macro}[EXP]{\@@_change_case_upper_de-alt:nnnN}
+% \begin{macro}[EXP]{\@@_change_case_upper_de-alt:nnnNN}
 %   A simple alternative version for German.
 %    \begin{macrocode}
-\bool_lazy_or:nnT
+\bool_lazy_or:nnTF
   { \sys_if_engine_luatex_p: }
   { \sys_if_engine_xetex_p: }
   {
@@ -659,15 +660,36 @@
         \int_compare:nNnTF { `#4 } = { "00DF }
           {
             \@@_change_case_store:e
-              { \char_generate:nn { "1E9E } { \@@_char_catcode:N #4 } }
+             { \char_generate:nn { "1E9E } { \@@_char_catcode:N #4 } }
             \use:c { @@_change_case_char_next_ #2 :nn }
               {#2} {#3}
           }
           { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 }
       }
   }
+  {
+    \cs_new:cpx { @@_change_case_upper_de-alt:nnnN } #1#2#3#4
+      {
+        \exp_not:N \int_compare:nNnTF { `#4 } = { "00C3 }
+          {
+            \exp_not:c { @@_change_case_upper_de-alt:nnnNN }
+              {#1} {#2} {#3} #4
+          }
+          { \exp_not:N \@@_change_case_char:nnnN {#1} {#2} {#3} #4 }
+      }
+    \cs_new:cpn { @@_change_case_upper_de-alt:nnnNN } #1#2#3#4#5
+      {
+        \int_compare:nNnTF { `#5 } = { "009F }
+          {
+            \@@_change_case_store:V \c_@@_grosses_Eszett_tl
+            \use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3}
+          }
+          { \@@_change_case_char:nnnN {#1} {#2} {#3} #4#5 }
+      }
+  }
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}[EXP]{\@@_change_case_upper_el:nnnN}
 % \begin{macro}[EXP]{\@@_change_case_upper_el:nnnn}
@@ -1161,7 +1183,8 @@
 %     \c_@@_dotless_i_tl ,
 %     \c_@@_dotted_I_tl  ,
 %     \c_@@_i_ogonek_tl  ,
-%     \c_@@_I_ogonek_tl
+%     \c_@@_I_ogonek_tl  ,
+%     \c_@@_grosses_Eszett_tl
 %   }
 %  For cases where there is an $8$-bit option in the |T1| font set up,
 %  a variant is provided in both cases.
@@ -1182,16 +1205,22 @@
                       \exp_not:N \char_generate:nn {##1} { 13 }
                     \exp_after:wN \exp_after:wN \exp_after:wN
                       \exp_not:N \char_generate:nn {##2} { 13 }
+                    \tl_if_blank:nF {##3}
+                      {
+                        \exp_after:wN \exp_after:wN \exp_after:wN
+                          \exp_not:N \char_generate:nn {##3} { 13 }
+                      }
                   }
               }
             \use:x
               { \@@_tmp:w \char_to_utfviii_bytes:n { "#2 } }  
           \group_end:
         }
-      \@@_tmp:w \c_@@_dotless_i_tl { 0131 }
-      \@@_tmp:w \c_@@_dotted_I_tl  { 0130 }
-      \@@_tmp:w \c_@@_i_ogonek_tl  { 012F }
-      \@@_tmp:w \c_@@_I_ogonek_tl  { 012E }
+      \@@_tmp:w \c_@@_dotless_i_tl      { 0131 }
+      \@@_tmp:w \c_@@_dotted_I_tl       { 0130 }
+      \@@_tmp:w \c_@@_i_ogonek_tl       { 012F }
+      \@@_tmp:w \c_@@_I_ogonek_tl       { 012E }
+      \@@_tmp:w \c_@@_grosses_Eszett_tl { 1E9E }
     }
 \group_end:
 %    \end{macrocode}
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 5e84bbc8c..78992ea90 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -156,7 +156,9 @@
 %       I-dot and introduced when upper casing i-dotless.
 %     \item German (\texttt{de-alt}).
 %       An alternative mapping for German in which the lowercase
-%       \emph{Eszett} maps to a \emph{gro\ss{}es Eszett}.
+%       \emph{Eszett} maps to a \emph{gro\ss{}es Eszett}. This transformation
+%       is available using \pdfTeX{} as there is a |T1| slot for the
+%       result.
 %     \item Greek (\texttt{el}).
 %       Removes accents from Greek letters when uppercasing; titlecasing
 %       leaves accents in place.
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index 94f8b4946..622be45ee 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -109,7 +109,7 @@ TEST 10: The final sigma rule
 TEST 11: German-alternative
 ============================================================
 FUSSBALL
-FUSSBALL
+FU^^e1^^ba^^9eBALL
 ============================================================
 ============================================================
 TEST 12: Greek
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index f45e8af4d..f46bd7954 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -113,7 +113,7 @@ TEST 10: The final sigma rule
 TEST 11: German-alternative
 ============================================================
 FUSSBALL
-FUSSBALL
+FUẞBALL
 ============================================================
 ============================================================
 TEST 12: Greek





More information about the latex3-commits mailing list.