xspace in Scissor LaTeX
Not yet. \usepackage{xspace} is accepted and \xspace causes no error, but it adds no space, so a command such as \tool defined with \xspace runs into the next word; write \tool{} or \tool\ before a space, which works here and in every TeX installation.
What the package does
A command without arguments, such as \tool, swallows the space that follows it: \tool runs prints "toolruns". xspace fixes this for your own commands. Ending the definition with \xspace adds a space after the command unless a punctuation mark follows:
\newcommand{\tool}{Scissor LaTeX\xspace}What works here
| Feature | In Scissor LaTeX | Notes |
|---|---|---|
\usepackage{xspace} | Works | Loads without a message. |
\xspace at the end of a definition | Not supported | No error, but no space either: the command still swallows the space after it. |
Before punctuation: \tool., \tool,, \tool's | Works | No space is wanted there, so the result is right. |
\tool{} runs, \tool\ runs, \tool~runs | Works | The usual ways to keep the space, with or without xspace. |
\xspaceaddexceptions, \xspaceremoveexception | Not supported | Skipped with a Problems note; the argument is printed. |
Examples
With \xspace alone, the space after the command is lost here. With {} it is kept:
\xspace adds no space; {} keeps it
\newcommand{\tool}{Scissor LaTeX\xspace}
Without braces: \tool runs in the browser.
With braces: \tool{} runs in the browser.
Before a comma: \tool, as shown, needs nothing.Defining the command without \xspace, and writing {} where a space follows, gives the same result in every TeX installation:
The portable way
\newcommand{\name}{Erika Mustermann}
\name{} measured 44 samples. The report by \name\ is ready, and
\name's notes are attached.Compatibility
- From a TeX installation to here: commands that rely on
\xspacerun into the following word. Add{}after them where a space follows. - From here to a TeX installation: documents compile there unchanged, and
\xspaceworks there. Commands written with{}look the same in both places.
The full manual is on CTAN: ctan.org/pkg/xspace. See also Your own commands with \newcommand and Packages that do not work.
Questions and answers
Why does my command swallow the space after it?
LaTeX reads the space after a command name as the end of the name, not as a space. Write \tool{} or \tool\ to keep it. xspace would add it automatically, but it does not work here yet.
Should I remove \xspace from my commands?
You do not have to: it causes no error. But the space is only kept where you write {} or \ after the command, so writing those is the reliable way.
Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-07.