\def\test#1{
\def\csv{#1}
\ifx\csv\empty
\else
X\fi
}
\starttext
This is a test x\test{1}x.
\stoptext
Should result in xXx, but shows x Xx. How do I avoid the leading space here?
Edit: Ok, this has been resolved, but what if I need one or more leading spaces before the Xsuch as x Xx. Using this doesn't help:
\def\test#1{%
\def\csv{#1}%
\ifx\csv\empty%
\else%
X\fi%
}%
%at the end of the lines. – percusse May 20 '15 at 20:31%here? Thanks! – Singulaere Entitaet May 20 '15 at 20:35\testmacro has two (not "single") space tokens in the first two lines – David Carlisle May 20 '15 at 20:35