Robin Fairbairns <[email protected]> a écrit:
> 
> Paul Isambert <[email protected]> wrote:
> 
> > Andreas Matthias <[email protected]> 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@x); now that
> > I think of it, it is strange that \unhbox\voidb@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@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@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@x pretty often, in two of the "big
> three" formats i know of.

The allocation is done alright, otherwise tex.box["voidb@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

Reply via email to