|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.typesetter.listMaker.AbstractListMaker
org.extex.typesetter.listMaker.HorizontalListMaker
org.extex.typesetter.listMaker.math.MathListMaker
public class MathListMaker
This is the list maker for the inline math formulae.
The dimen parameter \mathsurround is used to put some spacing
around mathematical formulae. The value at the end of the formula is used
before and after the formula. This additional space will be discarded at the
end of a line.
The tokens parameter \everymath contains a list of tokens which is
inserted at the beginning of inline math. Those tokens take effect after the
math mode has been entered but before any tokens given explicitly.
The tokens parameter \everymathend contains a list of tokens which
is inserted at the end of inline math. Those tokens take effect just before
the math mode is ended but after any tokens given explicitly.
The Dimen Parameter \mathsurround
The Tokens Parameter \everymath
Syntax
The formal description of this primitive is the following:
〈everymath〉
→
\everymath
〈equals〉 〈tokens〉
Examples
\everymath={\,}
The Tokens Parameter \everymathend
Syntax
The formal description of this primitive is the following:
〈everymathend〉
→
\everymathend
〈equals〉 〈tokens〉
Examples
\everymathend={\,}
| Constructor Summary | |
|---|---|
MathListMaker(ListManager manager,
Locator locator)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
add(FixedDimen g)
Add a glue node to the list. |
void |
add(MathCode mc,
TypesettingContext tc)
Add a mathematical glyph. |
void |
add(MathDelimiter delimiter,
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. |
void |
add(Node node)
Add an arbitrary node to the internal list of nodes gathered so far. |
void |
addSpace(TypesettingContext typesettingContext,
FixedCount spacefactor)
Spaces are ignored in math mode. |
NodeList |
complete(TypesetterOptions context)
Close the node list. |
void |
cr(Context context,
TypesettingContext tc,
UnicodeChar uc)
Process a carriage return. |
void |
enableLogging(java.util.logging.Logger log)
Setter for the logger. |
protected Noad |
getInsertionPoint()
Getter for the contents of the insertion point. |
Noad |
getLastNoad()
Get access to the previous noad. |
Node |
getLastNode()
Access the last node on the list. |
java.util.logging.Logger |
getLogger()
Getter for logger. |
Mode |
getMode()
Getter for the current mode. |
protected Noad |
getNoads()
Getter for Noads. |
protected static boolean |
insufficientExtensionFonts(TypesetterOptions options)
This method checks that extension fonts have sufficient font dimen values set. |
protected static boolean |
insufficientSymbolFonts(TypesetterOptions options)
This method checks that symbol fonts have sufficient font dimen values set. |
protected boolean |
isClosing()
Getter for closing. |
void |
left(MathDelimiter delimiter)
Open the group for a \left-\right construction. |
void |
leftBrace()
Notification method to deal the case that a left brace has been encountered. |
boolean |
letter(UnicodeChar symbol,
TypesettingContext tc,
Context context,
TokenSource source,
Locator locator)
Add a letter to the current list or treat it in some other appropriate way. |
void |
mathShift(Context context,
TokenSource source,
Token t)
Treat a math shift character. Usually this leads to entering or leaving math mode – maybe after inspection of a following token. |
void |
middle(MathDelimiter delimiter)
Middle in the group for a \left-\right construction. |
void |
par()
Emitting a new paragraph is not supported in math mode. |
void |
removeLastNode()
Removes the last node from the list. |
void |
right(MathDelimiter delimiter)
Close the group for a \left-\right construction. |
void |
rightBrace()
Notification method to deal the case that a right brace has been encountered. |
Noad |
scanNoad(Flags flags,
Context context,
TokenSource source,
Typesetter typesetter,
Token primitive,
GroupType groupType)
Process the input until a Noad is completed. |
protected void |
setClosing(boolean closing)
Setter for closing. |
protected void |
setInsertionPoint(MathList insertionPoint)
Setter for insertionPoint. |
void |
showlist(java.lang.StringBuffer sb,
long depth,
long breadth)
Print the status for \showlists. |
void |
subscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token token)
Treat a subscript mark. This might be meaningful in math mode only. |
void |
superscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token token)
Treat a superscript mark. This might be meaningful in math mode only. |
void |
switchToFraction(MathDelimiter leftDelimiter,
MathDelimiter rightDelimiter,
FixedDimen ruleWidth,
TypesettingContext tc)
This method instructs the implementing class to use a fraction construction. |
| Methods inherited from class org.extex.typesetter.listMaker.HorizontalListMaker |
|---|
add, addAndAdjust, afterParagraph, getNodes, getSpacefactor, setNodes, setSpacefactor, toString |
| Methods inherited from class org.extex.typesetter.listMaker.AbstractListMaker |
|---|
getLocalizer, getLocator, getManager, getMyLocalizer, getPrevDepth, setPrevDepth, tab |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.extex.typesetter.ListMaker |
|---|
add, addAndAdjust, afterParagraph, getLocator, getPrevDepth, getSpacefactor, setPrevDepth, setSpacefactor |
| Constructor Detail |
|---|
public MathListMaker(ListManager manager,
Locator locator)
manager - the manager to ask for global changeslocator - the locator| Method Detail |
|---|
protected static boolean insufficientExtensionFonts(TypesetterOptions options)
options - the options
true iff the needed font dimens are not presentprotected static boolean insufficientSymbolFonts(TypesetterOptions options)
options - the options
true iff the symbol fonts have the needed font
dimens
public void add(FixedDimen g)
throws TypesetterException
g - the glue to add
TypesetterException - in case of an errorListMaker.add( org.extex.core.glue.FixedGlue)
public void add(MathCode mc,
TypesettingContext tc)
throws TypesetterException
add in interface NoadConsumermc - the math codetc - the typesetting context
TypesetterException - in case of an errorNoadConsumer.add(
org.extex.typesetter.type.math.MathCode,
org.extex.typesetter.tc.TypesettingContext)
public void add(MathDelimiter delimiter,
TypesettingContext tc)
throws TypesetterException
add in interface NoadConsumerdelimiter - the delimitertc - the typesetting context
TypesetterException - in case of an errorNoadConsumer.add(
org.extex.typesetter.type.math.MathDelimiter,
org.extex.typesetter.tc.TypesettingContext)
public void add(Mudimen skip)
throws TypesetterException
add in interface NoadConsumerskip - the length to add
TypesetterException - in case of an errorNoadConsumer.add(
org.extex.core.muskip.Mudimen)
public void add(Muskip glue)
throws TypesetterException
add in interface NoadConsumerglue - the glue to add
TypesetterException - in case of an errorNoadConsumer.add(
org.extex.core.muskip.Muskip)
public void add(Noad noad)
throws TypesetterException
add in interface NoadConsumernoad - the noad to add
TypesetterException - in case of an errorNoadConsumer.add(
org.extex.typesetter.type.noad.Noad)
public void add(Node node)
throws TypesetterException,
ConfigurationException
add in interface ListMakeradd in class HorizontalListMakernode - the node to add
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.add( org.extex.typesetter.type.Node)
public void addSpace(TypesettingContext typesettingContext,
FixedCount spacefactor)
throws TypesetterException,
ConfigurationException
addSpace in interface ListMakeraddSpace in class HorizontalListMakertypesettingContext - the typesetting context for the spacespacefactor - the space factor to use for this space or
null to indicate that the default space factor
should be used.
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.addSpace(
org.extex.typesetter.tc.TypesettingContext, FixedCount)
public NodeList complete(TypesetterOptions context)
throws TypesetterException,
ConfigurationException
complete in interface ListMakercomplete in class HorizontalListMakercontext - the fragment of the context accessible for the typesetter
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.complete(TypesetterOptions),
"
public void cr(Context context,
TypesettingContext tc,
UnicodeChar uc)
throws TypesetterException
cr in interface TokenDelegateListMakercr in class HorizontalListMakercontext - the interpreter contexttc - the typesetting contextuc - the character
TypesetterException - in case of an errorHorizontalListMaker.cr(
org.extex.interpreter.context.Context,
org.extex.typesetter.tc.TypesettingContext,
org.extex.core.UnicodeChar)public void enableLogging(java.util.logging.Logger log)
enableLogging in interface LogEnabledlog - the logger to useLogEnabled.enableLogging(
java.util.logging.Logger)protected Noad getInsertionPoint()
null is returned. If it
contains only one element then this element is returned. Otherwise the
complete list is returned.
public Noad getLastNoad()
throws TypesetterException
getLastNoad in interface NoadConsumernull if there is none
TypesetterException - in case of an errorNoadConsumer.getLastNoad()public Node getLastNode()
getLastNode in interface ListMakergetLastNode in class HorizontalListMakernull if the
list is emptyListMaker.getLastNode()public java.util.logging.Logger getLogger()
public Mode getMode()
getMode in interface ListMakergetMode in class HorizontalListMakerMode.ListMaker.getMode()protected Noad getNoads()
protected boolean isClosing()
public void left(MathDelimiter delimiter)
throws TypesetterException
left in interface NoadConsumerdelimiter - the delimiter to typeset on the left side
TypesetterException - in case of an errorNoadConsumer.left(
org.extex.typesetter.type.math.MathDelimiter)public void leftBrace()
leftBrace in interface ListMakerleftBrace in class AbstractListMakerListMaker.leftBrace()
public boolean letter(UnicodeChar symbol,
TypesettingContext tc,
Context context,
TokenSource source,
Locator locator)
throws TypesetterException
letter in interface TokenDelegateListMakerletter in class HorizontalListMakersymbol - the charactertc - the typesetting contextcontext - the interpreter contextsource - the source for new tokenslocator - the locator
true iff the character has been discarded because
it is not defined in the current font.
TypesetterException - in case of an errorHorizontalListMaker.letter(
org.extex.core.UnicodeChar,
org.extex.typesetter.tc.TypesettingContext,
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.core.Locator)
public void mathShift(Context context,
TokenSource source,
Token t)
throws TypesetterException,
ConfigurationException,
HelpingException
mathShift in interface TokenDelegateListMakermathShift in class AbstractListMakercontext - the interpreter contextsource - the source for new tokenst - the actual math shift character token
TypesetterException - in case of an error
ConfigurationException - in case of a configuration error
HelpingException - in case of an errorAbstractListMaker.mathShift(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource,
org.extex.scanner.type.token.Token)
public void middle(MathDelimiter delimiter)
throws TypesetterException
middle in interface NoadConsumerdelimiter - the delimiter to typeset here
TypesetterException - in case of an errorNoadConsumer.middle(
org.extex.typesetter.type.math.MathDelimiter)
public void par()
throws TypesetterException,
ConfigurationException
par in interface ListMakerpar in class HorizontalListMakerTypesetterException - in case of an error
ConfigurationException - in case of an configuration errorListMaker.par(),
"public void removeLastNode()
removeLastNode in interface ListMakerremoveLastNode in class HorizontalListMakerListMaker.removeLastNode()
public void right(MathDelimiter delimiter)
throws TypesetterException
right in interface NoadConsumerdelimiter - the delimiter to typeset on the right side
TypesetterException - in case of an errorNoadConsumer.right(
org.extex.typesetter.type.math.MathDelimiter)
public void rightBrace()
throws TypesetterException
rightBrace in interface ListMakerrightBrace in class AbstractListMakerTypesetterException - in case of an errorListMaker.rightBrace()
public Noad scanNoad(Flags flags,
Context context,
TokenSource source,
Typesetter typesetter,
Token primitive,
GroupType groupType)
throws TypesetterException,
HelpingException
scanNoad in interface NoadConsumerflags - the flags to restore after processingcontext - the interpreter contextsource - the source for new tokenstypesetter - the typesetterprimitive - the name of the primitive for error messagesgroupType - the group type in case that a group needs to be opened
null if none could be gathered
TypesetterException - in case of an error
HelpingException - in case of an errorNoadConsumer.scanNoad(
org.extex.interpreter.Flags, org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter,
Token, org.extex.interpreter.context.group.GroupType)protected void setClosing(boolean closing)
closing - the closing to setprotected void setInsertionPoint(MathList insertionPoint)
insertionPoint - the insertionPoint to set
public void showlist(java.lang.StringBuffer sb,
long depth,
long breadth)
showlist in interface ListMakershowlist in class HorizontalListMakersb - the target bufferdepth - the depth of the list displaybreadth - the breadth of the list displayListMaker.showlist( java.lang.StringBuffer,
long, long)
public void subscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token token)
throws TypesetterException,
HelpingException
subscriptMark in interface TokenDelegateListMakersubscriptMark in class AbstractListMakercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesettertoken - the actual sub mark token
TypesetterException - in case of an error
HelpingException - in case of an errorAbstractListMaker.subscriptMark(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter,
org.extex.scanner.type.token.Token)
public void superscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token token)
throws TypesetterException,
HelpingException
superscriptMark in interface TokenDelegateListMakersuperscriptMark in class AbstractListMakercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesettertoken - the actual super mark token
TypesetterException - in case of an error
HelpingException - in case of an errorAbstractListMaker.superscriptMark(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter,
org.extex.scanner.type.token.Token)
public void switchToFraction(MathDelimiter leftDelimiter,
MathDelimiter rightDelimiter,
FixedDimen ruleWidth,
TypesettingContext tc)
throws TypesetterException
switchToFraction in interface NoadConsumerleftDelimiter - 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 usedtc - the typesetting context
TypesetterException - in case of an errorNoadConsumer.switchToFraction(
org.extex.typesetter.type.math.MathDelimiter,
org.extex.typesetter.type.math.MathDelimiter,
org.extex.core.dimen.FixedDimen,
org.extex.typesetter.tc.TypesettingContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||