I have read the answers to
but the alternative that I currently use is not mentioned:
\newcommand{\arnold}{Arnold Schwarzenegger{}}
which of course is less typing and less error-prone than adding {} after invoking the command. I haven't encountered any problems so far; on the contrary, I noticed that it some complex cases where \xspace inserts an unwanted space, {} gets it right.
So I was just wondering why apparently no one else is using this, and if it might cause problems which I am not aware of.
Edit: After the comments I realised that I always used this approach with a command that has a parameter, so my example should have been
\newcommand{\arnold}[1]{Arnold #1 Schwarzenegger}
That'll teach me to always check my examples no matter how similar to my code they seem to be.
So it's actually the argument that causes the correct spacing rather than the {}. If someone would explain to me why the argument makes a difference, I would be entirely happy.
\arnold \arnold? – Mico Aug 11 '19 at 08:33\arnold text... – Andrew Swann Aug 11 '19 at 08:36{}in that position does nothing useful at all. – David Carlisle Aug 11 '19 at 08:42\newcommand{\arnold}[1]{Arnold #1 Schwarzenegger},\arnold{} textinserts two spaces -- and not just one -- between "Arnold" and "Scharzenegger". Still not right, is it? – Mico Aug 11 '19 at 08:58\arnold{foo}already has the pair of braces built-in that one can add to avoid the space getting lost in an argument-less macro\foo{}. TeX only ignores spaces directly after a control word (basically any normal macro name like\fooor\arnoldexcept for special one-character macros like\?). If there are braces or anything else in between the space and the macro, the spaces will be present in the output. – moewe Aug 11 '19 at 09:00{}to the replacement text but your modified example doesn't use{}in the replacement text at all so does not fit the title of the question. – David Carlisle Aug 11 '19 at 09:07