de.dante.extex.typesetter.type.noad
Class StyleNoad

java.lang.Object
  extended byde.dante.extex.typesetter.type.noad.StyleNoad
All Implemented Interfaces:
Noad

public final class StyleNoad
extends java.lang.Object
implements Noad

This Noad indicates a change in the style to be used for the further processing.

TeX defined a set of variations to a style. They are defined in the following table:

StyleNo.CrampedSub SupNumDenom
display style 015423
cramped display style 115533
text style 235445
cramped text style 335555
script style 457667
cramped script style 557777
script script style 677667
cramped script script style 777777

This mapping and the numbers therein are not visible directly. Instead symbolic constants and methods are provided.

The Font Parameter \textfont

The font parameter \textfont contains font to be used in math mode for text style typesetting.

Three families are used for math typesetting. The family 0 contains the characters for text. The family 1 contains the characters for the symbols. The family 2 contains the extended characters.

Syntax

The formal description of this primitive is the following:
    ⟨textfont⟩
       → \textfont ⟨register name⟩ ⟨equals⟩ ⟨font⟩  

Examples

    \font\fnt=cmsy12
    \textfont0 =\fnt 

The Font Parameter \scriptfont

The font parameter \scriptfont contains font to be used in math mode for script style typesetting.

Three families are used for math typesetting. The family 0 contains the characters for text. The family 1 contains the characters for the symbols. The family 2 contains the extended characters.

Syntax

The formal description of this primitive is the following:
    ⟨scriptfont⟩
       → \scriptfont ⟨register name⟩ ⟨equals⟩ ⟨font⟩  

Examples

    \font\fnt=cmsy12
    \scriptfont0 =\fnt 

The Font Parameter \scriptscriptfont

The font parameter \scriptscriptfont contains font to be used in math mode for script-script style typesetting.

Three families are used for math typesetting. The family 0 contains the characters for text. The family 1 contains the characters for the symbols. The family 2 contains the extended characters.

Syntax

The formal description of this primitive is the following:
    ⟨scriptscriptfont⟩
       → \scriptscriptfont ⟨register name⟩ ⟨equals⟩ ⟨font⟩  

Examples

    \font\fnt=cmsy12
    \scriptscriptfont0 =\fnt 

Version:
$Revision: 1.26 $
Author:
Gerd Neugebauer

Field Summary
static StyleNoad DISPLAYSTYLE
          The constant DISPLAYSTYLE contains the value for the display style.
static StyleNoad SCRIPTSCRIPTSTYLE
          The constant SCRIPTSCRIPTSTYLE contains the value for the scriptscript style.
static StyleNoad SCRIPTSTYLE
          The constant SCRIPTSTYLE contains the value for the script style.
static StyleNoad TEXTSTYLE
          The constant TEXTSTYLE contains the value for the text style.
 
Method Summary
 StyleNoad cramped()
          Get the cramped style for this one.
 StyleNoad denom()
          Get the denominator style for this one.
 java.lang.String getFontName()
          Getter for font name.
 MathSpacing getSpacingClass()
          Getter for spacing class.
 java.lang.String getStyleName()
          Getter for style.
 Noad getSubscript()
          Getter for the subscript.
 Noad getSuperscript()
          Getter for the superscript.
 boolean isCramped()
          Test whether the current style is a cramped style.
 boolean less(StyleNoad other)
          Ordering on the styles.
 StyleNoad num()
          Get the numerator style for this one.
protected  java.lang.Object readResolve()
          Return the singleton constant object after the serialized instance has been read back in.
 void setSubscript(Noad subscript)
          Setter for the subscript.
 void setSuperscript(Noad superscript)
          Setter for the superscript.
 StyleNoad sub()
          Get the sub style for this one.
 StyleNoad sup()
          Get the sup style for this one.
 java.lang.String toString()
           
 void toString(java.lang.StringBuffer sb)
          Produce a printable representation of the noad in a StringBuffer.
 void toString(java.lang.StringBuffer sb, int depth)
          Produce a printable representation to a certain depth of the noad.
 void typeset(Noad previousNoad, NoadList noads, int index, NodeList list, MathContext mathContext, java.util.logging.Logger logger)
          Translate a Noad into a NodeList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DISPLAYSTYLE

public static final StyleNoad DISPLAYSTYLE
The constant DISPLAYSTYLE contains the value for the display style.


SCRIPTSCRIPTSTYLE

public static final StyleNoad SCRIPTSCRIPTSTYLE
The constant SCRIPTSCRIPTSTYLE contains the value for the scriptscript style.


