de.dante.extex.interpreter.context.impl
Class ContextImpl

java.lang.Object
  extended byde.dante.extex.interpreter.context.impl.ContextImpl
All Implemented Interfaces:
CodeObservable, ConditionalObservable, Configurable, Context, ContextCode, ContextCount, ContextDimen, ContextErrorCount, ContextFile, ContextFont, ContextGroup, ContextInteraction, ContextInternals, ContextMark, ContextTokens, CountObservable, DimenObservable, DocumentWriterOptions, GlueObservable, GroupObservable, InteractionObservable, LanguageManagerCarrier, LoadedObservable, Localizable, LogEnabled, java.io.Serializable, Tokenizer, TokensObservable, TokenStreamOptions, TypesetterOptions
Direct Known Subclasses:
ContextExtensionImpl

public class ContextImpl
extends java.lang.Object
implements ContextInternals, CodeObservable, ConditionalObservable, CountObservable, DimenObservable, GlueObservable, GroupObservable, InteractionObservable, LoadedObservable, TokensObservable, Tokenizer, DocumentWriterOptions, TypesetterOptions, TokenStreamOptions, Localizable, LogEnabled, Configurable, java.io.Serializable

This is a reference implementation for an interpreter context. The groups are implemented as a linked list of single groups. In contrast to the Knuthian implementation in TeX no undo stack is used.

Several operations have to be dealt with:

Version:
$Revision: 1.121 $
Author:
Gerd Neugebauer, Michael Niedermair
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
ContextImpl()
          Creates a new object.
 
Method Summary
 void addUnit(UnitInfo info)
          Add a unit to the list of loaded units.
 void afterGroup(AfterGroupObserver observer)
          Register a observer to be called at the end of the group.
 void afterGroup(Token t)
          Add a token to the tokens inserted after the group has been closed.
 void clearSplitMarks()
          This method clears all split marks.
 void closeGroup(Typesetter typesetter, TokenSource source)
          Perform all actions required upon the closing of a group.
 void configure(Configuration configuration)
          Configure an object according to a given Configuration.
 void enableLocalization(Localizer theLocalizer)
          Setter for the localizer.
 void enableLogging(java.util.logging.Logger theLogger)
          Setter for the logger.
 java.lang.String esc(java.lang.String name)
          Attach the current escape character in front of a name and return the result.
 java.lang.String esc(Token token)
          This method is meant to produce a printable version of a control sequence for error messages.
 UnicodeChar escapechar()
          Return the current escape character or \0 if it is undefined.
 java.lang.Object get(java.lang.Object extension, java.lang.Object key)
          Getter for a value from an extended section of the context.
 Token getAfterassignment()
          Getter for the afterassignment token.
 Tokens getBottomMark(java.lang.Object name)
          Getter for the bottom mark.
 Box getBox(java.lang.String name)
          Getter for the box register.
 Catcode getCatcode(UnicodeChar uc)
          Get the Catcode for a given Unicode character.
 Code getCode(CodeToken t)
          Convenience method to get the code assigned to a Token.
 Conditional getConditional()
          Getter for the currently active conditional.
 Count getCount(java.lang.String name)
          Getter for the count register.
 FixedCount getCountOption(java.lang.String name)
          Getter for a count register.
 MathDelimiter getDelcode(UnicodeChar c)
          Getter for the delimiter code mapping.
 Dimen getDimen(java.lang.String name)
          Get the current value of the dimen register with a given name.
 FixedDimen getDimenOption(java.lang.String name)
          Getter for a dimen register.
 int getErrorCount()
          Getter for the error count.
 Tokens getFirstMark(java.lang.Object name)
          Getter for the first mark.
 Font getFont(java.lang.String name)
          Getter for a current font register.
 FontFactory getFontFactory()
          Getter for the font factory.
 Glue getGlue(java.lang.String name)
          Getter for a glue register.
 FixedGlue getGlueOption(java.lang.String name)
          Getter for a glue register.
