I would like to define a macro for a word, i.e.
\newcommand{\stack}{{\it StackExchange} Tex}
But, I would like to automatically add a final space after that macro, like it is defined as
\newcommand{\stack}{{\it StackExchange} Tex }
except when the macro is followed by a comma, in order to avoid the situation like:
StackExchange Tex , blablabla...
Any suggestion how to insert a space only if the macro is not followed by a comma/dot character?
\stack blablaI would like to preserve a space, otherwise substitute the macro without extra characters – alessandro308 Jan 28 '19 at 11:34