On Thu, Nov 12, 2020 at 07:07:24AM +0000, Gavin Smith wrote: > On Thu, Nov 12, 2020 at 01:13:12AM +0100, Patrice Dumas wrote: > > On Wed, Nov 11, 2020 at 07:05:17PM +0000, Gavin Smith wrote: > > > > > > > > I think that the arguments should be separated by commas both for > > > > consistency and also because we eventually want to allow for spaces in > > > > arguments. Also I think that it would be much better if the arguments > > > > were semantically defined. The first argument could be the language, > > > > the second a hint about the size. > > > > > > Could arbitrarily many arguments be provided? Are there any other > > > Texinfo commands which are variadic (separating arguments with commas)? > > > > There are @node and @float, and also @definfoenclose and @pagesizes > > although @pagesizes and @definfoenclose only accept specific arguments. > > Some @-commands do not use commas, but they are very specific (@alias, > > @syn*index, @def*). > > Right, I meant an unlimited number of arguments. @node and @float have > a variable number of arguments as you say.
Nothing with an unlimited number of arguments, but nothing prevents us from implementing it, should not be difficult. > > > Maybe there won't be any uses for this feature other than source > > > language and size, so it won't matter. I don't like making size part > > > of the language, though: I thought of this as a hack to be used when > > > you couldn't avoid it, rather than something to be encouraged. > > > > I agree, I think that we should stick as much as possible to a semantic > > language. But unless I am missing something the idea here is to cover > > @smallexample use case, so this means making size part of the language. > > The main use was to make syntax highlighting easier, even if it wasn't > supported directly. It could also be used for extracting segments of > code from Texinfo files for some purpose. I understand that, and actually I had a look, in the past, at syntax highlighting and using source-highlight for example to replace html in @example and similar, using code similar to the code used for tex4ht/latex2html, but a language specification was missing. Now it should be much easier to do. -- Pat
