texlive[65064] Build/source/texk/web2c/cwebdir: [CWEB] Fix an issue

commits+ascherer at tug.org commits+ascherer at tug.org
Mon Nov 21 12:57:15 CET 2022


Revision: 65064
          http://tug.org/svn/texlive?view=revision&revision=65064
Author:   ascherer
Date:     2022-11-21 12:57:15 +0100 (Mon, 21 Nov 2022)
Log Message:
-----------
[CWEB] Fix an issue with math macros.

See https://github.com/ascherer/cwebbin/issues/62 for details.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweave.w

Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2022-11-21 07:14:37 UTC (rev 65063)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2022-11-21 11:57:15 UTC (rev 65064)
@@ -1,3 +1,8 @@
+2022-11-21  Andreas Scherer  <https://ascherer.github.io>
+
+	* ctwill-w2c.ch,
+	* cweave.w: Fix an issue with math macros.
+
 2022-08-21  Andreas Scherer  <https://ascherer.github.io>
 
 	* ctang-w2c.ch,

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2022-11-21 07:14:37 UTC (rev 65063)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2022-11-21 11:57:15 UTC (rev 65064)
@@ -1087,12 +1087,12 @@
 @x
 @.Improper macro definition@>
   else {
-    app_cur_id(false);
+    app('$'); app_cur_id(false);
 @y
 @.Improper macro definition@>
   else {
     id_being_defined=id_lookup(id_first,id_loc,normal);
-    app_cur_id(false);
+    app('$'); app_cur_id(false);
     def_diff=(*loc!='(');
 @z
 

Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w	2022-11-21 07:14:37 UTC (rev 65063)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w	2022-11-21 11:57:15 UTC (rev 65064)
@@ -4350,9 +4350,8 @@
     err_print("! Improper macro definition");
 @.Improper macro definition@>
   else {
-    app_cur_id(false);
+    app('$'); app_cur_id(false);
     if (*loc=='(') {
-      app('$');
   reswitch: switch (next_control=get_next()) {
       case '(': case ',': app(next_control); goto reswitch;
       case identifier: app_cur_id(false); goto reswitch;
@@ -4364,10 +4363,9 @@
         } @=/* otherwise fall through */@>@;
       default: err_print("! Improper macro definition"); break;
       }
-      app('$');
     }
     else next_control=get_next();
-    app(break_space);
+    app_str("$ "); app(break_space);
     app_scrap(dead,no_math); /* scrap won't take part in the parsing */
   }
 }



More information about the tex-live-commits mailing list.