[texhax] Finding blank argument to macro

Jim Diamond Jim.Diamond at acadiau.ca
Thu May 27 13:43:48 CEST 2010


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.

Cheers.

				Jim


More information about the texhax mailing list