[NTG-context] \startuserdata syntax questions

Rik Kabel context at rik.users.panix.com
Tue Aug 28 22:40:35 CEST 2018

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


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?

The second question: Is there the possibility to enhance the syntax so 
that one can write

    \startMyStuff [optionalkey=value, anotherkey=value]

instead of

    \startuserdata [MyStuff] [optionalkey=value, anotherkey=value]

Such syntactic sugar makes sweeter reading of the text, and makes 
clearer what is being done when nesting the macro.

Rik Kabel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180828/3cb1b257/attachment.html>

More information about the ntg-context mailing list