Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-17 Thread Hans Hagen via ntg-context
On 11/17/2021 12:36 PM, Henning Hraban Ramm via ntg-context wrote: Am 16.11.2021 um 22:18 schrieb Hans Hagen via ntg-context : it's pretty fast and needs no lua magic, only a twisted mind May I quote you as “ConTeXt needs a twisted mind”? ;D How about "Context tries to untwist your tex

Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-17 Thread Henning Hraban Ramm via ntg-context
> Am 16.11.2021 um 22:18 schrieb Hans Hagen via ntg-context > : > it's pretty fast and needs no lua magic, only a twisted mind May I quote you as “ConTeXt needs a twisted mind”? ;D Hraban ___ If your question is

Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-17 Thread Hans Hagen via ntg-context
On 11/16/2021 11:15 PM, Joey McCollum via ntg-context wrote: I'm not sure if my mind is twisted enough! I can follow how Jairo's answer works, and that does what I need it to, but it's not as clear to me what the last two TeX-only approaches are doing at a low level. Perhaps more importantly,

Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-16 Thread Joey McCollum via ntg-context
I'm not sure if my mind is twisted enough! I can follow how Jairo's answer works, and that does what I need it to, but it's not as clear to me what the last two TeX-only approaches are doing at a low level. Perhaps more importantly, I should clarify that for my purposes, the \MyOuter macro is the

Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-16 Thread Hans Hagen via ntg-context
On 11/16/2021 9:09 PM, Jairo A. del Rio via ntg-context wrote: If I understand it correctly, you may need something like this...? % Protection is key \protected\def\inner[#1]{\empty} % \outer is (or was) already defined in \CONTEXT % Please use another name \def\Outer{\inner[123] and

Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-16 Thread Hans Hagen via ntg-context
On 11/16/2021 8:22 PM, Joey McCollum via ntg-context wrote: As the subject of this question suggests, this is really more of a question about expansion control (a topic that is still a bit obscure to me). Suppose I have a macro \inner that expects a single argument or an assignment of

Re: [NTG-context] Checking for a macro in a string without expanding it

2021-11-16 Thread Jairo A. del Rio via ntg-context
If I understand it correctly, you may need something like this...? % Protection is key \protected\def\inner[#1]{\empty} % \outer is (or was) already defined in \CONTEXT % Please use another name \def\Outer{\inner[123] and \inner[some text] etc.} \startluacode local implement =

[NTG-context] Checking for a macro in a string without expanding it

2021-11-16 Thread Joey McCollum via ntg-context
As the subject of this question suggests, this is really more of a question about expansion control (a topic that is still a bit obscure to me). Suppose I have a macro \inner that expects a single argument or an assignment of parameters in brackets. For my purposes, I don't want this macro to do