From 4f97d7d7cd942dfe76cd4bb54fc3f5b890654235 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 11 Aug 2020 16:54:53 +0200 Subject: 2020-08-11 15:59:00 --- tex/context/base/mkiv/syst-aux.mkxl | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'tex/context/base/mkiv/syst-aux.mkxl') diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl index 1951e166f..0c5ff3f76 100644 --- a/tex/context/base/mkiv/syst-aux.mkxl +++ b/tex/context/base/mkiv/syst-aux.mkxl @@ -3290,6 +3290,32 @@ \globalpopmacro\recurseaction \global\advance\outerrecurse\minusone} +%D This is some \LMTX\ experiment: +%D +%D Think of: +%D +%D \starttyping +%D \domatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd} { +%D [ +%D \domatch{(\letterpercent w)(\letterpercent w)} {#1} {(##1 ##2)} +%D \domatch{(\letterpercent w)(\letterpercent w)} {#2} {(##1 ##2)} +%D ] +%D } +%D +%D and: +%D +%D \stoptyping +%D +%D \starttyping +%D \def\MyMacro#1{(#1)} \ctxluamatch \MyMacro {(.)} {abcd} +%D \stoptyping + +\protected\def\doloopovermatch#1#2#3% + {\pushmacro\matchloopcommand + \def\matchloopcommand##1##2##3##4##5##6##7##8##9{#3}% + \ctxluamatch\matchloopcommand{#1}{#2}% + \popmacro\matchloopcommand} + %D \macros %D {newevery,everyline,EveryLine,EveryPar} %D @@ -3463,7 +3489,7 @@ \assignmentfalse \fi} -\protected\def\validassignment #1{\ifhastok={#1}} +\protected\def\validassignment #1{\ifhastok={#1}} % can become: {\ifhastok=} as we enforce {} \protected\def\novalidassignment#1{\ifnum\ifhastok={#1}\zerocount\else\plusone\fi=\plusone} %D In \ETEX\ we can use \type {\detokenize} and gain some speed, but in general far @@ -5367,7 +5393,7 @@ %D first version was: %D %D \starttyping -%D \def\dontleavehmode{\ifhmode\else\ifmmode\else$ $\fi\fi} +%D \def\dontleavehmode{\ifhmode\orelse\ifmmode\else$ $\fi} %D \stoptyping %D %D Next, Taco came with a better alternative (using mathsurround): -- cgit v1.2.3