[texhax] Clash between \emph and \xspace [corrected, improved]

Uwe Lueck uwe.lueck at web.de
Fri Nov 17 19:31:38 CET 2006


Michael, Martin, have you noted Phil's correction?  

"Philip G. Ratcliffe" <philip.ratcliffe at uninsubria.it> wrote 17.11.2006 13:02:32:
> 
> > Indeed, the LaTeX font commands like \emph{...} and \textit{...} 
> > put the token \check at icr and some other things behind their argument, 
> > so \xspace cannot see the closing bracket. 
> > 
> > With the recent version of xspace, you can do 
> > 
> >     \makeatletter
> >     \xspaceaddexeptions{\check at icr}
> >     \makeatother
> > 
> > so the final \xpace won't add a \space at the end of the text font 
> > argument. 
> 
> Good to know, exCept that you really meant \xspaceaddexceptions (with a
> "c").

Right, Phil, thanks. 

> > I wondered why current xspace package doesn't give \check at icr 
> > as an exeption already. 
> 
> Would seem sensible, especially since the problem arises with all font
> changing commands (such as \textbf, \textsl etc.). 

David Carlisle has asked me to send a request to the LaTeX bug data base. 
I am not sure whether taking it into the exceptions list is safe, 
since its default expansion seems to be the same as from \empty. 
But the new xspace (also?) uses different checks. 

> Moreover, there is no problem with the following commands: \MakeUppercase,
> \MakeLowercase, \textcolor ("color" package).

Fine, thanks, 

Uwe.


More information about the texhax mailing list