[texhax] Finding blank argument to macro

Uwe Lueck uwe.lueck at web.de
Tue Jun 29 16:46:57 CEST 2010

Jim Diamond <Jim.Diamond at acadiau.ca>, 27.05.2010 13:43:48:
> On Thu, May 27, 2010 at 07:17 (-0400), Michael Barr wrote:
>> Here is a fragment of a macro I use to find if an argument is empty:
>>     \setbox0\hbox{$#9$}%
>>    \ifdim \wd0=0pt%
>>    %%%%%%%% omitted what you do if arg empty
>>    \else
>>    %%%%%%%% omitted what you do if not
>>    \if
> Hmmm... what if #9 is
> 	\hbox to 0 pt{blah \hss}
> ?
> Arguably a pathological example, but arguably not.

Actually, Jim's example works like \rlap{blah } with LaTeX (Jim certainly knew but thought better not to tell) where \rlap is used for \lefteqn, for the tabbing environment, and for thanks-footnotes. So it is useful to append something on the right of a centered line without affecting the alignment. So much for "pathological".



More information about the texhax mailing list