[texhax] Preserve space at end of expression enclosed in braces

Uwe Lueck uwe.lueck at web.de
Wed May 20 23:27:04 CEST 2009

Indeed, \textcolor{blue}{...} needs the \relax just like {\color{blue}...} for the leading space, thus behaves unlike \textrm{...}. I consider this a color bug, but can't afford ... Tested with A\morerefadd{ B }C (where the *final* space *always* appeared). Sorry -- Uwe. 

Dan Hatton <vi5u0-texhax at yahoo.co.uk> schrieb am 20.05.2009 12:39:25:
> On Tue, 19 May 2009, Uwe Lueck wrote:
> > And does the \relax produce the wanted leading space?
> Yes
> > As usual, please back your request with an actual application of
> > your macros that seems not to work properly.
> \documentclass{minimal}
> \usepackage{pstricks}
> \definecolor{LBRed}{rgb}{0.9,0.1,0.2}
> \definecolor{LBBlue}{rgb}{0.4,0.3,1.0}
> \newcommand{\morerefadd}[1]{{\color{LBBlue}#1}}
> \begin{document}
> Sometimes I miss out\morerefadd{ }spaces from my text.  Sometimes I
> even forget\morerefadd{ whole clauses}.
> \end{document}
> As I said, Philip's \relax idea fixes the problem.

More information about the texhax mailing list