I have the following definition in my latex document:
\newcommand{\emp}{\texttt{EMP}}
This eats the space after it. For example, if I type
Assume that relation \emp is fragmented
The latex output is
Assume that EMPis fragmented (notice the lack of space after EMP).
If I change the definition to put space after EMP like this:
\newcommand{\emp}{\texttt{EMP} }
The above example works, but then I have weird spaces before punctuations that follow \emp (e.g., in \emp, I have an extra space before ,).
Is there a proper way of defining these so I won't have this problem?
\emp{} isor\emp\ is. – Phelype Oleinik May 28 '19 at 15:41\␣(␣represents a space) forces TeX to insert a space after the command. If you don't want the space, like in\emp,you don't need the\␣, just write\emp,. If you do\emp\,you are doing a thin-space command\,. The\emp{}version can be used anywhere:\emp{}␣is nice. \emp{}, is nice, however the\␣version is used only where you need the space:\emp\␣is nice. \emp, is nice– Phelype Oleinik May 28 '19 at 16:20