[texhax] Confused on \let for space

Philip TAYLOR P.Taylor at rhul.ac.uk
Wed Jul 18 11:22:31 CEST 2012



Jim Diamond wrote:

>
> How about one of
>
>
> \def\setupkludge#1{\futurelet\spacetoken\relax}  \setupkludge{a} \relax
>
>
> \def\spacetoken#1{#1}%
> \spacetoken{\let\spacetoken= } % <- keep this comment-char!!!!!
>
>
> \afterassignment\romannumeral\futurelet\spacetoken0
>
>
> \afterassignment\let\futurelet\spacetoken\: \:
>
>
> I'd like to say I was clever enough to think of all of those, but,
> alas, only one is mine.  Regrettably, I can't give credit where it is
> due for the others.  Apologies to those whose names I didn't copy down.

Crikey, they are more complex than I would have thought necessary.
How about :

	\def \dolet #1#2{\let #1 = #2}
	\dolet \truespace { }
	ab\ignorespaces \truespace cd.
	\end

** Phil.


More information about the texhax mailing list