1 May
2015
1 May
'15
9:53 p.m.
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.