{xspace} is a command (provided by the package of the same name) that inserts a space if and only if the space is followed by punctuation. This is one of several techniques to deal with TeX's habit to "eat" spaces after macros without arguments.
Questions tagged [xspace]
55 questions
3
votes
2 answers
End-of-sentence space after \dots or \ldots or … with Xetex or Luatex
I do not understand how to type what we call in French points de suspension at the end of a sentence, like this...
I would like to create an \endldots command.
How could I redefine \ldots so that it behaves similarly to a regular dot with respect to…
Vincent Krebs
- 591
2
votes
1 answer
How to prevent xspace creating a space between my macro and a trailing single 's' character?
I have defined a macro like that: \newcommand{\code}[1]{\texttt{#1}\xspace}
In some situations, I'd like to write the plural of some object and the trailing (plural) 's'-character should not be marked as code. So it should look like that:…
Amos Egel
- 155
1
vote
1 answer
Prevent xspace from inserting white space at beginning of line
Short: Is there a way to prevent \xspace from inserting white space if it is at the beginning of a line?
Long: I have defined several formatting macros for use in normal text. One of these (\indoubt) is normally used inside of text to insert…
Andreas
- 955
0
votes
0 answers
Why not using xspace
I often read that one should not use xspace package, but why? Can someone give an example of problems caused?
duke
- 132