[texhax] Clash between \emph and \xspace

Philip G. Ratcliffe philip.ratcliffe at fastwebnet.it
Sat Nov 4 23:27:41 CET 2006


> If you compile the following file:
>
> \documentclass{article}
> \usepackage{xspace}
> \newcommand{\lin}{Lindel\"of\xspace}
> \begin{document}
> (property we call \emph{amply \lin})
>
> (property we call {\it amply \lin})
>
> (property we call {\it amply \lin\/})
> \end{document}
>
> you will see Goldilocks spacing after ``Lindel\"of''.  Since the
> second is
> one is much too close, you can see that it is not the case that \xspace
> has added a space.  I assume that the problem is that both macros use
> \futurelet.  Any suggestions?

Well this seems ok:

(property we call \emph{amply \lin{}})

The problem with \xspace is that it looks at the following character, which
is a problem if it appears at the end of an argument to some macro.  Sorry,
I've nothing more to offer.

Cheers,  Phil Ratcliffe



More information about the texhax mailing list