On 8/28/2018 10:40 PM, Rik Kabel wrote:
Wolfgang, Hans, et al,
The new \startuserdata macro looks very promising, and can simplify some work I have in progress.
The first question: the wiki example and the source use
\userparameter{optionkey} \userparameter{anotherkey}
to retrieve the value of optionkey and anotherkey. Is there a way to provide the key/value pairs in a manner that they can be retrieved with the getparameters mechanism, as:
\getrawparameters [XX] [optionkey=,anotherkey=,#1]
This has the added advantage of allowing the setting of a default value, as
\getrawparameters [XX] [optionkey=2em,anotherkey=,#1]
Or is there a reason not to use getparameters in this setting?
hardly any of the core mechanisms in mkiv uses get(raw)parameters define a category and then clone it ...
The second question: Is there the possibility to enhance the syntax so that one can write
\startMyStuff [optionalkey=value, anotherkey=value] stuff \stopMyStuff
instead of
\startuserdata [MyStuff] [optionalkey=value, anotherkey=value] stuff \stopuserdata
Such syntactic sugar makes sweeter reading of the text, and makes clearer what is being done when nesting the macro. for such Named environments there are probably other alternatives (depending on what you need it for), like blocks
also, user dat picks up its content (they're buffers) so that would also mean more nested buffers .. it's meant as a simple mechanism 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 -----------------------------------------------------------------