On 2015-05-01 21:10, Wolfgang Schuster wrote:
> You can use the \doifelsenextchar command to check the character after your
> command.
>
> \define[1]\MyMacro
> {\doifelsenextchar{,}
> {#1}
> {#1. }}
>
> \starttext
>
> \MyMacro{left} right
>
> \MyMacro{left}, right
>
> \stoptext
>
>
> The limitation of this method is that you check only for one character at a
> time
> and when want to check for more you have to use multiple \doifelsenextchar
> lines.
>
> \doifelsenextchar{,}
> {...}
> {\doifelsenextchar{.}
> {...}
> {...}}
>
> Wolfgang
It worked, thanks.
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________