protected  Group getGroup()
          Getter for group.
 GroupInfo[] getGroupInfos()
          Getter for the array of group information describing the currently open groups.
 long getGroupLevel()
          Getter for the group level.
 GroupType getGroupType()
          Getter for the group type.
 java.lang.String getId()
          Getter for the id string.
 long getIfLevel()
          Getter for the current if level.
 InFile getInFile(java.lang.String name)
          Getter for a input file register.
 Interaction getInteraction()
          Getter for the interaction.
 Language getLanguage(java.lang.String language)
          Getter for the hyphenation record for a given language.
 LanguageManager getLanguageManager()
          Getter for the language manager.
 UnicodeChar getLccode(UnicodeChar uc)
          Getter for the lccode mapping of upper case characters to their lower case equivalent.
 long getMagnification()
          Getter for the magnification of the document.
 MathCode getMathcode(UnicodeChar c)
          Getter for the math code of a character.
 Muskip getMuskip(java.lang.String name)
          Getter for a muskip register.
 java.lang.String getNamespace()
          Getter for the name space.
 OutFile getOutFile(java.lang.String name)
          Getter for an output file descriptor.
 ParagraphShape getParshape()
          Getter for the parshape.
 Count getSfcode(UnicodeChar c)
          Getter for the space factor code of a character.
 Tokens getSplitBottomMark(java.lang.Object name)
          Getter for the split bottom mark.
 Tokens getSplitFirstMark(java.lang.Object name)
          Getter for the split first mark.
 TokenStream getStandardTokenStream()
          Getter for standardTokenStream.
 TokenFactory getTokenFactory()
          Getter for the token factory.
 Tokenizer getTokenizer()
          Getter for the tokenizer.
 Tokens getTokensOption(java.lang.String name)
          Getter for a dimen register.
 Tokens getToks(java.lang.String name)
          Getter for the Tokens register.
 FixedTokens getToksOption(java.lang.String name)
          Getter for a toks register.
 Tokens getToksOrNull(java.lang.String name)
          Getter for the toks register.
 Tokens getTopMark(java.lang.Object name)
          Getter for the top mark.
 TypesettingContext getTypesettingContext()
          Getter for the typesetting context.
 TypesettingContextFactory getTypesettingContextFactory()
          Getter for the typesetting context factory.
 UnicodeChar getUccode(UnicodeChar lc)
          Getter for the uccode mapping of lower case characters to their upper case equivalent.
 int incrementErrorCount()
          Increment the error count by 1.
 boolean isGlobalGroup()
          Test whether this group is the first one, which means that there is no group before and closing this group would fail.
 void openGroup(GroupType type, Locator locator, Token start)
          This method can be used to open another group.
 Conditional popConditional()
          Pop the management information for a conditional from the stack and return it.
 Direction popDirection()
          Pop a direction from the direction stack.
 void pushConditional(Locator locator, boolean isIfThenElse, Code primitive, long branch, boolean neg)
          Put a value onto the conditional stack.
 void pushDirection(Direction dir)
          Push a direction onto the direction stack.
 java.lang.Object readResolve()
          This method maps instances to their normal representations if required.
 void receiveLoad(TokenSource source)
          Receive a notification about a load event.
 void registerCodeChangeObserver(Token name, CodeObserver observer)
          Register an observer for code change events.
 void registerConditionalObserver(ConditionalObserver observer)
          Register an observer for conditional events.
 void registerCountObserver(java.lang.String name, CountObserver observer)
          Register an observer for count change events.
 void registerDimenObserver(java.lang.String name, DimenObserver observer)
          Register an observer for dimen change events.
 void registerGlueObserver(java.lang.String name, GlueObserver observer)
          Register an observer for glue change events.
 void registerGroupObserver(GroupObserver observer)
          Register an observer for group change events.
 void registerInteractionObserver(InteractionObserver observer)
          Register an observer for interaction mode change events.
 void registerLoadObserver(LoadedObserver observer)
          Register an observer for load events.
 void registerTokensObserver(java.lang.String name, TokensObserver observer)
          Register an observer for tokens change events.
 void set(Color color, boolean global)
          Setter for the color in the current typesetting context.
 void set(Direction direction, boolean global)
          Setter for the direction in the current typesetting context.
 void set(Font font, boolean global)
          Setter for the font in the current typesetting context.
 void set(Language language, boolean global)
          Setter for the language in the current typesetting context.
 void set(java.lang.Object extension, java.lang.Object key, java.lang.Object value, boolean global)
          Setter for a value from an extended section of the context.
 void set(TypesettingContext context, boolean global)
          Setter for the typesetting context in the specified groups.
 void setAfterassignment(Token token)
          Setter for the afterassignment token.
 void setBox(java.lang.String name, Box value, boolean global)
          Setter for the box register in the current group.
 void setCatcode(UnicodeChar c, Catcode cc, boolean global)
          Setter for the catcode of a character in the specified groups.
 void setCode(CodeToken t, Code code, boolean global)
          Setter for the code assigned to a Token.
 void setCount(java.lang.String name, long value, boolean global)
          Setter for the count register in all requested groups.
 void setCountOption(java.lang.String name, long value)
          Setter for a count register.
 void setDelcode(UnicodeChar c, MathDelimiter delimiter, boolean global)
          Setter for the delimiter code mapping.
 void setDimen(java.lang.String name, Dimen value, boolean global)
          Setter for the Dimen register in all requested groups.
 void setDimen(java.lang.String name, long value, boolean global)
          Setter for the Dimen register in all requested groups.
 void setFont(java.lang.String name, Font font, boolean global)
          Setter for font registers.
 void setFontFactory(FontFactory factory)
          Setter for the font factory.
 void setGlue(java.lang.String name, Glue value, boolean global)
          Setter for a glue register.
 void setId(java.lang.String theId)
          Setter for the id string.
 void setInFile(java.lang.String name, InFile file, boolean global)
          Setter for the InFile register in all requested groups.
 void setInteraction(Interaction interaction)
          Setter for the interaction in all requested groups.
 void setLanguageManager(LanguageManager manager)
          Setter for the language manager.
 void setLccode(UnicodeChar uc, UnicodeChar lc, boolean global)
          Declare the translation from an upper case character to a lower case character.
 void setMagnification(long mag, boolean lock)
          Setter for the magnification.
 void setMark(java.lang.Object name, Tokens mark)
          Setter for a mark.
 void setMathcode(UnicodeChar c, MathCode code, boolean global)
          Setter for the math code of a character
 void setMuskip(java.lang.String name, Muskip value, boolean global)
          Setter for a muskip register.
 void setNamespace(java.lang.String namespace, boolean global)
          Setter for the name space.
 void setOutFile(java.lang.String name, OutFile file, boolean global)
          Setter for a outfile descriptor.
 void setParshape(ParagraphShape shape)
          Setter for the paragraph shape.
 void setSfcode(UnicodeChar c, Count code, boolean global)
          Setter for the space factor code in the specified groups.
 void setSplitMark(java.lang.Object name, Tokens mark)
          Setter for a split mark.
 void setStandardTokenStream(TokenStream standardTokenStream)
          Setter for standardTokenStream.
 void setTokenFactory(TokenFactory factory)
          Setter for the token factory
 void setToks(java.lang.String name, Tokens toks, boolean global)
          Setter for the Tokens register in the specified groups.
 void setUccode(UnicodeChar lc, UnicodeChar uc, boolean global)
          Declare the translation from a lower case character to an upper case character.
 void startMarks()
          This method indicated that a new page is started.
 java.util.Iterator unitIterator()
          Get an iterator to enumerate all unit infos.
 void unregisterCodeChangeObserver(Token name, CodeObserver observer)
          Remove a registered observer for code change events.
 void unregisterConditionalObserver(ConditionalObserver observer)
          Remove a registered observer for conditional events.
 void unregisterCountObserver(java.lang.String name, CountObserver observer)
          Remove a registered observer for count change events.
 void unregisterDimenObserver(java.lang.String name, DimenObserver observer)
          Remove a registered observer for dimen change events.
 void unregisterGlueObserver(java.lang.String name, GlueObserver observer)
          Remove a registered observer for glue change events.
 void unregisterGroupObserver(GroupObserver observer)
          Remove a registered observer for group change events.
 void unregisterInteractionObserver(InteractionObserver observer)
          Remove a registered observer for interaction mode change events.
 void unregisterLoadObserver(LoadedObserver observer)
          Remove a registered observer for load events.
 void unregisterTokensChangeObserver(java.lang.String name, TokensObserver observer)
          Remove a registered observer for toks change events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

ContextImpl

public ContextImpl()
Creates a new object.

Method Detail

addUnit

public void addUnit(UnitInfo info)
Description copied from interface: Context
Add a unit to the list of loaded units. The units can be notified when the context is loaded from a format.

Specified by:
addUnit in interface Context
Parameters:
info - the info of the unit loaded
See Also:
Context.addUnit( de.dante.extex.interpreter.unit.UnitInfo)

afterGroup

public void afterGroup(AfterGroupObserver observer)
Description copied from interface: ContextGroup
Register a observer to be called at the end of the group. The end of the group is reached when the group is closed.

Specified by:
afterGroup in interface ContextGroup
Parameters:
observer - the observer to register
See Also:
ContextGroup.afterGroup( AfterGroupObserver)

afterGroup

public void afterGroup(Token t)
Description copied from interface: ContextGroup
Add a token to the tokens inserted after the group has been closed.

Specified by:
afterGroup in interface ContextGroup
Parameters:
t - the token to add
See Also:
ContextGroup.afterGroup( de.dante.extex.scanner.type.token.Token)

clearSplitMarks

public void clearSplitMarks()
Description copied from interface: ContextMark
This method clears all split marks.

Specified by:
clearSplitMarks in interface ContextMark
See Also:
ContextMark.clearSplitMarks()

closeGroup

public void closeGroup(Typesetter typesetter,
                       TokenSource source)
                throws InterpreterException
Description copied from interface: ContextGroup
Perform all actions required upon the closing of a group.

Specified by:
closeGroup in interface ContextGroup
Parameters:
typesetter - the typesetter to invoke if needed
source - the source to get Tokens from if needed
Throws:
InterpreterException - in case of an error
See Also:
ContextGroup.closeGroup( de.dante.extex.typesetter.Typesetter, de.dante.extex.interpreter.TokenSource)

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Description copied from interface: Configurable
Configure an object according to a given Configuration.

Specified by:
configure in interface Configurable
Parameters:
configuration - the configuration object to consider
Throws:
ConfigurationException - in case that something went wrong
See Also:
Configurable.configure( de.dante.util.framework.configuration.Configuration)

enableLocalization

public void enableLocalization(Localizer theLocalizer)
Setter for the localizer.

Specified by:
enableLocalization in interface Localizable
Parameters:
theLocalizer - the localizer to use
See Also:
Localizable.enableLocalization( de.dante.util.framework.i18n.Localizer)

enableLogging