SCRIPTSTYLE

public static final StyleNoad SCRIPTSTYLE
The constant SCRIPTSTYLE contains the value for the script style.


TEXTSTYLE

public static final StyleNoad TEXTSTYLE
The constant TEXTSTYLE contains the value for the text style.

Method Detail

cramped

public StyleNoad cramped()
Get the cramped style for this one.

Returns:
the cramped style
See Also:
"TTP [702]"

denom

public StyleNoad denom()
Get the denominator style for this one.

Returns:
the denominator style
See Also:
"TTP [702]"

getFontName

public java.lang.String getFontName()
Getter for font name.

Returns:
the font name

getSpacingClass

public MathSpacing getSpacingClass()
Description copied from interface: Noad
Getter for spacing class.

Specified by:
getSpacingClass in interface Noad
Returns:
the spacing class
See Also:
Noad.getSpacingClass()

getStyleName

public java.lang.String getStyleName()
Getter for style.

Returns:
the style

getSubscript

public Noad getSubscript()
Description copied from interface: Noad
Getter for the subscript.

Specified by:
getSubscript in interface Noad
Returns:
the subscript.
See Also:
Noad.getSubscript()

getSuperscript

public Noad getSuperscript()
Description copied from interface: Noad
Getter for the superscript.

Specified by:
getSuperscript in interface Noad
Returns:
the superscript.
See Also:
Noad.getSuperscript()

isCramped

public boolean isCramped()
Test whether the current style is a cramped style.

Returns:
true iff the current style is a cramped style

less

public boolean less(StyleNoad other)
Ordering on the styles.

Parameters:
other - the style to compare to
Returns:
true iff the current style is less than the other according to the list in the description of StyleNoad.

num

public StyleNoad num()
Get the numerator style for this one.

Returns:
the numerator style
See Also:
"TTP [702]"

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Return the singleton constant object after the serialized instance has been read back in. This is one of the magic methods of Java which is invoked when a serialized object is deserialized.

Returns:
the one and only instance of this object
Throws:
java.io.ObjectStreamException - never

setSubscript

public void setSubscript(Noad subscript)
Description copied from interface: Noad
Setter for the subscript.

Specified by:
setSubscript in interface Noad
Parameters:
subscript - the subscript to set.
See Also:
Noad.setSubscript( de.dante.extex.typesetter.type.noad.Noad)

setSuperscript

public void setSuperscript(Noad superscript)
Description copied from interface: Noad
Setter for the superscript.

Specified by:
setSuperscript in interface Noad
Parameters:
superscript - the superscript to set.
See Also:
Noad.setSuperscript( de.dante.extex.typesetter.type.noad.Noad)

sub

public StyleNoad sub()
Get the sub style for this one.

Returns:
the sub style
See Also:
"TTP [702]"

sup

public StyleNoad sup()
Get the sup style for this one.

Returns:
the sup style
See Also:
"TTP [702]"

toString

public java.lang.String toString()
See Also:
Object.toString()

toString

public void toString(java.lang.StringBuffer sb)
Produce a printable representation of the noad in a StringBuffer.

Specified by:
toString in interface Noad
Parameters:
sb - the string buffer
See Also:
"TTP [694]", Noad.toString( java.lang.StringBuffer)

toString

public void toString(java.lang.StringBuffer sb,
                     int depth)
Description copied from interface: Noad
Produce a printable representation to a certain depth of the noad.

Specified by:
toString in interface Noad
Parameters:
sb - the string buffer
depth - the depth to which the full information should be given
See Also:
Noad.toString( java.lang.StringBuffer, int)

typeset

public void typeset(Noad previousNoad,
                    NoadList noads,
                    int index,
                    NodeList list,
                    MathContext mathContext,
                    java.util.logging.Logger logger)
             throws TypesetterException,
                    ConfigurationException
Description copied from interface: Noad
Translate a Noad into a NodeList.

Specified by:
typeset in interface Noad
Parameters:
previousNoad - the previous noad
noads - the list of noads currently processed
index - the index of the current node in the list
list - the list to add the nodes to. This list contains the Nodes previously typeset. Thus it can be used to look back
mathContext - the context to consider
logger - the logger for debugging and tracing information
Throws:
ConfigurationException - in case of a configuration problem
TypesetterException - in case of a problem
See Also:
Noad.typeset( de.dante.extex.typesetter.type.noad.Noad, de.dante.extex.typesetter.type.noad.NoadList, int, de.dante.extex.typesetter.type.NodeList, de.dante.extex.typesetter.type.noad.util.MathContext, java.util.logging.Logger)