I am trying to learn how to define commands (\newcommand) and variables (\def) in LaTeX.
When I try:
\def \new {$new$}
or
\newcommand{\new}{$new$}
and substitute it in the text:
\documentclass{article}
%\def \new {$new$}
%\newcommand{\new}{$new$}
\begin{document}
lala \new lala
\end{document}
The substituted text sticks to the following text as shown here:

no matter how many spaces I put after the command.
What causes this behavior and how can I change it?
\new) gets gobbled. To effect a space after\new, you can, for instance, use an empty group{}: trylala \new{} lala. – jub0bs Nov 22 '13 at 14:30xspacepackage and put\newcommand{\new}{$new$\xspace}. David is here any way to help ;-) – Nov 22 '13 at 14:52