public void enableLogging(java.util.logging.Logger theLogger)
Description copied from interface: LogEnabled
Setter for the logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
theLogger - the logger to use
See Also:
LogEnabled.enableLogging( java.util.logging.Logger)

esc

public java.lang.String esc(java.lang.String name)
Description copied from interface: Context
Attach the current escape character in front of a name and return the result. If the escape character is not set then the argument is returned unchanged.

This method is meant to produce a printable version of a control sequence for error messages.

Specified by:
esc in interface Context
Parameters:
name - the name of the macro
Returns:
the control sequence including the escape character
See Also:
Context.esc(java.lang.String)

esc

public java.lang.String esc(Token token)
Description copied from interface: Context
This method is meant to produce a printable version of a control sequence for error messages.

Specified by:
esc in interface Context
Parameters:
token - the token
Returns:
the control sequence including the escape character
See Also:
Context.esc( de.dante.extex.scanner.type.token.Token)

escapechar

public UnicodeChar escapechar()
Description copied from interface: Context
Return the current escape character or \0 if it is undefined. The escape character is retrieved from the count register \escapechar. This is a convenience method.

The Count Parameter \escapechar

The count register \escapechar contains code point of the escape character. This character is used whenever an control sequence is about to be printed and it has to be prefixed by the escape character.

If the value is less than zero then the escape character is assumed to be undefined. In this case the control sequence is not prefixed by any character.

Note that the escape character does not need to be in sync with the definition of the category codes. In fact they are independent. Usually they should coincide, but some interesting effects can be achieved with controlled disagreement.

Syntax

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

Examples

    \escapechar=-1  

Specified by:
escapechar in interface Context
Returns:
the escape character
See Also:
Context.escapechar()

get

public java.lang.Object get(java.lang.Object extension,
                            java.lang.Object key)
Description copied from interface: Context
Getter for a value from an extended section of the context.

Specified by:
get in interface Context
Parameters:
extension - the name of the extension
key - the key for the value
Returns:
the value stored
See Also:
Context.get( java.lang.Object, java.lang.Object)

getAfterassignment

public Token getAfterassignment()
Description copied from interface: Context
Getter for the afterassignment token.

Specified by:
getAfterassignment in interface Context
Returns:
the afterassignment token.
See Also:
Context.getAfterassignment()

getBottomMark

public Tokens getBottomMark(java.lang.Object name)
Description copied from interface: ContextMark
Getter for the bottom mark.

Specified by:
getBottomMark in interface ContextMark
Parameters:
name - the name of the mark
Returns:
the bottom mark
See Also:
ContextMark.getBottomMark( java.lang.Object)

getBox

public Box getBox(java.lang.String name)
Description copied from interface: Context
Getter for the box register. Count registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
getBox in interface Context
Parameters:
name - the name or number of the count register
Returns:
the count register or null if it is void
See Also:
Context.getBox(java.lang.String)

getCatcode

public Catcode getCatcode(UnicodeChar uc)
Get the Catcode for a given Unicode character.

Specified by:
getCatcode in interface Tokenizer
Parameters:
uc - the Unicode character to get the catcode for.
Returns:
the catcode for the character
See Also:
Tokenizer.getCatcode(de.dante.util.UnicodeChar)

getCode

public Code getCode(CodeToken t)
             throws InterpreterException
Description copied from interface: ContextCode
Convenience method to get the code assigned to a Token. If the Token is a ControlSequenceToken then the macro is returned. If the Token is a ActiveCharacterToken then the active value is returned.

Specified by:
getCode in interface ContextCode
Parameters:
t - the Token to differentiate on
Returns:
the code for the token
Throws:
InterpreterException - in case of an error
See Also:
ContextCode.getCode( de.dante.extex.scanner.type.token.CodeToken)

getConditional

public Conditional getConditional()
Description copied from interface: Context
Getter for the currently active conditional.

Specified by:
getConditional in interface Context
Returns:
the currently active conditional or null if none
See Also:
Context.getConditional()

getCount

public Count getCount(java.lang.String name)
Description copied from interface: ContextCount
Getter for the count register. Count registers are named, either with a number or an arbitrary string.

The numbered registers where limited to 256 in TeX. This restriction does not longer hold for ExTeX.

The return value is guaranteed to be a valid object. null will never be returned.

Specified by:
getCount in interface ContextCount
Parameters:
name - the name or number of the count register
Returns:
the count register or null if it is not defined
See Also:
ContextCount.getCount( java.lang.String)

getCountOption

public FixedCount getCountOption(java.lang.String name)
Description copied from interface: DocumentWriterOptions
Getter for a count register.

Specified by:
getCountOption in interface DocumentWriterOptions
Parameters:
name - the name of the register
Returns:
the content of the count register
See Also:
TypesetterOptions.getCountOption(java.lang.String)

getDelcode

public MathDelimiter getDelcode(UnicodeChar c)
Description copied from interface: Context
Getter for the delimiter code mapping.

Specified by:
getDelcode in interface Context
Parameters:
c - the character to which the delcode is assigned
Returns:
the delcode for the given character
See Also:
Context.getDelcode( de.dante.util.UnicodeChar)

getDimen

public Dimen getDimen(java.lang.String name)
Description copied from interface: ContextDimen
Get the current value of the dimen register with a given name.

Specified by:
getDimen in interface ContextDimen
Parameters:
name - the name or the number of the register
Returns:
the dimen register for the given name
See Also:
ContextDimen.getDimen( java.lang.String)

getDimenOption

public FixedDimen getDimenOption(java.lang.String name)
Description copied from interface: DocumentWriterOptions
Getter for a dimen register.

Specified by:
getDimenOption in interface DocumentWriterOptions
Parameters:
name - the name of the register
Returns:
the content of the dimen register
See Also:
TypesetterOptions.getDimenOption(java.lang.String)

getErrorCount

public int getErrorCount()
Description copied from interface: ContextErrorCount
Getter for the error count.

Specified by:
getErrorCount in interface ContextErrorCount
Returns:
the current value of the number of errors
See Also:
ContextErrorCount.getErrorCount()

getFirstMark

public Tokens getFirstMark(java.lang.Object name)
Description copied from interface: ContextMark
Getter for the first mark.

Specified by:
getFirstMark in interface ContextMark
Parameters:
name - the name of the mark
Returns:
the first mark
See Also:
ContextMark.getFirstMark( java.lang.Object)

getFont

public Font getFont(java.lang.String name)
Description copied from interface: TypesetterOptions
Getter for a current font register.

Specified by:
getFont in interface ContextFont
Parameters:
name - the name or the number of the register
Returns:
the named font register or null if none is set
See Also:
ContextFont.getFont(java.lang.String)

getFontFactory

public FontFactory getFontFactory()
Description copied from interface: ContextFont
Getter for the font factory.

Specified by:
getFontFactory in interface ContextFont
Returns:
the fontFactory.
See Also:
ContextFont.getFontFactory()

getGlue

public Glue getGlue(java.lang.String name)
Description copied from interface: Context
Getter for a glue register.

Specified by:
getGlue in interface Context
Parameters:
name - the name of the glue register to acquire.
Returns:
the value of the named glue register or null if none is set
See Also:
Context.getGlue(java.lang.String)

getGlueOption

public FixedGlue getGlueOption(java.lang.String name)
Description copied from interface: TypesetterOptions
Getter for a glue register.

Specified by:
getGlueOption in interface TypesetterOptions
Parameters:
name - the name of the register
Returns:
the content of the glue register
See Also:
TypesetterOptions.getGlueOption(java.lang.String)

