Am 2018-05-24 um 11:24 schrieb Christoph Reller <[email protected]>:

> On Wed, 23 May 2018 17:54:39 +0200, Henning Hraban Ramm <[email protected]> 
> wrote:
>>>> What is the right way to define a command with both mandatory and
>>>> optional arguments, e.g:
>>> i'm not sure wht happens at your end but this is the best way:
>> 
>> Also, there’s documentation at
>> http://wiki.contextgarden.net/Commands_with_optional_arguments
>> If there’s something wrong, please fix it yourself or come back to this list 
>> ;)
> 
> Thank you Hraban for pointing me to the wiki. I was aware of this page
> but it contains only the case of mandatory arguments in curly braces
> {} not in brackets [].

Arguments in brackets are always optional (if I don’t misunderstand), depending 
on your own logic (\if*argument, \ifempty etc.)

see also
http://wiki.contextgarden.net/System_Macros :
http://wiki.contextgarden.net/System_Macros/Handling_Arguments
http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions
etc.
I need to read these more often myself...

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to