I would like to improve the plugin that I wrote for writing physical quantities according to SI prescriptions. The code I am working on is at https://github.com/pireddag/SIunits/tree/simple
Joris suggested me that I should make arguments editable in the active state of the SI
TeXmacs macro that typesets number and units together.
This macro is an xmacro, accepting a variable number of arguments; the first argument is the number and the following ones are the units.
I need still to think up how to organize things (and to figure out how they work!), but I have been able to make a little bit of progress by copying code from the Jolly Writer, pag. 254, last code block.
Now my code for the macro, in the file https://github.com/pireddag/SIunits/blob/simple/packages/SIUnits-simple.ts, is
<assign|SI|<xmacro|input|<SIHelper|<value|mode>|<quote-arg|input>>>>
<assign|SIHelper|<macro|mode|inp|<extern|SIScheme|<arg|mode>|<arg|inp>>>>
<drd-props|SI|arity|<tuple|repeat|1|1>|accessible|all>
In this way the fields are editable after activation.
Question: what does <tuple|repeat|1|1>
mean as arity?
Thanks in advance,
G.
P.S. maybe the code will change completely once I understand how to make it work; also I am under the impression that the one I wrote now has some defects, in case that will go into its own post