I had created an abbreviation (abv) shortcut using the newcommand. However the command did not render as expected. Specifically, there is a gap between the abv and punctuation marks (See line 1 of the attached Figure). To address this, I manually add spacing between the last two curly bracket. While this did solved the aforementioned problem, but it removed spacing between the abv and text, especially in the middle of sentence (See line 2 of the attached Figure).
May I know how to solve this issue.
Updated: Solved using
\usepackage{xspace}
\newcommand{\STTbSpace}{STT\textsubscript{b}\xspace}
&&&&&&&&&&&&&&&&&&&&&&&
\documentclass[a4paper,12pt]{report}
\newcommand{\STTbSpace}{STT\textsubscript{b} } % Spacing between the last two curly bracket
\newcommand{\STTbNoSpace}{STT\textsubscript{b}} % No spacing between the last two curly bracket
\newcommand{\Fm}{F\textsubscript{1}-m }
\begin{document}
When the \STTbSpace in the mid of sentence versus at the end \STTbSpace.
When the \STTbNoSpace in the mid of sentence versus at the end \STTbNoSpace.
Similarly \Fm.
\end{document}

\STTbNoSpace{} in the mid ...to terminate the command. – Ulrike Fischer Jul 11 '19 at 08:31{}. – daleif Jul 11 '19 at 08:44xspacedoes advocate against its usage. It does create more hard to debug border cases than it's worth. You'll have to prove read every sentence in which you used anxspacedependent macro, see https://tex.stackexchange.com/questions/86565/drawbacks-of-xspace. Just use the correct syntax of putting{}or\(that is a backslash followed by a space) after the macro. – Skillmon Jul 11 '19 at 08:51