View Issue Details

IDProjectCategoryView StatusLast Update
0000620luatexfeature requestpublic2013-03-21 10:19
Reporterphi Assigned ToTaco  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
PlatformCore 2 DuoOSOS XOS Version10.6.7
Product Version0.66.0 
Target Version0.80.0 
Summary0000620: The \Umathcharnumdef primitive
DescriptionXeTeX has the \XeTeXmathcharnumdef with obvious semantics as a complement to \XeTeXmathchardef and the other math…num commands. The attached patch implements this primitive for LuaTeX. The \Umathcharnumdef primitive is useful for e.g. \Umathcharnumdef\foo=\Umathcodenum `a
Tagsmath

Activities

phi

2011-05-04 12:16

reporter  

Umathcharnumdef.patch (2,233 bytes)   
Index: source/texk/web2c/luatexdir/tex/commands.w
===================================================================
--- source/texk/web2c/luatexdir/tex/commands.w	(revision 4242)
+++ source/texk/web2c/luatexdir/tex/commands.w	(working copy)
@@ -675,6 +675,7 @@
     primitive_tex("mathchardef", shorthand_def_cmd, math_char_def_code, 0);
     primitive_omega("omathchardef", shorthand_def_cmd, omath_char_def_code, 0);
     primitive_luatex("Umathchardef", shorthand_def_cmd, xmath_char_def_code, 0);
+    primitive_luatex("Umathcharnumdef", shorthand_def_cmd, xmath_char_num_def_code, 0);
     primitive_tex("countdef", shorthand_def_cmd, count_def_code, 0);
     primitive_luatex("attributedef", shorthand_def_cmd, attribute_def_code, 0);
     primitive_tex("dimendef", shorthand_def_cmd, dimen_def_code, 0);
Index: source/texk/web2c/luatexdir/tex/maincontrol.h
===================================================================
--- source/texk/web2c/luatexdir/tex/maincontrol.h	(revision 4242)
+++ source/texk/web2c/luatexdir/tex/maincontrol.h	(working copy)
@@ -112,6 +112,7 @@
 #  define skip_def_code 7       /* |shorthand_def| for \.{\\skipdef} */
 #  define mu_skip_def_code 8    /* |shorthand_def| for \.{\\muskipdef} */
 #  define toks_def_code 9       /* |shorthand_def| for \.{\\toksdef} */
+#  define xmath_char_num_def_code 10 /* |shorthand_def| for \.{\\Umathcharnumdef} */
 
 extern void adjust_space_factor(void);
 extern void main_control(void);
Index: source/texk/web2c/luatexdir/tex/maincontrol.w
===================================================================
--- source/texk/web2c/luatexdir/tex/maincontrol.w	(revision 4242)
+++ source/texk/web2c/luatexdir/tex/maincontrol.w	(working copy)
@@ -2269,6 +2269,13 @@
                 mval.character_value;
             define(p, xmath_given_cmd, cur_val);
             break;
+        case xmath_char_num_def_code:
+            mval = scan_mathchar(xetexnum_mathcode);
+            cur_val =
+                (mval.class_value + (8 * mval.family_value)) * (65536 * 32) +
+                mval.character_value;
+            define(p, xmath_given_cmd, cur_val);
+            break;
         default:
             scan_register_num();
             switch (n) {
Umathcharnumdef.patch (2,233 bytes)   

phi

2012-10-13 20:31

reporter   ~0000969

Thanks for implementing the primitive. I'm reopening this since the primitive seems to be undocumented.

Issue History

Date Modified Username Field Change
2011-05-04 12:16 phi New Issue
2011-05-04 12:16 phi File Added: Umathcharnumdef.patch
2011-05-05 13:49 Taco Target Version => 0.80.0
2011-07-12 17:25 Taco Status new => assigned
2011-07-12 17:25 Taco Assigned To => Taco
2012-04-09 04:54 Khaled Hosny Tag Attached: math
2012-05-09 12:08 Taco Status assigned => resolved
2012-05-09 12:08 Taco Resolution open => fixed
2012-10-13 20:31 phi Note Added: 0000969
2012-10-13 20:31 phi Status resolved => feedback
2012-10-13 20:31 phi Resolution fixed => reopened
2012-12-14 10:10 Taco Status feedback => resolved
2012-12-14 10:10 Taco Resolution reopened => fixed
2013-03-21 10:19 Taco Status resolved => closed