## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# Time for action – adding intelligent spacing to command output

We will load the package xspace. Its only purpose is to fulfill this need.

1. Modify the previous example to get the following code:
\documentclass{article}
\usepackage{xspace}
\newcommand{\TUG}{\textsc{TeX Users Group}\xspace}
\begin{document}
\section{The \TUG}
The \TUG is an organization for people who are interested in \TeX\ or \LaTeX.
\end{document}
2. Typeset, see that the spacing between the words is correct, even without the backslash:

## What just happened?

\usepackage{xspace} tells LaTeX to load the package called xspace and to read in all of its definitions. From now on we may use all commands ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required