de.dante.extex.typesetter.listMaker.math
Interface NoadConsumer

All Superinterfaces:
ListMaker
All Known Implementing Classes:
MathListMaker

public interface NoadConsumer
extends ListMaker

This interface describes list makers which are able to consume a Noad. This is usually the case for math list makers.

Version:
$Revision: 1.20 $
Author:
Gerd Neugebauer

Method Summary
 void add(MathCode mc, TypesettingContext tc)
          Add a mathematical glyph.
 void add(MathDelimiter del, TypesettingContext tc)
          Add a mathematical delimiter.
 void add(Mudimen skip)
          Add some math dimen Noad to the internal list.
 void add(Muskip glue)
          Add some math glue Noad to the internal list.
 void add(Noad noad)
          Add an arbitrary Noad to the internal list if it is prepared to hold one.
 Noad getLastNoad()
          Get access to the previous noad.
 void left(MathDelimiter delimiter)
          Open the group for a \left-\right construction.
 void middle(MathDelimiter delimiter)
          Middle in the group for a \left-\right construction.
 void right(MathDelimiter delimiter)
          Close the group for a \left-\right construction.
 Noad scanNoad(Flags flags, Context context, TokenSource source, Typesetter typesetter, java.lang.String primitive)
          Process the input until a Noad is completed.
 void switchToFraction(MathDelimiter leftDelimiter, MathDelimiter rightDelimiter, FixedDimen ruleWidth, TypesettingContext tc)
          This method instructs the implementing class to use a fraction construction.
 
Methods inherited from interface de.dante.extex.typesetter.ListMaker
add, add, addAndAdjust, addSpace, afterParagraph, complete, cr, getLastNode, getLocator, getMode, getPrevDepth, getSpacefactor, leftBrace, letter, mathShift, par, removeLastNode, rightBrace, setPrevDepth, setSpacefactor, showlist, subscriptMark, superscriptMark, tab
 

Method Detail

add

public void add(MathCode mc,
                TypesettingContext tc)
         throws TypesetterException
Add a mathematical glyph.

Parameters:
mc - the math code
tc - the typesetting context
Throws:
TypesetterException - in case of an error

add

public void add(MathDelimiter del,
                TypesettingContext tc)
         throws TypesetterException
Add a mathematical delimiter.

Parameters:
del - the delimiter
tc - the typesetting context
Throws:
TypesetterException - in case of an error

add

public void add(Muskip glue)
         throws TypesetterException
Add some math glue Noad to the internal list.

Parameters:
glue - the glue to add
Throws:
TypesetterException - in case of an error

add

public void add(Mudimen skip)
         throws TypesetterException
Add some math dimen Noad to the internal list.

Parameters:
skip - the length to add
Throws:
TypesetterException - in case of an error

add

public void add(Noad noad)
         throws TypesetterException
Add an arbitrary Noad to the internal list if it is prepared to hold one. This is usually the case in math modes.

Parameters:
noad - the noad to add
Throws:
TypesetterException - in case of an error

getLastNoad

public Noad getLastNoad()
                 throws TypesetterException
Get access to the previous noad.

Returns:
the previous noad or null if there is none
Throws:
TypesetterException - in case of an error

left

public void left(MathDelimiter delimiter)
          throws TypesetterException
Open the group for a \left-\right construction.

Parameters:
delimiter - the delimiter to typeset on theleft side
Throws:
TypesetterException - in case of an error

middle

public void middle(MathDelimiter delimiter)
            throws TypesetterException
Middle in the group for a \left-\right construction.

Parameters:
delimiter - the delimiter to typeset here
Throws:
TypesetterException - in case of an error

right

public void right(MathDelimiter delimiter)
           throws TypesetterException
Close the group for a \left-\right construction.

Parameters:
delimiter - the delimiter to typeset on the right side
Throws:
TypesetterException - in case of an error

scanNoad

public Noad scanNoad(Flags flags,
                     Context context,
                     TokenSource source,
                     Typesetter typesetter,
                     java.lang.String primitive)
              throws TypesetterException
Process the input until a Noad is completed. A Noad is either a single Noad or a list of Noads resulting from the processing of a block.

Parameters:
flags - the flags to restore after processing
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
primitive - the name of the primitive for error messages
Returns:
the Noad read or null if none could be gathered
Throws:
TypesetterException - in case of an error

switchToFraction

public void switchToFraction(MathDelimiter leftDelimiter,
                             MathDelimiter rightDelimiter,
                             FixedDimen ruleWidth,
                             TypesettingContext tc)
                      throws TypesetterException
This method instructs the implementing class to use a fraction construction. The math list collected so far is integrated into the fraction noad.

Parameters:
leftDelimiter - the left delimiter or null if none should be used.
rightDelimiter - the right delimiter or null if none should be used.
ruleWidth - th width of the rule or null to indicate that the default width should be used
Throws:
TypesetterException - in case of an error