de.dante.extex.interpreter.primitives.typesetter.mark
Class Topmarks

java.lang.Object
  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
All Implemented Interfaces:
Code, ExpandableCode, Localizable, java.io.Serializable, TokensConvertible
Direct Known Subclasses:
Topmark

public class Topmarks
extends AbstractMarksCode

This class provides an implementation for the primitive \topmarks.

The Primitive \topmarks

The primitive \topmarks provides access to the topmost mark of the given class 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 of the class is available yet.

The primitive \topmark is an abbreviation for \topmarks0.

The class of the top mark is determined when the \marks primitive is used to insert a mark into the current list. In TeX the class used to be a number in the range 0–255; the limit has been raised in eTeX to 32767 and in ExTeX to allow any number or tokens value.

Syntax

The formal description of this primitive is the following:
    ⟨topmarks⟩
      → \topmarks ⟨mark name⟩  

Examples

    \topmarks42  
    \topmarks{abc}  
    \topmarks\count0  
    \toks0=\topmark3  

Version:
$Revision: 1.6 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

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

serialVersionUID

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

See Also:
Constant Field Values
Constructor Detail

Topmarks

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

Parameters:
name - the name for debugging
Method Detail

getValue

protected Tokens getValue(Context context,
                          java.lang.String key)
                   throws InterpreterException
Description copied from class: AbstractMarksCode
Get the value for this mark.

Specified by:
getValue in class AbstractMarksCode
Parameters:
context - the interpreter context
key - the key
Returns:
the value
Throws:
InterpreterException - in case of an exception
See Also:
AbstractMarksCode.getValue( de.dante.extex.interpreter.context.Context, java.lang.String)