## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Forum View Use Monospaced Font Show Text Part by Default Show All Mail Headers Message: [<< First] [< Prev] [Next >] [Last >>] Topic: [<< First] [< Prev] [Next >] [Last >>] Author: [<< First] [< Prev] [Next >] [Last >>]

Joseph Wright writes:
> Hello all,
>
> Working on the galley (see the latest SVN checkin), I find that
> \box_if_empty:NTF is misleading. The test is for a void box, not an
> empty one:
>
> \box_new:N \l_my_box
> \hbox_set:Nn \l_my_box {}
> \box_if_empty:NTF \l_my_box { NOPE } { OOPS }
>
> I think it should be \box_if_void:NTF - any objections?

well, I think we can clearly state that the l3box module is far from being
what it should be, both in the sense of being incomplete as well as in the
sense of being partly wrong or containing badly named commands. The above
probably being an example of the latter.

However, I'm not sure that "void" is the best word either.  Ok, there is the
meaning "voiding something" ie making it invalid and to some extense that is
what a void box register is: you can't do most of the operations on it. But
there is also the meaning of void that is closer to empty and that is what I
think makes both void and empty a bad choice as there is clearly also
something like an empty hbox (\null) or \vbox{} ie a box that has no content
but is set in terms of what input it could have had.

maybe \box_if_unset:NTF is closer to its meaning.

A similar question goes for \box_use_clear:N ... that boxed isn't "cleared" it
is unset too afterwards.

Heiko's test for emptyness is testing for something quite different, isn't it?
Not sure there is an application for it, but perhaps there is (but probably
only if you provide other complex box manipulation commands as well)

frank