getGroup

protected Group getGroup()
Getter for group.

Returns:
the group.

getGroupInfos

public GroupInfo[] getGroupInfos()
Description copied from interface: ContextGroup
Getter for the array of group information describing the currently open groups. The elements represent the groups in ascending order. Thus the element 0 always represents the global group. This one is guaranteed to be present. This means that the arras has always at least one element.

Specified by:
getGroupInfos in interface ContextGroup
Returns:
the array of group infos
See Also:
ContextGroup.getGroupInfos()

getGroupLevel

public long getGroupLevel()
Getter for the group level. The group level is the number of groups which are currently open. Thus this number of groups can be closed.

Specified by:
getGroupLevel in interface ContextGroup
Returns:
the group level
See Also:
ContextGroup.getGroupLevel()

getGroupType

public GroupType getGroupType()
Description copied from interface: ContextGroup
Getter for the group type.

Specified by:
getGroupType in interface ContextGroup
Returns:
the group type
See Also:
ContextGroup.getGroupType()

getId

public java.lang.String getId()
Getter for the id string. The id string is the classification of the original source as given in the format file. The id string can be null if not known yet.

Specified by:
getId in interface Context
Returns:
the id string
See Also:
Context.getId()

getIfLevel

public long getIfLevel()
Description copied from interface: Context
Getter for the current if level.

Specified by:
getIfLevel in interface Context
Returns:
the current if level
See Also:
Context.getIfLevel()

getInFile

public InFile getInFile(java.lang.String name)
Description copied from interface: ContextFile
Getter for a input file register. In the case that the named descriptor doe not exist yet a new one is returned. Especially if the name is null then the default input stream is used.

Specified by:
getInFile in interface ContextFile
Parameters:
name - the name or the number of the file register
Returns:
the input file descriptor
See Also:
ContextFile.getInFile( java.lang.String)

getInteraction

public Interaction getInteraction()
Description copied from interface: ContextInteraction
Getter for the interaction. The interaction determines how verbose the actions are reported and how the interaction with the user is performed in case of an error.

Specified by:
getInteraction in interface ContextInteraction
Returns:
the current interaction
See Also:
ContextInteraction.getInteraction()

getLanguage

public Language getLanguage(java.lang.String language)
                     throws InterpreterException
Description copied from interface: Context
Getter for the hyphenation record for a given language. The language is used to find the hyphenation table. If the language is not known an attempt is made to create it. Otherwise the default hyphenation table is returned.

Specified by:
getLanguage in interface Context
Parameters:
language - the name of the language to use
Returns:
the hyphenation table for the requested language
Throws:
InterpreterException - in case of an error
See Also:
Context.getLanguage(String)

getLanguageManager

public LanguageManager getLanguageManager()
Description copied from interface: Context
Getter for the language manager.

Specified by:
getLanguageManager in interface Context
Returns:
the language manager
See Also:
Context.getLanguageManager()

getLccode

public UnicodeChar getLccode(UnicodeChar uc)
Description copied from interface: TypesetterOptions
Getter for the lccode mapping of upper case characters to their lower case equivalent.

Specified by:
getLccode in interface Context
Parameters:
uc - the upper case character
Returns:
the lower case equivalent or null if none exists
See Also:
Context.getLccode( de.dante.util.UnicodeChar)

getMagnification

public long getMagnification()
Description copied from interface: DocumentWriterOptions
Getter for the magnification of the document.

Specified by:
getMagnification in interface Context
Returns:
the magnification factor
See Also:
Context.getMagnification()

getMathcode

public MathCode getMathcode(UnicodeChar c)
Description copied from interface: Context
Getter for the math code of a character.

Specified by:
getMathcode in interface Context
Parameters:
c - the character index
Returns:
the math code
See Also:
Context.getMathcode( de.dante.util.UnicodeChar)

getMuskip

public Muskip getMuskip(java.lang.String name)
Description copied from interface: TypesetterOptions
Getter for a muskip register.

Specified by:
getMuskip in interface Context
Parameters:
name - the name or the number of the register
Returns:
the named muskip or null if none is set
See Also:
Context.getMuskip( java.lang.String)

getNamespace

public java.lang.String getNamespace()
Description copied from interface: Tokenizer
Getter for the name space.

Specified by:
getNamespace in interface Context
Returns:
the current name space
See Also:
Context.getNamespace()

getOutFile

public OutFile getOutFile(java.lang.String name)
Description copied from interface: ContextFile
Getter for an output file descriptor.

Specified by:
getOutFile in interface ContextFile
Parameters:
name - the name or the number of the file register
Returns:
the output file descriptor
See Also:
ContextFile.getOutFile( java.lang.String)

getParshape

public ParagraphShape getParshape()
Getter for the parshape. The parshape is a feature of the context which does not interact with the grouping mechanism.

Specified by:
getParshape in interface Context
Returns:
the paragraph shape or null if no special shape is present
See Also:
Context.getParshape()

getSfcode

public Count getSfcode(UnicodeChar c)
Description copied from interface: Context
Getter for the space factor code of a character.

Specified by:
getSfcode in interface Context
Parameters:
c - the Unicode character
Returns:
the space factor code.
See Also:
Context.getSfcode( de.dante.util.UnicodeChar)

getSplitBottomMark

public Tokens getSplitBottomMark(java.lang.Object name)
Description copied from interface: ContextMark
Getter for the split bottom mark.

Specified by:
getSplitBottomMark in interface ContextMark
Parameters:
name - the name of the mark
Returns:
the split bottom mark
See Also:
ContextMark.getSplitBottomMark( java.lang.Object)

getSplitFirstMark

public Tokens getSplitFirstMark(java.lang.Object name)
Description copied from interface: ContextMark
Getter for the split first mark.

Specified by:
getSplitFirstMark in interface ContextMark
Parameters:
name - the name of the mark
Returns:
the split first mark
See Also:
ContextMark.getSplitFirstMark( java.lang.Object)

getStandardTokenStream

public TokenStream getStandardTokenStream()
Description copied from interface: Context
Getter for standardTokenStream.

Specified by:
getStandardTokenStream in interface Context
Returns:
the standardTokenStream
See Also:
Context.getStandardTokenStream()

getTokenFactory

public TokenFactory getTokenFactory()
Getter for the token factory.

Specified by:
getTokenFactory in interface Context
Returns:
the token factory
See Also:
Context.setTokenFactory(TokenFactory)

getTokenizer

public Tokenizer getTokenizer()
Getter for the tokenizer.

Specified by:
getTokenizer in interface Context
Returns:
the tokenizer
See Also:
Context.setCatcode(UnicodeChar, Catcode, boolean)

getTokensOption

public Tokens getTokensOption(java.lang.String name)
Description copied from interface: DocumentWriterOptions
Getter for a dimen register.

Specified by:
getTokensOption in interface DocumentWriterOptions
Parameters:
name - the name of the register
Returns:
the content of the dimen register
See Also:
DocumentWriterOptions.getTokensOption(java.lang.String)

getToks

public Tokens getToks(java.lang.String name)
Description copied from interface: ContextTokens
Getter for the Tokens register. Tokens registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
getToks in interface ContextTokens
Parameters:
name - the name or number of the token register
Returns:
the token register or a new one if it is not defined yet
See Also:
ContextTokens.getToks(java.lang.String)

getToksOption

public FixedTokens getToksOption(java.lang.String name)
Description copied from interface: TokenStreamOptions
Getter for a toks register.

