[latex3-commits] [latex3/latex3] main: Restore \ifabsnum test (4634830a3)

github at latex-project.org github at latex-project.org
Thu May 11 21:43:44 CEST 2023


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

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

commit 4634830a355fcace0e945b7e208140d92ceb05cc
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu May 11 20:43:44 2023 +0100

    Restore \ifabsnum test
    
    As XeTeX doesn't have it.


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

4634830a355fcace0e945b7e208140d92ceb05cc
 l3kernel/l3intarray.dtx | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/l3kernel/l3intarray.dtx b/l3kernel/l3intarray.dtx
index e04f99d66..3cc0e5257 100644
--- a/l3kernel/l3intarray.dtx
+++ b/l3kernel/l3intarray.dtx
@@ -723,11 +723,22 @@ luacmd('@@_gset_range:w', function()
           }
           { }
       }
-    \cs_new_protected:Npn \@@_gset_overflow_test:nw #1
+    \cs_if_exist:NTF \tex_ifabsnum:D
       {
-        \tex_ifabsnum:D #1 > \c_max_dim
-          \exp_after:wN \@@_gset_overflow:NNnn
-        \fi:
+        \cs_new_protected:Npn \@@_gset_overflow_test:nw #1
+          {
+            \tex_ifabsnum:D #1 > \c_max_dim
+              \exp_after:wN \@@_gset_overflow:NNnn
+            \fi:
+          }
+      }
+      {
+        \cs_new_protected:Npn \@@_gset_overflow_test:nw #1
+          {
+            \if_int_compare:w \int_abs:n {#1} > \c_max_dim
+              \exp_after:wN \@@_gset_overflow:NNnn
+            \fi:
+          }
       }
     \cs_new_protected:Npn \@@_gset_overflow:NNnn #1#2#3#4
       {





More information about the latex3-commits mailing list.