[luatex] void box

Paul Isambert zappathustra at free.fr
Tue Feb 7 09:40:37 CET 2012


Robin Fairbairns <Robin.Fairbairns at cl.cam.ac.uk> a écrit:
> 
> Paul Isambert <zappathustra at free.fr> wrote:
> 
> > Andreas Matthias <andreas.matthias at gmail.com> a écrit:
> > > 
> > > What is the lua equivalent of a void box? I.e. how to
> > > create a void box in lua?
> > 
> > I'm not sure that it can be done, strictly speaking. By a void box, I
> > suppose you mean an unassigned box register (i.e. \voidb at x); now that
> > I think of it, it is strange that \unhbox\voidb at x is allowed in the
> > first place (if nothing is assigned to the register, how can you unhbox
> > it?).
> 
> what do you mean by "unassigned"?
> 
> of course, without macros of some sort, \voidb at x won't be assigned
> (i.e., the name won't mean anything).  i've not looked at context, but
> both plain and latex execute \newbox \voidb at x, but in both cases they
> only ever use it -- so nothing has been put into the virgin box.
> 

(I'm not sure I understand exactly what you mean, but I'll try to answer
anyway.)

By "unassigned" I mean that no material has been assigned to the register;
the allocation part is strictly cosmetic. I wouldn't say that `nothing
has been put into the virgin box;' rather, there is no box at all (i.e.
it's not the same thing as the empty box \setbox<register>=\hbox{})

> does luatex not actually allocate a register until its first use?  if
> not, it will have to allocate \voidb at x pretty often, in two of the "big
> three" formats i know of.

The allocation is done alright, otherwise tex.box["voidb at x"] would
return an error; that it returns nil means that nothing has been
assigned to that particular register, i.e. it doesn't point to any
h/vlist node.

> robin
> the un-knowledgeable

Oh, come on, you're the FAQman!

Best,
Paul



More information about the luatex mailing list