Pablo Rodriguez via ntg-context schrieb am 29.04.2024 um 18:21:
On 4/29/24 18:04, Wolfgang Schuster wrote:
[...] Which is the right way to use "interfaces.definecommand" to get a simple command as in standard TeX?
I mean, no a non \permanent or non \protected command. You can't create unprotected command with interfaces.definecommand but this not a problem because you can just use interfaces.implement to create your command which is then unprotected by default. Using implement instead of definecommand doesn't matter because definecommand is just a wrapper for the implement function with the
Pablo Rodriguez via ntg-context schrieb am 29.04.2024 um 17:22: option to create a environment. Many thanks for your fast reply, Wolfgang.
I’m reading it now in cld-mkiv.pdf.
Is \protected the same as \unexpanded?
Yes they are the same (\protected is the primitive and \unexpanded is a copy) but this wasn't always the case. Original TeX didn't provide a mechanism to create protected commands and creators of macro packages had to create their own mechanism for this, the ConTeXt solution was \unexpanded. With the etex extensions the \protected primitive was added and \unexpanded uses the new primitive when you used a engine which supported it. Wolfgang