de.dante.extex.interpreter.primitives.hyphen
Class AbstractHyphenationCode

java.lang.Object
  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.primitives.hyphen.AbstractHyphenationCode
All Implemented Interfaces:
Code, Localizable, java.io.Serializable
Direct Known Subclasses:
HyphenActive, HyphenationPrimitive, LeftHyphenmin, Patterns, RightHyphenmin

public abstract class AbstractHyphenationCode
extends AbstractCode

This is the abstract base class for all hyphenation related primitives. It provides common methods.

Determining the Current Language

In TeX the language is determined by the count register named language. This has the disadvantage that the language is named anonymously by an integer.

This base class implements an extension to this scheme. First the toks register lang is sought. If this register is defined and not empty then the contents is used as name of the current language. Otherwise the count register language is used for this purpose.

The Tokens Register \lang

The tokens register \lang is the primary source of information to determine the current language. If this register is not defined or has the empty value then the count register \language is used instead.

Syntax

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

Examples

    \lang={de}  

The Count Register \language

The count register \language is the secondary source of information to determine the current language. If this tokens register \lang is not defined or has the empty value then this is used instead.

Syntax

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

Examples

    \language=1  

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

Field Summary
 
Fields inherited from class de.dante.extex.interpreter.type.AbstractCode
serialVersionUID
 
Constructor Summary
AbstractHyphenationCode(java.lang.String name)
          Creates a new object.
 
Method Summary
protected  Language getHyphenationTable(Context context)
          Getter for the current hyphenation table.
 
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, execute, 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
 

Constructor Detail

AbstractHyphenationCode

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

Parameters:
name - the name for debugging
Method Detail

getHyphenationTable

protected Language getHyphenationTable(Context context)
                                throws InterpreterException
Getter for the current hyphenation table.

Parameters:
context - the interpreter context
Returns:
the current hyphenation table
Throws:
InterpreterException - in case of an error