|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ugent.caagt.jmathtex.TeXFormula
public class TeXFormula
Represents a logical mathematical formula that will be displayed (by creating a
TeXIcon
from it and painting it) using algorithms that are based on the
TeX algorithms.
These formula's can be built using the built-in primitive TeX parser (methods with String arguments) or using other TeXFormula objects. Most methods have (an) equivalent(s) where one or more TeXFormula arguments are replaced with String arguments. These are just shorter notations, because all they do is parse the string(s) to TeXFormula's and call an equivalent method with (a) TeXFormula argument(s). Most methods also come in 2 variants. One kind will use this TeXFormula to build another mathematical construction and then change this object to represent the newly build construction. The other kind will only use other TeXFormula's (or parse strings), build a mathematical construction with them and insert this newly build construction at the end of this TeXFormula. Because all the provided methods return a pointer to this (modified) TeXFormula (except for the createTeXIcon method that returns a TeXIcon pointer), method chaining is also possible.
Important: All the provided methods modify this TeXFormula object, but all the TeXFormula arguments of these methods will remain unchanged and independent of this TeXFormula object!
Field Summary | |
---|---|
protected static float |
PREC
|
protected be.ugent.caagt.jmathtex.Atom |
root
|
Constructor Summary | |
---|---|
TeXFormula()
Creates an empty TeXFormula. |
|
TeXFormula(java.util.List<TeXFormula> l)
Creates a new TeXFormula from a list of TeXFormula objects. |
|
TeXFormula(java.lang.String s)
Creates a new TeXFormula by parsing the given string (using a primitive TeX parser). |
|
TeXFormula(TeXFormula f)
Creates a new TeXFormula that is a copy of the given TeXFormula. |
Method Summary | |
---|---|
TeXFormula |
add(java.lang.String s)
Parses the given string and inserts the resulting formula at the end of the current TeXFormula. |
TeXFormula |
add(TeXFormula f)
Inserts the given TeXFormula at the end of the current TeXFormula. |
TeXFormula |
addAcc(java.lang.String s,
java.lang.String accentName)
Parses the given string(s) into a TeXFormula, puts the given accent above it and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addAcc(TeXFormula base,
java.lang.String accentName)
Puts the given accent above the given TeXFormula and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addAcc(TeXFormula base,
TeXFormula accent)
Puts the given accent TeXFormula (that must represent a single accent symbol!) above the given base TeXFormula and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addEmbraced(java.lang.String s,
char l,
char r)
Parses the given string into a TeXFormula, surrounds it with the given delimiters and inserts the result at the end of the current TeXformula. |
TeXFormula |
addEmbraced(java.lang.String s,
java.lang.String left,
java.lang.String right)
Parses the given string(s) into a TeXFormula, surrounds it with the given delimiters (if not null) and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addEmbraced(TeXFormula f,
char l,
char r)
Surrounds the given TeXFormula with the given delimiters and inserts the result at the end of the current TeXformula. |
TeXFormula |
addEmbraced(TeXFormula f,
java.lang.String left,
java.lang.String right)
Surrounds the given TeXFormula with the given delimiters (if not null) and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addFraction(java.lang.String num,
java.lang.String denom,
boolean rule)
Parses the given strings into TeXFormula's that will represent the numerator (num) and the denominator (denom) of a fraction, draws a line between them depending on "rule" and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addFraction(java.lang.String num,
java.lang.String denom,
boolean rule,
int numAlign,
int denomAlign)
Parses the given strings into TeXFormula's that will represent the numerator (num) and denominator (denom) of a fraction, draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addFraction(java.lang.String num,
TeXFormula denom,
boolean rule)
Parses the given string into a TeXFormula that will represent the numerator of a fraction, uses the given TeXFormula as the denominator of this fraction, draws a line between them depending on "rule" and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addFraction(TeXFormula num,
java.lang.String denom,
boolean rule)
Parses the given string into a TeXFormula that will represent the denominator of a fraction, uses the given TeXFormula as the numerator of this fraction, draws a line between them depending on "rule" and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addFraction(TeXFormula num,
TeXFormula denom,
boolean rule)
Uses the given TeXFormula's as the numerator (num) and denominator (denom) of a fraction, draws a line between them depending on "rule" and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addFraction(TeXFormula num,
TeXFormula denom,
boolean rule,
int numAlign,
int denomAlign)
Uses the given TeXFormula's as the numerator (num) and denominator (denom) of a fraction, draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addNthRoot(java.lang.String base,
java.lang.String nthRoot)
Parses the given strings into TeXFormula's, puts them under a root sign (base) and in the upper left corner over this root sign (nthRoot) and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addNthRoot(java.lang.String base,
TeXFormula nthRoot)
Parses the given string into a TeXFormula, puts it under a root sign, puts the given TeXFormula in the upper left corner over this root sign and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addNthRoot(TeXFormula base,
java.lang.String nthRoot)
Parses the given string into a TeXFormula, puts it in the upper left corner over the root sign, puts the given TeXFormula under this root sign and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addNthRoot(TeXFormula base,
TeXFormula nthRoot)
Puts the given TeXFormula's under a root sign (base) and in the upper left corner over this root sign (nthRoot) and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addOp(java.lang.String op,
java.lang.String low,
java.lang.String up)
Parses the given strings into TeXFormula's that will represent a "big operator" (op), it's lower (low) and upper (up) bound, and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addOp(java.lang.String op,
java.lang.String low,
java.lang.String up,
boolean lim)
Parses the given strings into TeXFormula's that will represent a "big operator" (op), it's lower (low) and upper (up) bound, and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addOp(TeXFormula op,
TeXFormula low,
TeXFormula up)
Uses the given TeXFormula's as a "big operator" (op), it's lower (low) and upper (up) bound, and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addOp(TeXFormula op,
TeXFormula low,
TeXFormula up,
boolean lim)
Uses the given TeXFormula's as a "big operator" (op), it's lower (low) and upper (up) bound, and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addPhantom(java.lang.String phantom)
Parses the given string into a phantom TeXFormula and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addPhantom(java.lang.String phantom,
boolean width,
boolean height,
boolean depth)
Parses the given string into a phantom TeXFormula and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addPhantom(TeXFormula phantom)
Inserts the given TeXFormula as a phantom TeXFormula at the end of the current TeXFormula. |
TeXFormula |
addPhantom(TeXFormula phantom,
boolean width,
boolean height,
boolean depth)
Inserts the given TeXFormula as a phantom TeXFormula at the end of the current TeXFormula. |
TeXFormula |
addSqrt(java.lang.String base)
Parses the given string into a TeXFormula that will be displayed under a root sign and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addSqrt(TeXFormula base)
Displays the given TeXFormula under a root sign and inserts the result at the end of the current TeXFormula. |
TeXFormula |
addStrut(int unit,
float width,
float height,
float depth)
Inserts a strut box (whitespace) with the given width, height and depth (in the given unit) at the end of the current TeXFormula. |
TeXFormula |
addStrut(int widthUnit,
float width,
int heightUnit,
float height,
int depthUnit,
float depth)
Inserts a strut box (whitespace) with the given width (in widthUnits), height (in heightUnits) and depth (in depthUnits) at the end of the current TeXFormula. |
TeXFormula |
addSymbol(java.lang.String name)
Inserts the symbol with the given name at the end of the current TeXFormula. |
TeXFormula |
addSymbol(java.lang.String name,
int type)
Inserts the symbol with the given name at the end of the current TeXFormula as a symbol of the given symbol type. |
TeXFormula |
centerOnAxis()
Centers the current TeXformula vertically on the axis (defined by the parameter "axisheight" in the resource "DefaultTeXFont.xml". |
TeXIcon |
createTeXIcon(int style,
float size)
Creates a TeXIcon from this TeXFormula using the default TeXFont in the given point size and starting from the given TeX style. |
TeXFormula |
embrace(char left,
char right)
Surrounds this TeXFormula with the given delimiters. |
TeXFormula |
embrace(java.lang.String left,
java.lang.String right)
Surrounds this TeXFormula with the given delimiters (if not null). |
TeXFormula |
fraction(java.lang.String s,
boolean rule)
Uses the current TeXFormula as the numerator of a fraction, parses the given string into a TeXFormula that will represent the denominator of the fraction, draws a line between them depending on "rule" and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fraction(java.lang.String s,
boolean rule,
int numAlign,
int denomAlign)
Uses the current TeXFormula as the numerator of a fraction, parses the given string into a TeXFormula that will represent the denominator of the fraction, possibly draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fraction(TeXFormula f,
boolean rule)
Uses the current TeXFormula as the numerator of a fraction, the given TeXFormula as the denominator of the fraction, draws a line between them depending on "rule" and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fraction(TeXFormula f,
boolean rule,
int numAlign,
int denomAlign)
Uses the current TeXFormula as the numerator of a fraction, the given TeXFormula as the denominator of the fraction, draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fraction(TeXFormula f,
float defaultFactor,
int numAlign,
int denomAlign)
Uses the current TeXFormula as the numerator of a fraction, the given TeXFormula as the denominator of the fraction, draws a line between them with a thickness of "defaultFactor" times the default rule thickness, aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fraction(TeXFormula f,
int unit,
float thickness)
Uses the current TeXFormula as the numerator of a fraction, the given TeXFormula as the denominator of the fraction, draws a line between them with the given thickness (in the given unit) and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fraction(TeXFormula f,
int unit,
float thickness,
int numAlign,
int denomAlign)
Uses the current TeXFormula as the numerator of a fraction, the given TeXFormula as the denominator of the fraction, draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fractionInvert(java.lang.String s,
boolean rule)
Uses the current TeXFormula as the denominator of a fraction, parses the given string into a TeXFormula that will represent the numerator of the fraction, draws a line between them depending on "rule" and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fractionInvert(java.lang.String s,
boolean rule,
int numAlign,
int denomAlign)
Uses the current TeXFormula as the denominator of a fraction, parses the given string into a TeXFormula that will represent the numerator of the fraction, draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fractionInvert(TeXFormula f,
boolean rule)
Uses the current TeXFormula as the denominator of a fraction, the given TeXFormula as the numerator of the fraction, draws a line between them depending on "rule" and changes the current TeXFormula into this resulting fraction. |
TeXFormula |
fractionInvert(TeXFormula f,
boolean rule,
int numAlign,
int denomAlign)
Uses the current TeXFormula as the denominator of a fraction, the given TeXFormula as the numerator of the fraction, draws a line between them depending on "rule", aligns the numerator and denominator in comparison with each other (indicated by numAlign and denomAlign) and changes the current TeXFormula into this resulting fraction. |
static TeXFormula |
get(java.lang.String name)
Get a predefined TeXFormula. |
TeXFormula |
makePhantom()
Changes this TeXFormula into a phantom TeXFormula. |
TeXFormula |
makePhantom(boolean width,
boolean height,
boolean depth)
Changes this TeXFormula into a phantom TeXFormula. |
TeXFormula |
nthRoot(java.lang.String nthRoot)
Parses the given string into a TeXFormula, puts it in the upper left corner over a root sign (nthRoot), puts the current TeXFormula under this root sign and changes the current TeXFormula into this resulting root construction. |
TeXFormula |
nthRoot(TeXFormula nthRoot)
Puts the given TeXFormula in the upper left corner over a root sign, puts the current TeXFormula under this root sign and changes the current TeXFormula into this resulting root construction. |
TeXFormula |
overline()
Puts a line over the current TeXFormula and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putAccentOver(java.lang.String accentName)
Puts the given accent above the current TeXFormula and changes the current TeXFormula into the resulting accent construction. |
TeXFormula |
putDelimiterOver(int delimiter)
Puts the delimiter symbol represented by the given delimiter type constant above the current TeXFormula and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putDelimiterOver(int delimiter,
java.lang.String sup,
int kernUnit,
float kern)
Puts the delimiter symbol represented by the given delimiter type constant above the current TeXFormula, parses the given string into a TeXFormula and puts it above the delimiter symbol (seperated by an amount of vertical space defined by the given float value and unit) in a smaller size (unless the current TeXFormula will be displayed in the smallest possible size: the script_script style's size) and finally changes the current TeXFormula into the resulting construction. |
TeXFormula |
putDelimiterOver(int delimiter,
TeXFormula sup,
int kernUnit,
float kern)
Puts the delimiter symbol represented by the given delimiter type constant above the current TeXFormula, puts the given TeXFormula above the delimiter symbol (seperated by an amount of vertical space defined by the given float value and unit) in a smaller size (unless the current TeXFormula will be displayed in the smallest possible size: the "script_script" style's size) and finally changes the current TeXFormula into the resulting construction. |
TeXFormula |
putDelimiterUnder(int delimiter)
Puts the delimiter symbol represented by the given delimiter type constant under the current TeXFormula and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putDelimiterUnder(int delimiter,
java.lang.String sub,
int kernUnit,
float kern)
Puts the delimiter symbol represented by the given delimiter type constant under the current TeXFormula, parses the given string into a TeXFormula and puts it under the delimiter symbol (seperated by an amount of vertical space defined by the given float value and unit) in a smaller size (unless the current TeXFormula will be displayed in the smallest possible size: the script_script style's size) and finally changes the current TeXFormula into the resulting construction. |
TeXFormula |
putDelimiterUnder(int delimiter,
TeXFormula sub,
int kernUnit,
float kern)
Puts the delimiter symbol represented by the given delimiter type constant under the current TeXFormula, puts the given TeXFormula under the delimiter symbol (seperated by an amount of vertical space defined by the given float value and unit) in a smaller size (unless the current TeXFormula will be displayed in the smallest possible size: the "script_script" style's size) and finally changes the current TeXFormula into the resulting construction. |
TeXFormula |
putOver(java.lang.String over,
int overUnit,
float overSpace,
boolean overScriptSize)
Parses the given string into a TeXFormula that will be put above the current TeXFormula, in a smaller size depending on "overScriptSize" and seperated by a vertical space of size "overSpace" in "overUnit" and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putOver(TeXFormula over,
int overUnit,
float overSpace,
boolean overScriptSize)
Puts the given TeXFormula above the current TeXFormula, in a smaller size depending on "overScriptSize" and seperated by a vertical space of size "overSpace" in "overUnit" and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putUnder(java.lang.String under,
int underUnit,
float underSpace,
boolean underScriptSize)
Parses the given string into a TeXFormula that will be put under the current TeXFormula, in a smaller size depending on "underScriptSize" and seperated by a vertical space of size "underSpace" in "underUnit" and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putUnder(TeXFormula under,
int underUnit,
float underSpace,
boolean underScriptSize)
Puts the given TeXFormula under the current TeXFormula, in a smaller size depending on "underScriptSize" and seperated by a vertical space of size "underSpace" in "underUnit" and changes the current TeXFormula into the resulting construction. |
TeXFormula |
putUnderAndOver(java.lang.String under,
int underUnit,
float underSpace,
boolean underScriptSize,
java.lang.String over,
int overUnit,
float overSpace,
boolean overScriptSize)
Parses the given string "under" into a TeXFormula that will be put under the current TeXFormula, in a smaller size depending on "underScriptSize" and seperated by a vertical space of size "underSpace" in "underUnit", parses the given string "over" into a TeXFormula that will be put above the current TeXFormula, in a smaller size depending on "overScriptSize" and seperated by a vertical space of size "overSpace" in "overUnit" and finally changes the current TeXFormula into the resulting construction. |
TeXFormula |
putUnderAndOver(TeXFormula under,
int underUnit,
float underSpace,
boolean underScriptSize,
TeXFormula over,
int overUnit,
float overSpace,
boolean overScriptSize)
Puts the given TeXFormula "under" under the current TeXFormula, in a smaller size depending on "underScriptSize" and seperated by a vertical space of size "underSpace" in "underUnit", puts the given TeXFormula "over" above the current TeXFormula, in a smaller size depending on "overScriptSize" and seperated by a vertical space of size "overSpace" in "overUnit" and finally changes the current TeXFormula into the resulting construction. |
TeXFormula |
setBackground(java.awt.Color c)
Changes the background color of the current TeXFormula into the given color. |
TeXFormula |
setColor(java.awt.Color c)
Changes the (foreground) color of the current TeXFormula into the given color. |
TeXFormula |
setFixedTypes(int leftType,
int rightType)
Sets a fixed left and right type of the current TeXFormula. |
TeXFormula |
setScripts(java.lang.String sub,
java.lang.String sup)
Parses the given strings into TeXFormula's and attaches them together to the current TeXFormula as a subscript (sub) and a superscript (sup). |
TeXFormula |
setScripts(java.lang.String sub,
TeXFormula sup)
Parses the given string into a TeXFormula's and attaches it to the current TeXFormula as a subscript together with the given TeXFormula (as a superscript). |
TeXFormula |
setScripts(TeXFormula sub,
java.lang.String sup)
Parses the given string into a TeXFormula's and attaches it to the current TeXFormula as a superscript together with the given TeXFormula (as a subscript). |
TeXFormula |
setScripts(TeXFormula sub,
TeXFormula sup)
Attaches the given TeXFormula's together to the current TeXFormula as a subscript (sub) and a superscript (sup). |
TeXFormula |
setSubscript(java.lang.String sub)
Parses the given string into a TeXFormula and attaches it to the current TeXFormula as a subscript. |
TeXFormula |
setSubscript(TeXFormula sub)
Attaches the given TeXFormula to the current TeXFormula as a subscript. |
TeXFormula |
setSuperscript(java.lang.String sup)
Parses the given string into a TeXFormula and attaches it to the current TeXFormula as a superscript. |
TeXFormula |
setSuperscript(TeXFormula sup)
Attaches the given TeXFormula to the current TeXFormula as a superscript. |
TeXFormula |
sqrt()
Puts the current TeXFormula under a root sign and changes the current TeXFormula into the resulting square root construction. |
TeXFormula |
underline()
Puts a line under the current TeXFormula and changes the current TeXFormula into the resulting construction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final float PREC
protected be.ugent.caagt.jmathtex.Atom root
Constructor Detail |
---|
public TeXFormula()
public TeXFormula(java.util.List<TeXFormula> l)
If the list is empty (or null), then an empty TeXFormula will be created.
Otherwise, the newly created TeXFormula is the same as if
all the TeXFormula's in the list were added one after another (starting with the
first one) to an empty TeXFormula using the add(TeXFormula)
method.
The new TeXFormula is independent of all the TeXFormula's from the list!
l
- a list of TeXFormula objectspublic TeXFormula(java.lang.String s) throws ParseException
s
- the string to be parsed
ParseException
- if the string could not be parsed correctlypublic TeXFormula(TeXFormula f)
Both TeXFormula's are independent of one another!
f
- the formula to be copiedMethod Detail |
---|
public TeXFormula add(java.lang.String s) throws ParseException
s
- the string to be parsed and inserted
ParseException
- if the string could not be parsed correctlypublic TeXFormula add(TeXFormula f)
f
- the TeXFormula to be inserted
public TeXFormula centerOnAxis()
public TeXFormula addAcc(java.lang.String s, java.lang.String accentName) throws InvalidSymbolTypeException, SymbolNotFoundException, ParseException
s
- the string to be parsed into a TeXFormula above which te given accent
will be placedaccentName
- the name of the accent symbol
InvalidSymbolTypeException
- if the symbol is not defined as an accent
SymbolNotFoundException
- if there's no symbol defined with the given name
ParseException
- if the string(s) could not be parsed correctlypublic TeXFormula addAcc(TeXFormula base, java.lang.String accentName) throws InvalidSymbolTypeException, SymbolNotFoundException
base
- the TeXFormula above which the given accent will be placedaccentName
- the name of the accent symbol
InvalidSymbolTypeException
- if the symbol is not defined as an accent
SymbolNotFoundException
- if there's no symbol defined with the given namepublic TeXFormula addAcc(TeXFormula base, TeXFormula accent) throws InvalidSymbolTypeException, InvalidTeXFormulaException
It's recommended to use one of the other more simple "addAcc"-mehods that require the symbolname of the accent as a string! This method was added only because it was the best way for parsing the MathML "mover" element into a TeXFormula.
base
- the TeXFormula above which the given accent will be placedaccent
- the TeXFormula that must represent a single accent symbol
InvalidSymbolTypeException
- if the symbol that the given accent TeXFormula
represents, is not defined as an accent
InvalidTeXFormulaException
- if the given accent TeXFormula does not represent
a single symbolpublic TeXFormula addEmbraced(java.lang.String s, char l, char r) throws SymbolNotFoundException, InvalidDelimiterException, ParseException, DelimiterMappingNotFoundException
s
- the string to be parsed into a TeXFormula that will be surrounded
by the given delimitersl
- the left delimiter characterr
- the right delimiter character
SymbolNotFoundException
- if one of the delimiter characters is mapped
to an unknown symbol
InvalidDelimiterException
- if one of the delimiter characters is mapped
to a symbol that is not defined as a delimiter symbol
ParseException
- if the string could not be parsed correctly
DelimiterMappingNotFoundException
- if no character-to-symbol mapping is
found for one of the delimiter characterspublic TeXFormula addEmbraced(java.lang.String s, java.lang.String left, java.lang.String right) throws SymbolNotFoundException, ParseException, InvalidDelimiterException
s
- the string to be parsed into a TeXFormula that will be
surrounded by the given delimitersleft
- the symbol name of the left delimiter (or null: no delimiter)right
- the symbol name of the right delimiter (or null: no delimiter)
SymbolNotFoundException
- if no symbol is defined for one of the
given names
ParseException
- if the string(s) could not be parsed correctly
InvalidDelimiterException
- if one of the symbols is not defined as a
delimiter symbolpublic TeXFormula addEmbraced(TeXFormula f, char l, char r) throws SymbolNotFoundException, InvalidDelimiterException, DelimiterMappingNotFoundException
f
- the TeXFormula that will be surrounded by the given delimitersl
- the left delimiter characterr
- the right delimiter character
SymbolNotFoundException
- if one of the delimiter characters is mapped
to an unknown symbol
InvalidDelimiterException
- if one of the delimiter characters is mapped
to a symbol that is not defined as a delimiter symbol
DelimiterMappingNotFoundException
- if no character-to-symbol mapping is
found for one of the delimiter characterspublic TeXFormula addEmbraced(TeXFormula f, java.lang.String left, java.lang.String right) throws SymbolNotFoundException, InvalidDelimiterException
f
- the TeXFormula that will be surrounded by the given delimitersleft
- the symbol name of the left delimiter (or null: no delimiter)right
- the symbol name of the right delimiter (or null: no delimiter)
SymbolNotFoundException
- if no symbol is defined for one of the
given names
InvalidDelimiterException
- if one of the symbols is not defined as a
delimiter symbolpublic TeXFormula addFraction(java.lang.String num, java.lang.String denom, boolean rule) throws ParseException
num
- the string to be parsed into a TeXFormula that will represent the
numerator of the fractiondenom
- the string to be parsed into a TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominator
ParseException
- if one of the strings could not be parsed correctlypublic TeXFormula addFraction(java.lang.String num, java.lang.String denom, boolean rule, int numAlign, int denomAlign) throws ParseException
num
- the string to be parsed into a TeXFormula that will represent the
numerator of the fractiondenom
- the string to be parsed into a TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominatornumAlign
- an alignment constant (from TeXConstants
) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
ParseException
- if one of the strings could not be parsed correctlypublic TeXFormula addFraction(java.lang.String num, TeXFormula denom, boolean rule) throws ParseException
num
- the string to be parsed into a TeXFormula that will represent the
numerator of the fractiondenom
- the TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominator
ParseException
- if the string could not be parsed correctlypublic TeXFormula addFraction(TeXFormula num, java.lang.String denom, boolean rule) throws ParseException
num
- the TeXFormula that will represent the
numerator of the fractiondenom
- the string to be parsed into a TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominator
ParseException
- if the string could not be parsed correctlypublic TeXFormula addFraction(TeXFormula num, TeXFormula denom, boolean rule)
num
- the TeXFormula that will represent the
numerator of the fractiondenom
- the TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominator
public TeXFormula addFraction(TeXFormula num, TeXFormula denom, boolean rule, int numAlign, int denomAlign)
num
- the TeXFormula that will represent the
numerator of the fractiondenom
- the TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominatornumAlign
- an alignment constant (from TeXConstants
) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
public TeXFormula addNthRoot(java.lang.String base, java.lang.String nthRoot) throws ParseException
base
- the string to be parsed into a TeXFormula that will be put
under the root sign.nthRoot
- the string to be parsed into a TeXFormula that will be put
in the upper left corner over the root sign
ParseException
- if one of the strings could not be parsed correctlypublic TeXFormula addNthRoot(java.lang.String base, TeXFormula nthRoot) throws ParseException
base
- the string to be parsed into a TeXFormula that will be put
under the root sign.nthRoot
- the TeXFormula that will be put
in the upper left corner over the root sign
ParseException
- if the string could not be parsed correctlypublic TeXFormula addNthRoot(TeXFormula base, java.lang.String nthRoot) throws ParseException
base
- the TeXFormula that will be put under the root sign.nthRoot
- the string to be parsed into a TeXFormula that will be put
in the upper left corner over the root sign
ParseException
- if the strings could not be parsed correctlypublic TeXFormula addNthRoot(TeXFormula base, TeXFormula nthRoot)
base
- the TeXFormula that will be put under the root sign.nthRoot
- the TeXFormula that will be put
in the upper left corner over the root sign
public TeXFormula addOp(java.lang.String op, java.lang.String low, java.lang.String up) throws ParseException
op
- the string to be parsed into a TeXFormula that will represent the
"big operator"low
- the string to be parsed into a TeXFormula that will represent
the lower bound of the "big operator" (or null: no lower bound)up
- the string to be parsed into a TeXFormula that will represent
the upper bound of the "big operator" (or null: no upper bound)
ParseException
- if one of the strings could not be parsed correctlypublic TeXFormula addOp(java.lang.String op, java.lang.String low, java.lang.String up, boolean lim) throws ParseException
op
- the string to be parsed into a TeXFormula that will represent the
"big operator"low
- the string to be parsed into a TeXFormula that will represent
the lower bound of the "big operator" (or null: no lower bound)up
- the string to be parsed into a TeXFormula that will represent
the upper bound of the "big operator" (or null: no upper bound)lim
- whether the upper and lower bound should be displayed as limits
(<-> scripts)
ParseException
- if one of the strings could not be parsed correctlypublic TeXFormula addOp(TeXFormula op, TeXFormula low, TeXFormula up)
op
- the TeXFormula that will represent the
"big operator"low
- the TeXFormula that will represent
the lower bound of the "big operator" (or null: no lower bound)up
- the TeXFormula that will represent
the upper bound of the "big operator" (or null: no upper bound)
public TeXFormula addOp(TeXFormula op, TeXFormula low, TeXFormula up, boolean lim)
op
- the TeXFormula that will represent the
"big operator"low
- the TeXFormula that will represent
the lower bound of the "big operator" (or null: no lower bound)up
- the TeXFormula that will represent
the upper bound of the "big operator" (or null: no upper bound)lim
- whether the upper and lower bound should be displayed as limits
(<-> scripts)
public TeXFormula addPhantom(java.lang.String phantom) throws ParseException
phantom
- the string to be parsed as a phantom TeXFormula
ParseException
- if the string could not be parsed correctlypublic TeXFormula addPhantom(java.lang.String phantom, boolean width, boolean height, boolean depth) throws ParseException
phantom
- the string to be parsed as a phantom TeXFormulawidth
- whether the width of the TeXFormula's box should be used (<-> width 0)height
- whether the height of the TeXFormula's box should be used (<-> height 0)depth
- whether the depth of the TeXFormula's box should be used (<-> depth 0)
ParseException
- if the string could not be parsed correctlypublic TeXFormula addPhantom(TeXFormula phantom)
phantom
- the TeXFormula to be inserted as a phantom TeXFormula
public TeXFormula addPhantom(TeXFormula phantom, boolean width, boolean height, boolean depth)
phantom
- the TeXFormula to be inserted as a phantom TeXFormulawidth
- whether the width of the TeXFormula's box should be used (<-> width 0)height
- whether the height of the TeXFormula's box should be used (<-> height 0)depth
- whether the depth of the TeXFormula's box should be used (<-> depth 0)
public TeXFormula addSqrt(java.lang.String base) throws ParseException
base
- the string to be parsed into a TeXFormula that will be displayed
under a root sign
ParseException
- if the string could not be parsed correctlypublic TeXFormula addSqrt(TeXFormula base)
base
- the TeXFormula that will be displayed
under a root sign
public TeXFormula addStrut(int unit, float width, float height, float depth) throws InvalidUnitException
unit
- a unit constant (from TeXConstants
)width
- the width of the strut boxheight
- the height of the strut boxdepth
- the depth of the strut box
InvalidUnitException
- if the given integer value does not represent
a valid unitpublic TeXFormula addStrut(int widthUnit, float width, int heightUnit, float height, int depthUnit, float depth) throws InvalidUnitException
widthUnit
- a unit constant used for the width (from TeXConstants
)width
- the width of the strut boxheightUnit
- a unit constant used for the height (from TeXConstants)height
- the height of the strut boxdepthUnit
- a unit constant used for the depth (from TeXConstants)depth
- the depth of the strut box
InvalidUnitException
- if the given integer value does not represent
a valid unitpublic TeXFormula addSymbol(java.lang.String name) throws SymbolNotFoundException
name
- the name of the symbol
SymbolNotFoundException
- if there's no symbol defined with the given namepublic TeXFormula addSymbol(java.lang.String name, int type) throws SymbolNotFoundException, InvalidSymbolTypeException
name
- the name of the symboltype
- a symbol type constant (from TeXConstants
)
SymbolNotFoundException
- if there's no symbol defined with the given name
InvalidSymbolTypeException
- if the given integer value does not represent
a valid symbol typepublic TeXIcon createTeXIcon(int style, float size)
style
- a TeX style constant (from TeXConstants
) to start fromsize
- the default TeXFont's point size
public TeXFormula embrace(char left, char right) throws SymbolNotFoundException, InvalidDelimiterException, DelimiterMappingNotFoundException
left
- the left delimiter characterright
- the right delimiter character
SymbolNotFoundException
- if one of the delimiter characters is mapped
to an unknown symbol
InvalidDelimiterException
- if one of the delimiter characters is mapped
to a symbol that is not defined as a delimiter symbol
DelimiterMappingNotFoundException
- if no character-to-symbol mapping is
found for one of the delimiter characterspublic TeXFormula embrace(java.lang.String left, java.lang.String right) throws SymbolNotFoundException, InvalidDelimiterException
left
- the symbol name of the left delimiter (or null: no delimiter)right
- the symbol name of the right delimiter (or null: no delimiter)
SymbolNotFoundException
- if no symbol is defined for one of the
given names
InvalidDelimiterException
- if one of the symbols is not defined as a
delimiter symbolpublic TeXFormula fraction(java.lang.String s, boolean rule) throws ParseException
s
- the string to be parsed into a TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominator
ParseException
- if the string could not be parsed correctlypublic TeXFormula fraction(java.lang.String s, boolean rule, int numAlign, int denomAlign) throws ParseException
s
- the string to be parsed into a TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominatornumAlign
- an alignment constant (from TeXConstants
) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
ParseException
- if the string could not be parsed correctlypublic TeXFormula fraction(TeXFormula f, boolean rule)
f
- the TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominator
public TeXFormula fraction(TeXFormula f, int unit, float thickness) throws InvalidUnitException
f
- the TeXFormula that will represent the
denominator of the fractionunit
- a unit constant (from TeXConstants
)thickness
- the thickness (in the given unit) of the line to be put between
the numerator and denominator
InvalidUnitException
- if the given integer value does not
represent a valid unitpublic TeXFormula fraction(TeXFormula f, int unit, float thickness, int numAlign, int denomAlign) throws InvalidUnitException
f
- the TeXFormula that will represent the
denominator of the fractionunit
- a unit constant (from TeXConstants
)thickness
- the thickness (in the given unit) of the line to be put between
the numerator and denominatornumAlign
- an alignment constant (from TeXConstants) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
InvalidUnitException
- if the given integer value does not
represent a valid unitpublic TeXFormula fraction(TeXFormula f, float defaultFactor, int numAlign, int denomAlign)
f
- the TeXFormula that will represent the
denominator of the fractiondefaultFactor
- the thickness factor (to be multiplied by the default
rule thickness)numAlign
- an alignment constant (from TeXConstants) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
public TeXFormula fraction(TeXFormula f, boolean rule, int numAlign, int denomAlign)
f
- the TeXFormula that will represent the
denominator of the fractionrule
- whether a line should be drawn between numerator and denominatornumAlign
- an alignment constant (from TeXConstants
) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
public TeXFormula fractionInvert(java.lang.String s, boolean rule) throws ParseException
s
- the string to be parsed into a TeXFormula that will represent the
numerator of the fractionrule
- whether a line should be drawn between numerator and denominator
ParseException
- if the string could not be parsed correctlypublic TeXFormula fractionInvert(java.lang.String s, boolean rule, int numAlign, int denomAlign) throws ParseException
s
- the string to be parsed into a TeXFormula that will represent the
numerator of the fractionrule
- whether a line should be drawn between numerator and denominatornumAlign
- an alignment constant (from TeXConstants
) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
ParseException
- if the string could not be parsed correctlypublic TeXFormula fractionInvert(TeXFormula f, boolean rule)
f
- the TeXFormula that will represent the
numerator of the fractionrule
- whether a line should be drawn between numerator and denominator
public TeXFormula fractionInvert(TeXFormula f, boolean rule, int numAlign, int denomAlign)
f
- the TeXFormula that will represent the
numerator of the fractionrule
- whether a line should be drawn between numerator and denominatornumAlign
- an alignment constant (from TeXConstants
) indicating
how the numerator should be aligned in comparison with the (larger)
denominatordenomAlign
- an alignment constant (from TeXConstants) indicating
how the denominator should be aligned in comparison with the (larger)
numerator
public TeXFormula makePhantom()
public TeXFormula makePhantom(boolean width, boolean height, boolean depth)
width
- whether the width of the TeXFormula's box should be used (<-> width 0)height
- whether the height of the TeXFormula's box should be used (<-> height 0)depth
- whether the depth of the TeXFormula's box should be used (<-> depth 0)
public TeXFormula nthRoot(java.lang.String nthRoot) throws ParseException
nthRoot
- the string to be parsed into a TeXFormula that will be put
in the upper left corner over the root sign
ParseException
- if the string could not be parsed correctlypublic TeXFormula nthRoot(TeXFormula nthRoot)
nthRoot
- the TeXFormula that will be put
in the upper left corner over the root sign
public TeXFormula overline()
public TeXFormula putAccentOver(java.lang.String accentName) throws InvalidSymbolTypeException, SymbolNotFoundException
accentName
- the name of the accent symbol
InvalidSymbolTypeException
- if the symbol is not defined as an accent
SymbolNotFoundException
- if there's no symbol defined with the given namepublic TeXFormula putDelimiterOver(int delimiter) throws InvalidDelimiterTypeException, SymbolNotFoundException
delimiter
- a delimiter type constant (from TeXConstants
) that represents
a delimiter symbol that will be put above the current TeXFormula
InvalidDelimiterTypeException
- if the given integer value does not represent
a valid delimiter type
SymbolNotFoundException
- if the definition of the symbol represented
by the delimiter constant was not found (due to user-made changes!)public TeXFormula putDelimiterOver(int delimiter, java.lang.String sup, int kernUnit, float kern) throws InvalidDelimiterTypeException, InvalidUnitException, ParseException, SymbolNotFoundException
delimiter
- a delimiter type constant (from TeXConstants
) that represents
a delimiter symbol that will be put above the current TeXFormulasup
- the string to be parsed into a TeXFormula that will be put above the
delimiter symbol, in a smaller size if possiblekernUnit
- a unit constant (from TeXConstants
)kern
- amount of vertical space (in kernUnit) to be put between the delimiter
and the given TeXFormula sub
InvalidDelimiterTypeException
- if the given integer value does not represent
a valid delimiter type
InvalidUnitException
- if the given integer value (kernUnit) does not
represent a valid unit
ParseException
- if the given string could not be parsed correctly
SymbolNotFoundException
- if the definition of the symbol represented
by the delimiter constant was not found (due to user-made changes!)public TeXFormula putDelimiterOver(int delimiter, TeXFormula sup, int kernUnit, float kern) throws InvalidDelimiterTypeException, InvalidUnitException, SymbolNotFoundException
delimiter
- a delimiter type constant (from TeXConstants
) that represents
a delimiter symbol that will be put above the current TeXFormulasup
- the TeXFormula that will be put above the
delimiter symbol, in a smaller size if possiblekernUnit
- a unit constant (from TeXConstants
)kern
- amount of vertical space (in kernUnit) to be put between the delimiter
and the given TeXFormula sub
InvalidDelimiterTypeException
- if the given integer value does not represent
a valid delimiter type
InvalidUnitException
- if the given integer value (kernUnit) does not
represent a valid unit
SymbolNotFoundException
- if the definition of the symbol represented
by the delimiter constant was not found (due to user-made changes!)public TeXFormula putDelimiterUnder(int delimiter) throws InvalidDelimiterTypeException, SymbolNotFoundException
delimiter
- a delimiter type constant (from TeXConstants
) that represents
a delimiter symbol that will be put under the current TeXFormula
InvalidDelimiterTypeException
- if the given integer value does not represent
a valid delimiter type
SymbolNotFoundException
- if the definition of the symbol represented
by the delimiter constant was not found (due to user-made changes!)public TeXFormula putDelimiterUnder(int delimiter, java.lang.String sub, int kernUnit, float kern) throws InvalidDelimiterTypeException, InvalidUnitException, ParseException, SymbolNotFoundException
delimiter
- a delimiter type constant (from TeXConstants
) that represents
a delimiter symbol that will be put under the current TeXFormulasub
- the string to be parsed into a TeXFormula that will be put under the
delimiter symbol, in a smaller size if possiblekernUnit
- a unit constant (from TeXConstants
)kern
- amount of vertical space (in kernUnit) to be put between the delimiter
and the given TeXFormula sub
InvalidDelimiterTypeException
- if the given integer value does not represent
a valid delimiter type
InvalidUnitException
- if the given integer value (kernUnit) does not
represent a valid unit
ParseException
- if the given string could not be parsed correctly
SymbolNotFoundException
- if the definition of the symbol represented
by the delimiter constant was not found (due to user-made changes!)public TeXFormula putDelimiterUnder(int delimiter, TeXFormula sub, int kernUnit, float kern) throws InvalidDelimiterTypeException, InvalidUnitException, SymbolNotFoundException
delimiter
- a delimiter type constant (from TeXConstants
) that represents
a delimiter symbol that will be put under the current TeXFormulasub
- the TeXFormula that will be put under the
delimiter symbol, in a smaller size if possiblekernUnit
- a unit constant (from TeXConstants
)kern
- amount of vertical space (in kernUnit) to be put between the delimiter
and the given TeXFormula sub
InvalidDelimiterTypeException
- if the given integer value (delimiter)
does not represent a valid delimiter type
InvalidUnitException
- if the given integer value (kernUnit) does not
represent a valid unit
SymbolNotFoundException
- if the definition of the symbol represented
by the delimiter constant was not found (due to user-made changes!)public TeXFormula putOver(TeXFormula over, int overUnit, float overSpace, boolean overScriptSize) throws InvalidUnitException
over
- the TeXFormula to be put over the current TeXFormulaoverUnit
- a unit constant (from TeXConstants)overSpace
- the size (in overUnit) of the vertical space between the
current TeXFormula and the TeXFormula (over) that will be put over itoverScriptSize
- whether the TeXFormula (over) that will be put over the
current TeXFormula should be displayed in a smaller size (if possible)
InvalidUnitException
- if the given unit integer values doesn't
represent a valid unitpublic TeXFormula putOver(java.lang.String over, int overUnit, float overSpace, boolean overScriptSize) throws InvalidUnitException
over
- the string to be parsed into a TeXFormula that will be put over the
current TeXFormulaoverUnit
- a unit constant (from TeXConstants)overSpace
- the size (in overUnit) of the vertical space between the
current TeXFormula and the TeXFormula (over) that will be put over itoverScriptSize
- whether the TeXFormula (over) that will be put over the
current TeXFormula should be displayed in a smaller size (if possible)
InvalidUnitException
- if one of the given unit integer values doesn't
represent a valid unit
parseException
- if the given string could not be parsed correctlypublic TeXFormula putUnder(java.lang.String under, int underUnit, float underSpace, boolean underScriptSize) throws InvalidUnitException
under
- the string to be parsed into a TeXFormula that will be put under
the current TeXFormula, or null to put nothing under itunderUnit
- a unit constant (from TeXConstants
)underSpace
- the size (in underUnit) of the vertical space between the
current TeXFormula and the TeXFormula (under) that will be put under itunderScriptSize
- whether the TeXFormula (under) that will be put under the
current TeXFormula should be displayed in a smaller size (if possible)
InvalidUnitException
- if one of the given unit integer values doesn't
represent a valid unit
parseException
- if the given string could not be parsed correctlypublic TeXFormula putUnder(TeXFormula under, int underUnit, float underSpace, boolean underScriptSize) throws InvalidUnitException
under
- the TeXFormula to be put under the current TeXFormulaunderUnit
- a unit constant (from TeXConstants
)underSpace
- the size (in underUnit) of the vertical space between the
current TeXFormula and the TeXFormula (under) that will be put under it
(if not null)underScriptSize
- whether the TeXFormula (under) that will be put under the
current TeXFormula should be displayed in a smaller size (if possible)
InvalidUnitException
- if the given unit integer values doesn't
represent a valid unitpublic TeXFormula putUnderAndOver(java.lang.String under, int underUnit, float underSpace, boolean underScriptSize, java.lang.String over, int overUnit, float overSpace, boolean overScriptSize) throws InvalidUnitException, ParseException
under
- the string to be parsed into a TeXFormula that will be put under
the current TeXFormula, or null to put nothing under itunderUnit
- a unit constant (from TeXConstants
)underSpace
- the size (in underUnit) of the vertical space between the
current TeXFormula and the TeXFormula (under) that will be put under itunderScriptSize
- whether the TeXFormula (under) that will be put under the
current TeXFormula should be displayed in a smaller size (if possible)over
- the string to be parsed into a TeXFormula that will be put over the
current TeXFormula, or null to put nothing over itoverUnit
- a unit constant (from TeXConstants)overSpace
- the size (in overUnit) of the vertical space between the
current TeXFormula and the TeXFormula (over) that will be put over itoverScriptSize
- whether the TeXFormula (over) that will be put over the
current TeXFormula should be displayed in a smaller size (if possible)
InvalidUnitException
- if one of the given unit integer values doesn't
represent a valid unit
parseException
- if one of the given strings could not be parsed correctly
ParseException
public TeXFormula putUnderAndOver(TeXFormula under, int underUnit, float underSpace, boolean underScriptSize, TeXFormula over, int overUnit, float overSpace, boolean overScriptSize) throws InvalidUnitException
under
- the TeXFormula to be put under the current TeXFormulaunderUnit
- a unit constant (from TeXConstants
)underSpace
- the size (in underUnit) of the vertical space between the
current TeXFormula and the TeXFormula (under) that will be put under itunderScriptSize
- whether the TeXFormula (under) that will be put under the
current TeXFormula should be displayed in a smaller size (if possible)over
- the TeXFormula to be put over the current TeXFormulaoverUnit
- a unit constant (from TeXConstants)overSpace
- the size (in overUnit) of the vertical space between the
current TeXFormula and the TeXFormula (over) that will be put over itoverScriptSize
- whether the TeXFormula (over) that will be put over the
current TeXFormula should be displayed in a smaller size (if possible)
InvalidUnitException
- if one of the given unit integer values doesn't
represent a valid unitpublic TeXFormula setBackground(java.awt.Color c)
c
- the desired background color for the current TeXFormula
public TeXFormula setColor(java.awt.Color c)
c
- the desired foreground color for the current TeXFormula
public TeXFormula setFixedTypes(int leftType, int rightType) throws InvalidAtomTypeException
leftType
- atom type constant (from TeXConstants
)rightType
- atom type constant (from TeXConstants)
InvalidAtomTypeException
- if the given integer value does not represent
a valid atom typepublic TeXFormula setScripts(java.lang.String sub, java.lang.String sup) throws ParseException
sub
- the string to be parsed into a TeXFormula that will be attached to
the current TeXFormula as a subscriptsup
- the string to be parsed into a TeXFormula that will be attached to
the current TeXFormula as a superscript
ParseException
- if one of the given strings could not be parsed correctlypublic TeXFormula setScripts(java.lang.String sub, TeXFormula sup) throws ParseException
sub
- the string to be parsed into a TeXFormula that will be attached to
the current TeXFormula as a subscriptsup
- the TeXFormula that will be attached to
the current TeXFormula as a superscript
ParseException
- if the given string could not be parsed correctlypublic TeXFormula setScripts(TeXFormula sub, java.lang.String sup) throws ParseException
sub
- the TeXFormula that will be attached to
the current TeXFormula as a subscriptsup
- the string to be parsed into a TeXFormula that will be attached to
the current TeXFormula as a superscript
ParseException
- if the given string could not be parsed correctlypublic TeXFormula setScripts(TeXFormula sub, TeXFormula sup)
sub
- the TeXFormula that will be attached to
the current TeXFormula as a subscriptsup
- the TeXFormula that will be attached to
the current TeXFormula as a superscript
public TeXFormula setSubscript(java.lang.String sub) throws ParseException
sub
- the string to be parsed into a TeXFormula that will be attached
to the current TeXFormula as a subscript
ParseException
- if the given string could not be parsed correctlypublic TeXFormula setSubscript(TeXFormula sub)
sub
- the TeXFormula that will be attached
to the current TeXFormula as a subscript
public TeXFormula setSuperscript(java.lang.String sup) throws ParseException
sup
- the string to be parsed into a TeXFormula that will be attached
to the current TeXFormula as a superscript
ParseException
- if the given string could not be parsed correctlypublic TeXFormula setSuperscript(TeXFormula sup)
sup
- the TeXFormula that will be attached
to the current TeXFormula as a superscript
public TeXFormula sqrt()
public TeXFormula underline()
public static TeXFormula get(java.lang.String name) throws FormulaNotFoundException
name
- the name of the predefined TeXFormula
FormulaNotFoundException
- if no predefined TeXFormula is found with the
given name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |