Suppose I'm defining a macro of some word I'm using a lot: \providecommand{\pv}{\emph{p-valor }} I already put the trailing space because most of the time it'll save from adding it manually (yes, I try to save myself from adding a space). However, sometimes I need to add a comma or something after the command, but using \pv. renders as
With a space after between the stop and the command. How do I prevent this space from appearing after the command? Note that removing it from macro definition is not an option and I'm looking for something between the command and the stop that "eats up" the trailing space.

\pv{}or\pv{}as needed. This doesn't solve my problem. 2. Changing my definition to\providecommand{\pv}{\emph{p-valor\xspace}}, load the packagexspaceand call the command as stated in 1. None of those solutions give me the desired output. – mrbolichi Jul 10 '16 at 20:20xspacesolution does do what you want. If it doesn't, please post a minimal example document that shows the problem. – Alan Munn Jul 10 '16 at 20:21