[NTG-context] Defining command with optional and mandatory arguments

Christoph Reller christoph.reller at gmail.com
Wed May 23 15:39:17 CEST 2018


What is the right way to define a command with both mandatory and
optional arguments, e.g:


Consider the following MWE:

  \doifsomething{#1}{number 1: #1\par}
  \doifsomething{#2}{number 2: #2}\blank[big]}

In last year's versions of ConTeXt the output was

number 1: A
number 2: B
number 1: A

In the latest version of ConTeXt the output is

number 1: A
number 2: B
number 2: A

Is this behavior intended? How can I make a definition whose behavior
does not change in new versions of ConTeXt?



More information about the ntg-context mailing list