On 07/17/2010 11:09 PM, Mojca Miklavec wrote:
- The following: settings = { inherit = "useexternalfigure", -- n = 3 not needed, since one command has only one settings-option }, is a bit weird to me. Why not putting the "inherit" already under arguments above? And yes, you probably do need to tell from which argument of \useexternalfigure you want to inherit the settings.
I also think inline is better, even though it adds redundancy. The 'n' is probably not needed in practice even though conceptually Mojca is right.
- If all the three arguments are optional, it's a bit difficult to tell what combination of arguments is allowed, so it might make sense to be a bit more verbose in that (to tell somehow that for example only 123 and 23 and 3 is allowed, but not 13 for example), but this is not too important.
One way around that (and the 'n' issue) is to do something like this: arguments = { ["label_arg"] = { type = label, }, ["filename_arg"] = { type = file, }, ["settings_arg"] = { type = settings, comment = "short comment for this option", description = "long description for this option", inherit = { "useexternalfigure", 'settings_arg' } }, ["parent_arg"] = { type = parent, comment = "short comment for this option", description = "long description for this option" }, }, variants = { -- just an example { "filename_arg" }, { "label_arg", "filename_arg" }, { "label_arg", "filename_arg", "settings_arg" }, { "filename_arg", "parent_arg" }, } }, but I am not sure this is really better ? Best wishes, Taco