[OS X TeX] ifemptyelse

Alp Aker aker+ at pitt.edu
Sun Dec 19 11:19:14 EST 2004


> >>>>> Peder Axensten <peder at axensten.se> (PA) wrote:
>
> PA> I often need to check if some command is empty or not
>
> PA> Could anyone suggest definition of \ifemptyelse that works as expected?

You might check out ifmtarg.sty, available on CTAN.  Its definition of
"empty" is "expands to nothing or just to some number of space tokens" or
something like that.

It's pretty hard to design robust tests in this area; one rapidly runs
into low-level TeX subtleties.  The discussion at

http://www.ctan.org/tex-archive/info/aro-bend/answer.002

is illuminating in that regard.

Alp

--------------------- 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