[texhax] Confused on \let for space

Jim Diamond Jim.Diamond at acadiau.ca
Wed Jul 18 04:21:45 CEST 2012

On Tue, Jul 17, 2012 at 19:25 (-0600), Doug McKenna wrote:

> Reinhard Kotucha wrote -

>>>Quick question based on some kinda TeX primitive/syntax confusion in my 

>>>How does one give a name, using \let, to a space character?  E.g., in

>>>  \let \blankspace =

>>>what comes after the '=' so that, for instance

>>> AB.C\ignorespaces    \blankspace   D

>>>will be typest as "AB.CD"?

>>>Or am I hallucinating that this \let is possible?  It works fine for 
>>>other non-space characters, e.g.,

>>>  \let\bgroup={

>>Just a guess, does \let\blankspace\  work?

> Not really.  It comes out as "AB. CD".  In other words, \  (backslash 
> space) breaks \ignorespaces's concentration before it gets to the 'D'.

> If one can define a name for a simple single input character (such as a 
> left brace), how does one do it for a blank space character?  Or is it 
> impossible by design, given how spaces are generally coalesced and turned 
> into skip glue?

How about one of

\def\setupkludge#1{\futurelet\spacetoken\relax}  \setupkludge{a} \relax

\spacetoken{\let\spacetoken= } % <- keep this comment-char!!!!!


\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.


More information about the texhax mailing list