Specified by:
getToksOption in interface TokenStreamOptions
Parameters:
name - the name of the register
Returns:
the content of the toks register
See Also:
TokenStreamOptions.getToksOption( java.lang.String)

getToksOrNull

public Tokens getToksOrNull(java.lang.String name)
Description copied from interface: ContextTokens
Getter for the toks register. Tokens registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
getToksOrNull in interface ContextTokens
Parameters:
name - the name or number of the token register
Returns:
the token register or null if it is not defined
See Also:
ContextTokens.getToksOrNull(java.lang.String)

getTopMark

public Tokens getTopMark(java.lang.Object name)
Description copied from interface: ContextMark
Getter for the top mark.

Specified by:
getTopMark in interface ContextMark
Parameters:
name - the name of the mark
Returns:
the top mark
See Also:
ContextMark.getTopMark( java.lang.Object)

getTypesettingContext

public TypesettingContext getTypesettingContext()
Getter for the typesetting context.

Specified by:
getTypesettingContext in interface Context
Returns:
the typesetting context
See Also:
TypesetterOptions.getTypesettingContext()

getTypesettingContextFactory

public TypesettingContextFactory getTypesettingContextFactory()
Description copied from interface: ContextInternals
Getter for the typesetting context factory.

Specified by:
getTypesettingContextFactory in interface ContextInternals
Returns:
the typesetting context factory
See Also:
ContextInternals.getTypesettingContextFactory()

getUccode

public UnicodeChar getUccode(UnicodeChar lc)
Description copied from interface: Context
Getter for the uccode mapping of lower case characters to their upper case equivalent.

Specified by:
getUccode in interface Context
Parameters:
lc - the upper case character
Returns:
the upper case equivalent or null if none exists
See Also:
Context.getUccode( de.dante.util.UnicodeChar)

incrementErrorCount

public int incrementErrorCount()
Description copied from interface: ContextErrorCount
Increment the error count by 1.

Specified by:
incrementErrorCount in interface ContextErrorCount
Returns:
the new value of the error count
See Also:
ContextErrorCount.incrementErrorCount()

isGlobalGroup

public boolean isGlobalGroup()
Description copied from interface: ContextGroup
Test whether this group is the first one, which means that there is no group before and closing this group would fail.

Specified by:
isGlobalGroup in interface ContextGroup
Returns:
true iff this is the first group
See Also:
ContextGroup.isGlobalGroup()

openGroup

public void openGroup(GroupType type,
                      Locator locator,
                      Token start)
               throws ConfigurationException,
                      InterpreterException
Description copied from interface: ContextGroup
This method can be used to open another group. The current group is pushed onto the stack to be reactivated when the new group will be closed.

Specified by:
openGroup in interface ContextGroup
Parameters:
type - the type of the group
locator - the locator for the start
start - the token which started the group
Throws:
ConfigurationException - in case of an error in the configuration, e.g. the class for the group can not be determined.
InterpreterException - in case of an error
See Also:
ContextGroup.openGroup( de.dante.extex.interpreter.context.group.GroupType, de.dante.util.Locator, de.dante.extex.scanner.type.token.Token)

popConditional

public Conditional popConditional()
Description copied from interface: Context
Pop the management information for a conditional from the stack and return it. If the stack is empty then null is returned.

Specified by:
popConditional in interface Context
Returns:
the formerly topmost element from the conditional stack
See Also:
Context.popConditional()

popDirection

public Direction popDirection()
Description copied from interface: Context
Pop a direction from the direction stack.

Specified by:
popDirection in interface Context
Returns:
the topmost direction on the stack or null if the stack is empty
See Also:
Context.popDirection()

pushConditional

public void pushConditional(Locator locator,
                            boolean isIfThenElse,
                            Code primitive,
                            long branch,
                            boolean neg)
Description copied from interface: Context
Put a value onto the conditional stack.

Specified by:
pushConditional in interface Context
Parameters:
locator - the locator for the start of the if statement
isIfThenElse - the value to push
primitive - the name of the primitive which triggered this operation
branch - the branch number
neg - negation indicator
See Also:
Context.pushConditional( de.dante.util.Locator, boolean, de.dante.extex.interpreter.type.Code, long, boolean)

pushDirection

public void pushDirection(Direction dir)
Description copied from interface: Context
Push a direction onto the direction stack.

Specified by:
pushDirection in interface Context
Parameters:
dir - the direction
See Also:
de.dante.extex.interpreter.context.Context#pushDirection(de.dante.extex.interpreter.context.Direction)

readResolve

public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
This method maps instances to their normal representations if required. It is used during the deserialization.

Returns:
the normalized object
Throws:
java.io.ObjectStreamException - in case of an error

receiveLoad

public void receiveLoad(TokenSource source)
                 throws InterpreterException
Description copied from interface: LoadedObservable
Receive a notification about a load event.

Specified by:
receiveLoad in interface LoadedObservable
Parameters:
source - the token source
Throws:
InterpreterException - in case of an error
See Also:
LoadedObservable.receiveLoad( de.dante.extex.interpreter.TokenSource)

registerCodeChangeObserver

public void registerCodeChangeObserver(Token name,
                                       CodeObserver observer)
Description copied from interface: CodeObservable
Register an observer for code change events. Code change events are triggered when the assignment of a macro or active character changes. In this case the appropriate method in the observer is invoked.

Specified by:
registerCodeChangeObserver in interface CodeObservable
Parameters:
name - the token to be observed. This should be a macro or active character token.
observer - the observer to receive the events
See Also:
CodeObservable.registerCodeChangeObserver( de.dante.extex.scanner.type.token.Token, de.dante.extex.interpreter.context.observer.code.CodeObserver)

registerConditionalObserver

public void registerConditionalObserver(ConditionalObserver observer)
Description copied from interface: ConditionalObservable
Register an observer for conditional events. Conditional events are triggered when a conditional is started or ended.

Specified by:
registerConditionalObserver in interface ConditionalObservable
Parameters:
observer - the observer to receive the events
See Also:
ConditionalObservable.registerConditionalObserver( de.dante.extex.interpreter.context.observer.conditional.ConditionalObserver)

registerCountObserver

public void registerCountObserver(java.lang.String name,
                                  CountObserver observer)
Description copied from interface: CountObservable
Register an observer for count change events. Count change events are triggered when a value is assigned to a count register. In this case the appropriate method in the observer is invoked.

A single count register can be observed by giving a name of the count register to observe. Only changes to this register trigger the notification. If this name is null the changes to all registers are reported to the observer.

Specified by:
registerCountObserver in interface CountObservable
Parameters:
name - the name or the number of the register
observer - the observer to receive the events
See Also:
CountObservable.registerCountObserver( java.lang.String, de.dante.extex.interpreter.context.observer.count.CountObserver)

registerDimenObserver

public void registerDimenObserver(java.lang.String name,
                                  DimenObserver observer)
Description copied from interface: DimenObservable
Register an observer for dimen change events. Count change events are triggered when a value is assigned to a dimen register. In this case the appropriate method in the observer is invoked.

A single dimen register can be observed by giving a name of the dimen register to observe. Only changes to this register trigger the notification. If this name is null the changes to all registers are reported to the observer.

Specified by:
registerDimenObserver in interface DimenObservable
Parameters:
name - the name or the number of the register
observer - the observer to receive the events
See Also:
DimenObservable.registerDimenObserver( java.lang.String, de.dante.extex.interpreter.context.observer.dimen.DimenObserver)

registerGlueObserver

