I'm not sure whether I am repeating an already existent question or not, but I'd like to know how to approach the following situation:
I want to define a macro to be an alias to some word or fragment of text. When I define it, the space coming after the command is ignored and consequently the spacing between that word and the next one is deleted, as can be viewed in the MWE below.
The following code
\documentclass{report}
\newcommand{\alias}{Paulo}
\newcommand{\altalias}{Paulo }
\newcommand{\formatalias}{%
{\fontfamily{ptm}\selectfont\textsc{Paulo}}%
}
\newcommand{\altformatalias}{%
{\fontfamily{ptm}\selectfont\textsc{Paulo}} %
}
\begin{document}
This is \alias, who is just checking \LaTeX's behaviour.\par
This is \alias who is just checking \LaTeX's behaviour.\par
This is \altalias who is just checking \LaTeX's behaviour.\par
This is \formatalias who is just checking \LaTeX's behaviour.\par
This is \altformatalias who is just checking \LaTeX's behaviour.
\end{document}
outputs like this:

So my question is, am I doing it right by just adding a space at the end of my macro, or should I do something else?
\formatalias.It will bePAULO .i.e., space before period. Use\formatalias{}instead. – Mar 29 '15 at 18:22\formatalias.(swap.with whatever punctuation is appropriate) when punctuation immediately follows the macro and\formatalias\when a space should follow the macro. – Paul Gessler Mar 29 '15 at 18:25