Am 10.01.22 um 20:21 schrieb Wolfgang Schuster:
Henning Hraban Ramm via ntg-context schrieb am 10.01.2022 um 09:52:
Would it make more sense, or would it be “cleaner” to use a variable?
You can get rid of the temp variable before the command definition but
now you have to access it with a different method in \mymacro, below is
one way (LMTX only) but \setvariable and \getvariable work as well.
\define[1]\mymacro
{\iftok{#1}{\getvalue{previousmymacro}}%
same as last time
\else
it is different from last time
\fi
\setvalue{previousmymacro}{#1}}
That was the approach that I meant. Thank you.
But would you consider one way to be better?
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________