On 2/13/2026 11:20 AM, Andreas Hof via ntg-context wrote:
\edef\compareVal{A}
\edef\temp{\ctxlua{context("A")}}
\ifx\temp\compareVal equal\else not equal\fi
But in the following variants I always branch to the \else path:
\edef\temp{\ctxluacode{context("A")}}
\ifx\temp\compareVal equal\else not equal\fi
\meaningful\ctxluacode
shows that it is (1) protected and (2) does more
\edef\temp{\startluacode context("A") \stopluacode}
\ifx\temp\compareVal equal\else not equal\fi
idem
\edef\temp{\startlua context("A") \stoplua}
\ifx\temp\compareVal equal\else not equal\fi
idem
The following mwe (files are also attached), shows one use case (address
field in the letter)
so just use \ctxlua which expands
I hope someone here, is able to help.
also, there is:
- helper:
\doifelsesomething{\temp}{not empty}{empty}
- primitive \ifempty (also takes {})
\Salutaion\space\ifempty\Title\else\Title\space\fi\Firstname\space\Name
\blank[small]
- primitive \iftok
\iftok{\ctxlua{context("A")}}{A}\else not \fi equal
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________