Interface Advanceable

All Known Implementing Classes:
CountPrimitive, Delcode, DimenPrimitive, IntegerCode, LeftHyphenmin, Mag, MuskipParameter, NamedReal, Odelcode, RightHyphenmin, ScaledCode, SkipPrimitive

public interface Advanceable

This is a interface to mark those Classes which are able to advance something.

Extending \advance

The primitive \advance is designed to be expanded. It is fairly simple to write an advancable primitive. The associated code simply has to implement the interface Advanceable. Whenever \advance is encountered immediately followed by a token which has the proper code associated, the method advance is invoked. It is up to this method to gather further arguments and perform the functionality.

With this interface the functionality is in fact tied to the implementing code and not to the primitive \advance. Each primitive can be made aware for advancing without touchíng the code for \advance.

$Revision: 1.7 $
Gerd Neugebauer

Method Summary
 void advance(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method is called when the macro \advance has been seen.

Method Detail


public void advance(Flags prefix,
                    Context context,
                    TokenSource source,
                    Typesetter typesetter)
             throws InterpreterException
This method is called when the macro \advance has been seen. It performs the remaining tasks for the expansion.

prefix - the prefix for the command
context - the processor context
source - the token source to parse
typesetter - the typesetter
InterpreterException - in case of an error