Re: [NTG-context] About xstring and ConTeXt

2020-07-07 Thread Phelype Oleinik
On Tue, Jul 7, 2020 at 6:21 PM Jairo A. del Rio wrote: > > Thank, Wolfgang! Both methods work, but both fail with the following example: > > \pushmacro\unexpanded > \let\unexpanded\normalunexpanded > \input xstring > \popmacro\unexpanded > \starttext > \StrGobbleLeft{bcdef}{4} > \stoptext > > The

Re: [NTG-context] About xstring and ConTeXt

2020-07-07 Thread Phelype Oleinik
On Tue, Jul 7, 2020 at 5:19 PM Wolfgang Schuster wrote: > > Bad idea because ConTeXt also changes the meaning of \protected (you can > use \normalprotected to get the primitve). Oops, forgot about that one. > A better version is > > \pushmacro\unexpanded > \let\unexpanded\normalunexpanded >

Re: [NTG-context] About xstring and ConTeXt

2020-07-07 Thread Phelype Oleinik
Hi Jairo, ConTeXt's \unexpanded is e-TeX's \protected, so the error boils down to something like: \edef\x{\unexpanded{#}}, which works in Plain but not in ConTeXt. Usually packages that claim to be generic have to cope with that. xstring would need to do (in a ConTeXt-specific loader):