On Sat, 20 Mar 2021, Christoph Reller wrote: > Of course we can do this in lua: > > if tex.modes["A"] and not tex.modes{"B"] then > ... > end
... which means that you can use that at the context end as well (old feature). Save the following as test.mkix (or add "% macros=mkix" as the first line): ``` \starttext <?lua if tex.modes["A"] and not tex.modes["B"] then ?> \starttyping A and not B \stoptyping <?lua else ?> \starttyping not (A and not B) \stoptyping <?lua end ?> \stoptext ``` See the templates manual for more details: https://www.pragma-ade.com/general/manuals/templates-mkiv.pdf Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________