Class AbstractBox

  extended byde.dante.extex.interpreter.type.AbstractCode
All Implemented Interfaces:
Code, Localizable,
Direct Known Subclasses:
BoxPrimitive, Indent, Insert, Noboundary, Noindent, Setbox, Setlanguage, Showbox, Showgroups, Showlists, Unhbox, Unhcopy, Unvbox, Unvcopy, Vadjust, Vsplit

public abstract class AbstractBox
extends AbstractCode

This is the abstract base class for primitives dealing with box registers. It provides a method to get the key of a box register.

$Revision: 1.22 $
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
Fields inherited from class de.dante.extex.interpreter.type.AbstractCode
Constructor Summary
AbstractBox(java.lang.String name)
          Creates a new object.
Method Summary
static java.lang.String getKey(Context context, TokenSource source, Typesetter typesetter, java.lang.String name)
          Return the key (the number) for the box register.
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, execute, getLocalizer, getName, isIf, isOuter, printable, printableControlSequence, readResolve, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public AbstractBox(java.lang.String name)
Creates a new object.

name - the name for debugging
Method Detail


public static java.lang.String getKey(Context context,
                                      TokenSource source,
                                      Typesetter typesetter,
                                      java.lang.String name)
                               throws InterpreterException
Return the key (the number) for the box register.

A Box Register Name

A box register name determines under which key a box register can be addressed. In TeX this used to be a positive number only. This has been extended to allow also a token list in braces.

The alternative is controlled by the count register \register.max. The following interpretation of the value of this count is used:

  • If the value of this count register is negative then a arbitrary non-negative number is allowed as register name as well as any list of tokens enclosed in braces.
  • If the value of this count register is not-negative then a only a non-negative number is allowed as register name which does not exceed the value of the count register.

The value of the count register \register.max is set differently for various configurations of ExTeX:

  • TeX uses the value 255.
  • eTeX uses the value 32767.
  • Omega uses the value 65536.
  • ExTeX uses the value -1.

Note that the register name \register.max contains a period. Thus it can normally not be entered easily since the catcode of the period is OTHER but needs to be LETTER. Thus you have to use a temporarily reassigned category code (see \catcode) or use \csname.


   ⟨box register name⟩
       → ⟨tokens⟩
        | ⟨number⟩  



context - the interpreter context to use
source - the source for new tokens
typesetter - the typesetter
name - the name of the primitive for error messages
the key for the box register
InterpreterException - in case of an error