Sometimes, in LaTeX one wants to do the simple test if a macro is empty, e.g.

  This is...
    a pony farm.

I am interested in how the definition of \baz has to be made in order to obtain the desired results. A few thoughts make evident that all of the three definitions


will lead to the true case. Now, I would like to know, what is the best practice, or if there aren't any differences (as far as \def\@empty{}), or if there are cases in which one is to favor, (obviously) depending on what one is doing? (Examples would be really nice!)


1 Answer 1


If you are asking about the definition (rather than about the form of the test which is the focus of earlier questions)

then assuming \@empty has its usual meaning


are identical in terms of the resulting definition of \baz.


is in theory slightly different as TeX can share the memory used to store both definitions but as the definition in this case is empty, that isn't really a difference and in any case the difference is not detectable within TeX.

  • That is exactly what i was looking for, and also what i was afraid of. So you are basically saying that all the definitions in the end are equivalent (with a negliable difference). Hence one has the free choice. Thank you though for dealing with it.
    – Ruben
    Commented Aug 15, 2013 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .