[texhax] Finding blank argument to macro

Uwe Lueck uwe.lueck at web.de
Wed Jun 30 12:09:23 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}
> ?

... and even: If #9 contains (working) assignments only, it will create an \hbox of zero width, so this macro would consider #9 empty. So #9 could be the content of a macro package,  e.g., latex.ltx (unless something) ... Is latex.ltx empty?

Cheers, 

    Uwe.


More information about the texhax mailing list