Microtype
adds extra space to the start and end of letterspaced text, configured via the \SetTracking
command's "outer spacing" option. Unfortunately, xspace
breaks this. For example, I define a few macros for acronyms:
\newcommand{\foo}[0]{\textsc{foo}\xspace}
The result of typesetting the text "bar \foo bar" now turns out lopsided: there is more space before "FOO" than after. Anyone know of a good workaround for this?
The following document adds lots of outer spacing to demonstrate the problem more clearly:
\documentclass{report}
\usepackage[tracking]{microtype}
\SetTracking
[outer spacing={2000*,,}]
{encoding=*, shape={sc,scit}}
{100}
\usepackage{xspace}
\newcommand{\foo}[0]{\textsc{foo}\xspace}
\begin{document}
bar \foo bar
bar \textsc{foo} bar
\end{document}
This prints
"bar foo bar"
in the first paragraph, and
"bar foo bar"
in the second.
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it.