[latex3-commits] [git/LaTeX3-latex3-latex3] main: \Ucharcat is available in recent (u)pTeX (e802884d1)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Feb 9 10:47:20 CET 2023


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

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

commit e802884d1e2b263c32e0c2964cb95c422a47d8a0
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Feb 9 09:34:16 2023 +0000

    \Ucharcat is available in recent (u)pTeX
    
    It can only cover the 8-bit range, but that's OK
    as there is a check before we ever try to call it.


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

e802884d1e2b263c32e0c2964cb95c422a47d8a0
 l3kernel/l3token.dtx                                      | 15 ++++++---------
 l3kernel/testfiles/{m3char001.tlg => m3char001.ptex.tlg}  |  2 +-
 l3kernel/testfiles/{m3char001.tlg => m3char001.uptex.tlg} |  2 +-
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index 42efb7c93..f6e92c9ff 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -1557,12 +1557,11 @@
   }
 \tl_new:N \l_@@_tmp_tl
 %    \end{macrocode}
-%   Engine-dependent definitions are now needed for the implementation. For
-%   \LuaTeX{} and \XeTeX{} there is engine-level support.
-%   They can do cases that macro emulation can't. All of those are filtered
-%   out here using a primitive-based boolean expression to avoid fixing
-%   the category code of the null character used in the false branch
-%   (for 8-bit engines).
+%   Engine-dependent definitions are now needed for the implementation. Recent
+%   (u)p\TeX{} and the Unicode engines \LuaTeX{} and \XeTeX{} have engine-level
+%   support for expandable character creation. \pdfTeX{} and older (u)p\TeX{}
+%   releases do not. The branching here if low-level to avoid fixing
+%   the category code of the null character used in the false branch.
 %   The final level is the basic definition at the engine level: the arguments
 %   here are integers so there is no need to worry about them too much.
 %   Older versions of  \XeTeX{} cannot generate active characters so we filter
@@ -1573,9 +1572,7 @@
 \group_begin:
   \char_set_catcode_active:N \^^L
   \cs_set:Npn ^^L { }
-  \if_int_odd:w 0
-      \sys_if_engine_luatex:T { 1 }
-      \sys_if_engine_xetex:T { 1 } \exp_stop_f:
+  \if_cs_exist:N \tex_Ucharcat:D
       \cs_new:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
         {
           #3
diff --git a/l3kernel/testfiles/m3char001.tlg b/l3kernel/testfiles/m3char001.ptex.tlg
similarity index 99%
copy from l3kernel/testfiles/m3char001.tlg
copy to l3kernel/testfiles/m3char001.ptex.tlg
index e23607996..eacb96dd4 100644
--- a/l3kernel/testfiles/m3char001.tlg
+++ b/l3kernel/testfiles/m3char001.ptex.tlg
@@ -381,7 +381,7 @@ put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
 ! Undefined control sequence.
-<recently read> @
+<inserted text> @
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
diff --git a/l3kernel/testfiles/m3char001.tlg b/l3kernel/testfiles/m3char001.uptex.tlg
similarity index 99%
copy from l3kernel/testfiles/m3char001.tlg
copy to l3kernel/testfiles/m3char001.uptex.tlg
index e23607996..eacb96dd4 100644
--- a/l3kernel/testfiles/m3char001.tlg
+++ b/l3kernel/testfiles/m3char001.uptex.tlg
@@ -381,7 +381,7 @@ put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
 ! Undefined control sequence.
-<recently read> @
+<inserted text> @
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have





More information about the latex3-commits mailing list.