[NTG-context] \doifelse not working, \doiftextelse breaking
Pablo Rodriguez
oinos at gmx.es
Fri Oct 9 16:31:20 CEST 2020
On 10/9/20 4:08 PM, Wolfgang Schuster wrote:
> [..]
> You need a % at the end of the definition, otherwise TeX expects a space
> after the second argument to end the command.
>
> \unexpanded\def\startswith[#1][#2]%
> {...}
Many thanks for your ultra-fast reply, Wolfgang.
Now I see muy mistake. In my previous command definitions with two
arguments, the opening brace was right after the second argument.
> To improve your command and allow a space between both arguments you can use
>
> \unexpanded\def\startswith
> {\dodoubleargument\dostartswith}
>
> \def\dostartswith[#1][#2]%
> {...}
Now I see with \dosingleargument, \dodoubleargument and
\dotripleargument are there.
Which are the improvements to the command added by \do*argument?
> or just add a dummy parameter and use #1 and #3 to pass the arguments
>
> \unexpanded\def\startswith[#1]#2[#3]%
> {...}
This is shorter, but it looks to creepy (even for my code).
Many thanks for your help,
Pablo
--
http://www.ousia.tk
More information about the ntg-context
mailing list