[OS X TeX] ifemptyelse

Peder Axensten peder at axensten.se
Sat Dec 18 19:24:32 EST 2004

I often need to check if some command is empty or not, so with the use 
of ifthen.sty I constructed
	\ifthenelse{\lengthtest{\wd\tempbox < 1pt}}{#2}{#3}%

I works pretty well, except when the tested argument is a counter (or 
something else) that is changed.

For example
     \ifemptyelse{\test}{Is empty!}{Is '\test'!}
will result in "Is One2!" (should be "Is 'On1'!", of course) and one 

Could anyone suggest definition of \ifemptyelse that works as expected?

By the way,
doesn't work at all with the example above...

+46-90-786.7719 (work)
+46-90-32344 (home)

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the MacOSX-TeX mailing list