On 3/20/2021 8:24 AM, Aditya Mahajan wrote:
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 a neat application!
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 -----------------------------------------------------------------