LaTeX command for constant text

In most theses or studies, you need to use certain notions very often, so a straigth-forward approach would be writing a small command for them. This way, you can change the notion or its formatting without having to change every occurence in the text. One would expect this to be fairly simple and it also is. However, there are some traps concerning the formatting. An example command would be:


The problem with this command is that it enters an additional freespace before and sometimes also after the text. To avoid the freespace before the text you have to make sure that there is no linebreak after the second opening curly brackets which can be done with %. To resolve the freespace after the text, there is a very convenient package named xspace. So the correct newcommand would be: