Class Topmark

  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.primitives.typesetter.mark.AbstractMarksCode
          extended byde.dante.extex.interpreter.primitives.typesetter.mark.Topmarks
              extended byde.dante.extex.interpreter.primitives.typesetter.mark.Topmark
All Implemented Interfaces:
Code, ExpandableCode, Localizable,, TokensConvertible

public class Topmark
extends Topmarks

This class provides an implementation for the primitive \topmark.

The Primitive \topmark

The primitive \topmark provides access to the topmost mark encountered on the current page – when processing the page in the output routine.

The primitive is a tokens register. It can be used wherever a tokens value is expected. The value is empty when no top mark is available yet.

See the documentation of the primitive \mark for further explanation of marks.


The formal description of this primitive is the following:
      → \topmark  



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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
Constructor Summary
Topmark(java.lang.String name)
          Creates a new object.
Method Summary
protected  java.lang.String getKey(Context context, TokenSource source, Typesetter typesetter)
          Get the key for this mark.
Methods inherited from class de.dante.extex.interpreter.primitives.typesetter.mark.Topmarks
Methods inherited from class de.dante.extex.interpreter.primitives.typesetter.mark.AbstractMarksCode
convertTokens, execute, expand
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, 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

Field Detail


protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail


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

name - the name for debugging
Method Detail


protected java.lang.String getKey(Context context,
                                  TokenSource source,
                                  Typesetter typesetter)
                           throws InterpreterException
Description copied from class: AbstractMarksCode
Get the key for this mark.

A Mark Name

A mark name determines under which key a mark 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 {@link de.dante.extex.interpreter.primitives.macro.Csname \csname}.


   ⟨register name⟩
       → {@linkplain
        | {@linkplain de.dante.extex.interpreter.TokenSource#scanNumber(Context)



getKey in class AbstractMarksCode
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
the key for the mark primitive
InterpreterException - in case of an error
See Also:
AbstractMarkCode.getKey( de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)