de.dante.extex.typesetter.output
Class TeXOutputRoutine

java.lang.Object
  extended byde.dante.extex.typesetter.output.TeXOutputRoutine
All Implemented Interfaces:
OutputRoutine

public class TeXOutputRoutine
extends java.lang.Object
implements OutputRoutine

This class provides a link between the typesetter and the interpreter for the output routine. In TeX the output routine is implemented in TeX's macro language. In ExTeX the output routine is a Java class implementing a defined interface. This class implements the interface required and forwards the request for processing to the appropriate interpreter.

The Tokens Register \output

The tokens register \output contains the program executed whenever a page is completed. If it is not defined then the built-in output routine will be used.

The box register 255 is used to pass in the current vertical list. This list is assumed to make it to the page. For this purpose the primitive \shipout can be used.

The output routine is assumed to clear the box register 255. If some material is left in this box register then this is considered an error.

The output routine is assumed to invoke \shipout. This does not have to happen at each invocation of the output routine. The count register \maxdeadcycles determines how many invocations are allowed which do not call \shipout. The count register \deadcycles contains the number of dead cycles encountered already.

Syntax

The formal description of this primitive is the following:
    ⟨output⟩
      → \output ⟨equals⟩ ⟨tokens⟩  

Examples

    \output={}  

The Count Parameter \deadcycles

The count register \deadcycles contains the number of attempts to call the output routine without any material being shipped out. Usually the output routine is expected to ship something out. Under some circumstances the output is delayed. Thus a large number of dead cycles can indicate a problem in the output routine. The register \deadcycles is compared with the register \maxdeadcycles to decide when an intervention seem appropriate.

Syntax

The formal description of this primitive is the following:
    ⟨deadcycles⟩
      → \deadcycles ⟨equals⟩ ⟨number⟩  

Examples

    \deadcycles=0  

The Count Parameter \maxdeadcycles

The count register \maxdeadcycles contains the maximum number of attempts to call the output routine without any material being shipped out. The output routine is expected to ship something out. Under some circumstances the output is delayed. Thus a large number of dead cycles can indicate a problem in the output routine. The register \deadcycles is compared with the register \maxdeadcycles to decide when an intervention seem appropriate.

Syntax

The formal description of this primitive is the following:
    ⟨maxdeadcycles⟩
      → \maxdeadcycles ⟨equals⟩ ⟨number⟩  

Examples

    \maxdeadcycles=1  

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Constructor Summary
TeXOutputRoutine(Interpreter interpreter)
          Creates a new object.
 
Method Summary
 void output(Page page, BackendDriver backend)
          The output function is invoked to process a vertical list and put the material on the page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeXOutputRoutine

public TeXOutputRoutine(Interpreter interpreter)
                 throws CatcodeException
Creates a new object.

Parameters:
interpreter - the interpreter
Throws:
CatcodeException - in case of an error
Method Detail

output

public void output(Page page,
                   BackendDriver backend)
            throws GeneralException
Description copied from interface: OutputRoutine
The output function is invoked to process a vertical list and put the material on the page. In fact it should find its way to the document writer – either immediately or later on.

Specified by:
output in interface OutputRoutine
Parameters:
page - the nodes to put onto the page
backend - the back-end driver to target the nodes to
Throws:
GeneralException - in case of an error
See Also:
de.dante.extex.typesetter.OutputRoutine#output( de.dante.extex.typesetter.type.page.Page, de.dante.extex.backend.BackendDriver)