I would like to add \xspace to the Latin phrases of the chemmacros package because I don't want to use \ or {} at the end of commands without arguments.
However, when I try to define a new Latin phrase like \NewChemLatin{\testtest}{testtest\xspace}, the \xspace is ignored.
Also, I would like to avoid having to renew all the already defined Latin phrases or to add new helper commands like \newcommand{\xinsitu}{\insitu\xspace} or something like that.
MWE:
\documentclass{article}
\usepackage{chemmacros,xspace}
\NewChemLatin{\test}{test\xspace}
\newcommand{\xtest}{\test\xspace}
\begin{document}
This is a \test within a sentence.
And this is an end-of-sentence \test.
Now, this is an x-\xtest within a sentence.
And this is an end-of-sentence x-\xtest.
\end{document}
So, how can this be achieved?
