LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Wed, 5 Jan 2011 19:30:22 +0100
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=us-ascii
From: Frank Mittelbach <[log in to unmask]>
Parts/Attachments: text/plain (37 lines)
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)