public void registerGlueObserver(java.lang.String name,
                                 GlueObserver observer)
Description copied from interface: GlueObservable
Register an observer for glue change events. Count change events are triggered when a value is assigned to a glue register. In this case the appropriate method in the observer is invoked.

A single glue register can be observed by giving a name of the glue register to observe. Only changes to this register trigger the notification. If this name is null the changes to all registers are reported to the observer.

Specified by:
registerGlueObserver in interface GlueObservable
Parameters:
name - the name or the number of the register
observer - the observer to receive the events
See Also:
GlueObservable.registerGlueObserver( java.lang.String, de.dante.extex.interpreter.context.observer.glue.GlueObserver)

registerGroupObserver

public void registerGroupObserver(GroupObserver observer)
Description copied from interface: GroupObservable
Register an observer for group change events. Group change events are triggered when a group is opened or closed. In this case the appropriate method in the observer is invoked.

Specified by:
registerGroupObserver in interface GroupObservable
Parameters:
observer - the observer to receive the events
See Also:
GroupObservable.registerGroupObserver( de.dante.extex.interpreter.context.observer.group.GroupObserver)

registerInteractionObserver

public void registerInteractionObserver(InteractionObserver observer)
Description copied from interface: InteractionObservable
Register an observer for interaction mode change events. Interaction mode change events are triggered when a new value is assigned to the interaction mode. In this case the appropriate method in the observer is invoked.

A single count register can be observed by giving a name of the count register to observe. Only changes to this register trigger the notification. If this name is null the changes to all registers are reported to the observer.

Specified by:
registerInteractionObserver in interface InteractionObservable
Parameters:
observer - the observer to receive the events
See Also:
de.dante.extex.interpreter.context.ContextInteraction#registerInteractionObserver( de.dante.extex.interpreter.context.observer.InteractionObserver)

registerLoadObserver

public void registerLoadObserver(LoadedObserver observer)
Description copied from interface: LoadedObservable
Register an observer for load events. Code change events are triggered when the context is loaded.

Specified by:
registerLoadObserver in interface LoadedObservable
Parameters:
observer - the observer to receive the events
See Also:
LoadedObservable.registerLoadObserver( de.dante.extex.interpreter.context.observer.load.LoadedObserver)

registerTokensObserver

public void registerTokensObserver(java.lang.String name,
                                   TokensObserver observer)
Description copied from interface: TokensObservable
Register an observer for tokens change events. Tokens change events are triggered when an assignment to a tokens register is performed. In this case the appropriate method in the observer is invoked.

Specified by:
registerTokensObserver in interface TokensObservable
Parameters:
name - the token to be observed. This should be a macro or active character token.
observer - the observer to receive the events
See Also:
TokensObservable.registerTokensObserver( java.lang.String, de.dante.extex.interpreter.context.observer.tokens.TokensObserver)

set

public void set(Color color,
                boolean global)
         throws ConfigurationException
Description copied from interface: Context
Setter for the color in the current typesetting context.

Specified by:
set in interface Context
Parameters:
color - the new color
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
ConfigurationException - in case of an error in the configuration.
See Also:
Context.set( de.dante.extex.interpreter.context.Color, boolean)

set

public void set(Direction direction,
                boolean global)
         throws ConfigurationException
Description copied from interface: Context
Setter for the direction in the current typesetting context.

Specified by:
set in interface Context
Parameters:
direction - the new direction
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
ConfigurationException - in case of an error in the configuration.
See Also:
de.dante.extex.interpreter.context.Context#set( de.dante.extex.interpreter.context.Direction, boolean)

set

public void set(Font font,
                boolean global)
         throws ConfigurationException
Description copied from interface: Context
Setter for the font in the current typesetting context.

Specified by:
set in interface Context
Parameters:
font - the new font
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
ConfigurationException - in case of an error in the configuration.
See Also:
Context.set( de.dante.extex.interpreter.type.font.Font, boolean)

set

public void set(Language language,
                boolean global)
         throws ConfigurationException
Description copied from interface: Context
Setter for the language in the current typesetting context.

Specified by:
set in interface Context
Parameters:
language - the new language
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
ConfigurationException - in case of an error in the configuration.
See Also:
Context.set( de.dante.extex.language.Language, boolean)

set

public void set(java.lang.Object extension,
                java.lang.Object key,
                java.lang.Object value,
                boolean global)
Description copied from interface: Context
Setter for a value from an extended section of the context.

Specified by:
set in interface Context
Parameters:
extension - the name of the extension
key - the key for the value
value - the value to store
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.set( java.lang.Object, java.lang.Object, java.lang.Object, boolean)

set

public void set(TypesettingContext context,
                boolean global)
Setter for the typesetting context in the specified groups.

Specified by:
set in interface Context
Parameters:
context - the new context to use
global - if true then the new value is set in all groups, otherwise only in the current group.
See Also:
Context.getTypesettingContext()

setAfterassignment

public void setAfterassignment(Token token)
Description copied from interface: Context
Setter for the afterassignment token.

Specified by:
setAfterassignment in interface Context
Parameters:
token - the afterassignment token.
See Also:
Context.setAfterassignment( de.dante.extex.scanner.type.token.Token)

setBox

public void setBox(java.lang.String name,
                   Box value,
                   boolean global)
Description copied from interface: Context
Setter for the box register in the current group. Count registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
setBox in interface Context
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setBox(java.lang.String, de.dante.extex.interpreter.type.box.Box, boolean)

setCatcode

public void setCatcode(UnicodeChar c,
                       Catcode cc,
                       boolean global)
Description copied from interface: Context
Setter for the catcode of a character in the specified groups.

Specified by:
setCatcode in interface Context
Parameters:
c - the character to assign a catcode for
cc - the catcode of the character
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setCatcode( de.dante.util.UnicodeChar, de.dante.extex.scanner.type.Catcode, boolean)

setCode

public void setCode(CodeToken t,
                    Code code,
                    boolean global)
             throws InterpreterException
Description copied from interface: ContextCode
Setter for the code assigned to a Token. The Token has to be either a ActiveCharacterToken or a ControlSequenceToken.

Specified by:
setCode in interface ContextCode
Parameters:
t - the Token to set the code for
code - the code for the token
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case of an error
See Also:
ContextCode.setCode( de.dante.extex.scanner.type.token.CodeToken, de.dante.extex.interpreter.type.Code, boolean)

setCount

public void setCount(java.lang.String name,
                     long value,
                     boolean global)
              throws InterpreterException
Description copied from interface: ContextCount
Setter for the count register in all requested groups. Count registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
setCount in interface ContextCount
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case if an exception in a registered observer
See Also:
ContextCount.setCount( java.lang.String, long, boolean)

setCountOption

public void setCountOption(java.lang.String name,
                           long value)
                    throws GeneralException
Description copied from interface: TypesetterOptions
Setter for a count register.

Specified by:
setCountOption in interface TypesetterOptions
Parameters:
name - the name of the register
value - the value
Throws:
GeneralException - in case of an error
See Also:
TypesetterOptions.setCountOption( java.lang.String, long)

setDelcode

public void setDelcode(UnicodeChar c,
                       MathDelimiter delimiter,
                       boolean global)
Description copied from interface: Context
Setter for the delimiter code mapping.

Specified by:
setDelcode in interface Context
Parameters:
c - the character to which the delcode is assigned
delimiter - the delimiter code
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
de.dante.extex.interpreter.context.Context#setDelcode( de.dante.util.UnicodeChar, de.dante.extex.typesetter.type.math.MathDelimiter, boolean)

