[texhax] unexplained space

Donald Arseneau asnd at triumf.ca
Thu May 17 23:07:50 CEST 2007

Adam ENDRODI <borso at vekoll.saturnus.vein.hu> writes:

> \somemacro%
> 	{blahblah}%
> 	{http://somewhere}
> \somemacro being:
> \def\somemacro#1{\domesomething#1\begingroup\Url}
> i.e. \somemacro gobbled {blahblah} as it should, and by intention let the
> processing of {http://somewhere} to the url package.  Poor \Url did his
> usual tricks with catcodes and looked for a delimiter---and found what?
> A percent character.  Satisfied, it searched for the next percent, screwing
> the layout in interesting ways.

Ah ha!  A tricky trap.  There are some characters that keep their normal
meaning until the argument delimiters are detected: { } and space.  Maybe
% should be added to this list (making % unavailable as a delimiter).

> It may be worth noting that plain \url in place of \begingroup\Url would
> not find the url, even when I removed the percent characters; it is only
> \Url which skipped the following whitespace.

??? It should behave the same.  Maybe it was a different \url command, 
such as the definition provided by hyperref.

Donald Arseneau                          asnd at triumf.ca

More information about the texhax mailing list