Re: [NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-09 Thread Hans Hagen
On 7/9/2019 10:37 AM, Taco Hoekwater wrote: On 8 Jul 2019, at 17:18, mf wrote: Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the commands defined by

Re: [NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-09 Thread Taco Hoekwater
> On 8 Jul 2019, at 17:18, mf wrote: > > Hello list, > i've played a bit with interfaces.definecommand, that lets you define TeX > macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). > > I found that the commands defined by interfaces.definecommand fail when you > pass

Re: [NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-09 Thread Hans Hagen
On 7/8/2019 5:18 PM, mf wrote: Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the commands defined by interfaces.definecommand fail when you pass string arguments

[NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-08 Thread mf
Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the commands defined by interfaces.definecommand fail when you pass string arguments that contain brackets. I think

[NTG-context] interfaces.definecommand

2011-07-12 Thread Wolfgang Schuster
Hi Hans, is it possible to extend “interfaces.definecommand” so that it is possible to create commands without optional arguments. \starttext \startluacode function test(opt_1, arg_1) context(%s,arg_1) end interfaces.definecommand { name = test, arguments = { { option, list

Re: [NTG-context] interfaces.definecommand

2011-07-12 Thread Hans Hagen
On 12-7-2011 5:59, Wolfgang Schuster wrote: Hi Hans, is it possible to extend “interfaces.definecommand” so that it is possible to create commands without optional arguments. \starttext \startluacode function test(opt_1, arg_1) context(%s,arg_1) end interfaces.definecommand { name

Re: [NTG-context] interfaces.definecommand

2011-07-12 Thread Wolfgang Schuster
Am 12.07.2011 um 18:04 schrieb Hans Hagen: hm, isn't that what interfaces.definecommand { name = simpleone, macro = simpleone, } does? This creates a command without *any* arguments but i’m interested how to create a command with mandatory arguments only, e.g. \test{One}{Two}.

Re: [NTG-context] interfaces.definecommand

2011-07-12 Thread Hans Hagen
On 12-7-2011 6:24, Wolfgang Schuster wrote: Am 12.07.2011 um 18:04 schrieb Hans Hagen: hm, isn't that what interfaces.definecommand { name = simpleone, macro = simpleone, } does? This creates a command without *any* arguments but i’m interested how to create a command with