setDimen

public void setDimen(java.lang.String name,
                     Dimen value,
                     boolean global)
              throws InterpreterException
Description copied from interface: ContextDimen
Setter for the Dimen register in all requested groups. Dimen registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
setDimen in interface ContextDimen
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case of problems in an observer
See Also:
ContextDimen.setDimen( java.lang.String, de.dante.extex.interpreter.type.dimen.Dimen, boolean)

setDimen

public void setDimen(java.lang.String name,
                     long value,
                     boolean global)
              throws InterpreterException
Description copied from interface: ContextDimen
Setter for the Dimen register in all requested groups. Dimen registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
setDimen in interface ContextDimen
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case of problems in an observer
See Also:
ContextDimen.setDimen( java.lang.String, long, boolean)

setFont

public void setFont(java.lang.String name,
                    Font font,
                    boolean global)
Description copied from interface: ContextFont
Setter for font registers.

Specified by:
setFont in interface ContextFont
Parameters:
name - the name or the number of the register
font - the new Font value
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextFont.setFont( java.lang.String, de.dante.extex.interpreter.type.font.Font, boolean)

setFontFactory

public void setFontFactory(FontFactory factory)
Description copied from interface: ContextFont
Setter for the font factory.

Specified by:
setFontFactory in interface ContextFont
Parameters:
factory - the font factory to set.
See Also:
ContextFont.setFontFactory( de.dante.extex.font.FontFactory)

setGlue

public void setGlue(java.lang.String name,
                    Glue value,
                    boolean global)
             throws InterpreterException
Description copied from interface: Context
Setter for a glue register.

Specified by:
setGlue in interface Context
Parameters:
name - the name of the glue register
value - the glue value to set
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case of an error
See Also:
Context.setGlue(java.lang.String, de.dante.extex.interpreter.type.glue.Glue, boolean)

setId

public void setId(java.lang.String theId)
Setter for the id string. The id string is the classification of the original source like given in the fmt file.

Specified by:
setId in interface Context
Parameters:
theId - the id string
See Also:
Context.setId(java.lang.String)

setInFile

public void setInFile(java.lang.String name,
                      InFile file,
                      boolean global)
Description copied from interface: ContextFile
Setter for the InFile register in all requested groups. InFile registers are named, either with a number or an arbitrary string. The numbered registers where limited to 16 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
setInFile in interface ContextFile
Parameters:
name - the name or the number of the file register
file - the input file descriptor
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextFile.setInFile( java.lang.String, de.dante.extex.interpreter.type.file.InFile, boolean)

setInteraction

public void setInteraction(Interaction interaction)
                    throws InterpreterException
Description copied from interface: ContextInteraction
Setter for the interaction in all requested groups. The interaction determines how verbose the actions are reported and how the interaction with the user is performed in case of an error.

Specified by:
setInteraction in interface ContextInteraction
Parameters:
interaction - the new value of the interaction
Throws:
InterpreterException - in case of an error
See Also:
ContextInteraction.setInteraction( de.dante.extex.interpreter.interaction.Interaction)

setLanguageManager

public void setLanguageManager(LanguageManager manager)
                        throws ConfigurationException
Description copied from interface: Context
Setter for the language manager.

Specified by:
setLanguageManager in interface Context
Parameters:
manager - the language manager
Throws:
ConfigurationException - in case of an configuration error
See Also:
LanguageManagerCarrier.setLanguageManager( de.dante.extex.language.LanguageManager)

setLccode

public void setLccode(UnicodeChar uc,
                      UnicodeChar lc,
                      boolean global)
Description copied from interface: Context
Declare the translation from an upper case character to a lower case character.

Specified by:
setLccode in interface Context
Parameters:
uc - upper case character
lc - lower case equivalent
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setLccode( de.dante.util.UnicodeChar, de.dante.util.UnicodeChar, boolean)

setMagnification

public void setMagnification(long mag,
                             boolean lock)
                      throws HelpingException
Setter for the magnification. The magnification is a global value which can be assigned at most once. It contains the magnification factor in permille. The default value is 1000. It can only take positive numbers as values. The maximal value is taken from the configuration option maximalMaginification. The default value for the maximal magnification is 32768.

Specified by:
setMagnification in interface Context
Parameters:
mag - the new magnification factor
lock - lock the new value. Thus it can not be alterd afterwards.
Throws:
HelpingException - in case that the magnification factor is not in the allowed range or that the magnification has been set to a different value earlier.
See Also:
Context.setMagnification(long, boolean)

setMark

public void setMark(java.lang.Object name,
                    Tokens mark)
Description copied from interface: ContextMark
Setter for a mark. The information for first mark and top mark are updated if necessary.

Specified by:
setMark in interface ContextMark
Parameters:
name - the name of the mark
mark - the vale of the mark
See Also:
ContextMark.setMark( java.lang.Object, de.dante.extex.interpreter.type.tokens.Tokens)

setMathcode

public void setMathcode(UnicodeChar c,
                        MathCode code,
                        boolean global)
Description copied from interface: Context
Setter for the math code of a character

Specified by:
setMathcode in interface Context
Parameters:
c - the character index
code - the new math code
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setMathcode( de.dante.util.UnicodeChar, MathCode, boolean)

setMuskip

public void setMuskip(java.lang.String name,
                      Muskip value,
                      boolean global)
Description copied from interface: Context
Setter for a muskip register.

Specified by:
setMuskip in interface Context
Parameters:
name - the name or the number of the register
value - the new value
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setMuskip( java.lang.String, de.dante.extex.interpreter.type.muskip.Muskip, boolean)

setNamespace

public void setNamespace(java.lang.String namespace,
                         boolean global)
Description copied from interface: Context
Setter for the name space.

Specified by:
setNamespace in interface Context
Parameters:
namespace - the new name space
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setNamespace( java.lang.String, boolean)

setOutFile

public void setOutFile(java.lang.String name,
                       OutFile file,
                       boolean global)
Description copied from interface: ContextFile
Setter for a outfile descriptor.

Specified by:
setOutFile in interface ContextFile
Parameters:
name - the name or the number of the file register
file - the descriptor of the output file
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextFile.setOutFile( java.lang.String, de.dante.extex.interpreter.type.file.OutFile, boolean)

setParshape

public void setParshape(ParagraphShape shape)
Description copied from interface: TypesetterOptions
Setter for the paragraph shape.

Specified by:
setParshape in interface Context
Parameters:
shape - the new paragraph shape
See Also:
Context.setParshape( de.dante.extex.typesetter.paragraphBuilder.ParagraphShape)

setSfcode

public void setSfcode(UnicodeChar c,
                      Count code,
                      boolean global)
Description copied from interface: Context
Setter for the space factor code in the specified groups. Any character has an associated space factor. This value can be set with the current method.

Specified by:
setSfcode in interface Context
Parameters:
c - the Unicode character to assign the sfcode to
code - the new sfcode
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setSfcode( de.dante.util.UnicodeChar, de.dante.extex.interpreter.type.count.Count, boolean)

setSplitMark

public void setSplitMark(java.lang.Object name,
                         Tokens mark)
Description copied from interface: ContextMark
Setter for a split mark. The information for first mark and top mark are updated is necessary.

Specified by:
setSplitMark in interface ContextMark
Parameters:
name - the name of the mark
mark - the vale of the mark
See Also:
ContextMark.setSplitMark( java.lang.Object, de.dante.extex.interpreter.type.tokens.Tokens)

