On 8/15/2025 9:19 PM, Henning Hraban Ramm wrote:
Am 15.08.25 um 19:27 schrieb Wolfgang Schuster:
Am 15.08.2025 um 18:57 schrieb Hans Hagen via ntg-context:
On 8/15/2025 6:37 PM, Henning Hraban Ramm wrote:
Hi,
how can I check (in Lua or ConTeXt) if a symbol or color is defined?
\doifdefined is just for macros, isn’t it?
And how can I check if the current font has a glyph?
i suppose you grepped a bit
\doifelsesymboldefined
\doifelsecolor
\doifelsefontchar
and friends ....
also listed in setup-en.pdf
Oops, thanks!
I don’t know why I hate grep… Source browser and wiki just aren’t enough…
Actually when I say grep I mean:
> mtxrun --script grep doifelse*color *.mk*x
or somepath/*.mk*x or somepath/**.mk*x or ...
which is (1) a bit tex/xml aware and (2) uses lua patterns
rather old stuff btw so maybe i should improve it)
(I never use(d) grep .. just use the name as i've seen it being used so
nothing compatible to consider.)
(There are a few more such tools in the suite.)
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 : ntg-context@ntg.nl /
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
___________________________________________________________________________________