setStandardTokenStream

public void setStandardTokenStream(TokenStream standardTokenStream)
Setter for standardTokenStream.

Specified by:
setStandardTokenStream in interface Context
Parameters:
standardTokenStream - the standardTokenStream to set.
See Also:
Context.getStandardTokenStream()

setTokenFactory

public void setTokenFactory(TokenFactory factory)
Setter for the token factory

Specified by:
setTokenFactory in interface Context
Parameters:
factory - the new value of the factory
See Also:
Context.setTokenFactory( de.dante.extex.scanner.type.token.TokenFactory)

setToks

public void setToks(java.lang.String name,
                    Tokens toks,
                    boolean global)
             throws InterpreterException
Description copied from interface: ContextTokens
Setter for the Tokens register in the specified groups. Tokens registers are named, either with a number or an arbitrary string. The numbered registers where limited to 256 in TeX. This restriction does no longer hold for ExTeX.

Specified by:
setToks in interface ContextTokens
Parameters:
name - the name or the number of the register
toks - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case of a problem in an observer
See Also:
ContextTokens.setToks(java.lang.String, de.dante.extex.interpreter.type.tokens.Tokens, boolean)

setUccode

public void setUccode(UnicodeChar lc,
                      UnicodeChar uc,
                      boolean global)
Description copied from interface: Context
Declare the translation from a lower case character to an upper case character.

Specified by:
setUccode in interface Context
Parameters:
lc - lower case character
uc - uppercase equivalent
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
Context.setUccode( de.dante.util.UnicodeChar, de.dante.util.UnicodeChar, boolean)

startMarks

public void startMarks()
Description copied from interface: ContextMark
This method indicated that a new page is started. The values of first mark, bottom mark, and top mark should be updated properly.

Specified by:
startMarks in interface ContextMark
See Also:
ContextMark.startMarks()

unitIterator

public java.util.Iterator unitIterator()
Description copied from interface: Context
Get an iterator to enumerate all unit infos.

Specified by:
unitIterator in interface Context
Returns:
the iterator for unit infos
See Also:
Context.unitIterator()

unregisterCodeChangeObserver

public void unregisterCodeChangeObserver(Token name,
                                         CodeObserver observer)
Description copied from interface: CodeObservable
Remove a registered observer for code change events. Code change events are triggered when the assignment of a macro or active character changes. In this case the appropriate method in the observer is invoked.

Specified by:
unregisterCodeChangeObserver in interface CodeObservable
Parameters:
name - the token to be observed. This should be a macro or active character token.
observer - the observer to receive the events
See Also:
CodeObservable.unregisterCodeChangeObserver( de.dante.extex.scanner.type.token.Token, de.dante.extex.interpreter.context.observer.code.CodeObserver)

unregisterConditionalObserver

public void unregisterConditionalObserver(ConditionalObserver observer)
Description copied from interface: ConditionalObservable
Remove a registered observer for conditional events. Conditional events are triggered when a conditional is started or ended.

Specified by:
unregisterConditionalObserver in interface ConditionalObservable
Parameters:
observer - the observer to receive the events
See Also:
ConditionalObservable.unregisterConditionalObserver( de.dante.extex.interpreter.context.observer.conditional.ConditionalObserver)

unregisterCountObserver

public void unregisterCountObserver(java.lang.String name,
                                    CountObserver observer)
Description copied from interface: CountObservable
Remove a registered observer for count change events. Count change events are triggered when a value is assigned to a count register. In this case the appropriate method in the observer is invoked.

A single count register can be observed by giving a name of the count register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.

If this name is null then the observer for all registers is removed. Note that the observers for named registers are not effected. They have to be unregistered individually.

Specified by:
unregisterCountObserver in interface CountObservable
Parameters:
name - the name or the number of the register
observer - the observer to receive the events
See Also:
CountObservable.unregisterCountObserver( java.lang.String, de.dante.extex.interpreter.context.observer.count.CountObserver)

unregisterDimenObserver

public void unregisterDimenObserver(java.lang.String name,
                                    DimenObserver observer)
Description copied from interface: DimenObservable
Remove a registered observer for dimen change events. Count change events are triggered when a value is assigned to a dimen register. In this case the appropriate method in the observer is invoked.

A single dimen register can be observed by giving a name of the dimen register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.

If this name is null then the observer for all registers is removed. Note that the observers for named registers are not effected. They have to be unregistered individually.

Specified by:
unregisterDimenObserver in interface DimenObservable
Parameters:
name - the name or the number of the register
observer - the observer to receive the events
See Also:
DimenObservable.unregisterDimenObserver( java.lang.String, de.dante.extex.interpreter.context.observer.dimen.DimenObserver)

unregisterGlueObserver

public void unregisterGlueObserver(java.lang.String name,
                                   GlueObserver observer)
Description copied from interface: GlueObservable
Remove a registered observer for glue change events. Count change events are triggered when a value is assigned to a glue register. In this case the appropriate method in the observer is invoked.

A single glue register can be observed by giving a name of the glue register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.

If this name is null then the observer for all registers is removed. Note that the observers for named registers are not effected. They have to be unregistered individually.

Specified by:
unregisterGlueObserver in interface GlueObservable
Parameters:
name - the name or the number of the register
observer - the observer to receive the events
See Also:
GlueObservable.unregisterGlueObserver( java.lang.String, de.dante.extex.interpreter.context.observer.glue.GlueObserver)

unregisterGroupObserver

public void unregisterGroupObserver(GroupObserver observer)
Description copied from interface: GroupObservable
Remove a registered observer for group change events. Group change events are triggered when a group is opened or closed. In this case the appropriate method in the observer is invoked.

Specified by:
unregisterGroupObserver in interface GroupObservable
Parameters:
observer - the observer to receive the events
See Also:
GroupObservable.unregisterGroupObserver( de.dante.extex.interpreter.context.observer.group.GroupObserver)

unregisterInteractionObserver

public void unregisterInteractionObserver(InteractionObserver observer)
Description copied from interface: InteractionObservable
Remove a registered observer for interaction mode change events. Interaction mode change events are triggered when a new value is assigned to the interaction mode. In this case the appropriate method in the observer is invoked.

Specified by:
unregisterInteractionObserver in interface InteractionObservable
Parameters:
observer - the observer to receive the events
See Also:
InteractionObservable.unregisterInteractionObserver( de.dante.extex.interpreter.context.observer.interaction.InteractionObserver)

unregisterLoadObserver

public void unregisterLoadObserver(LoadedObserver observer)
Description copied from interface: LoadedObservable
Remove a registered observer for load events. Code change events are triggered when the context is loaded.

Specified by:
unregisterLoadObserver in interface LoadedObservable
Parameters:
observer - the observer to receive the events
See Also:
LoadedObservable.unregisterLoadObserver( de.dante.extex.interpreter.context.observer.load.LoadedObserver)

unregisterTokensChangeObserver

public void unregisterTokensChangeObserver(java.lang.String name,
                                           TokensObserver observer)
Description copied from interface: TokensObservable
Remove a registered observer for toks change events. Tokens change events are triggered when an assignment to a tokens register is performed. In this case the appropriate method in the observer is invoked.

Specified by:
unregisterTokensChangeObserver in interface TokensObservable
Parameters:
name - the token to be observed. This should be a macro or active character token.
observer - the observer to receive the events
See Also:
TokensObservable.unregisterTokensChangeObserver( java.lang.String, de.dante.extex.interpreter.context.observer.tokens.TokensObserver)