Package org.scilab.forge.jlatexmath
Class SymbolAtom
java.lang.Object
org.scilab.forge.jlatexmath.Atom
org.scilab.forge.jlatexmath.CharSymbol
org.scilab.forge.jlatexmath.SymbolAtom
- All Implemented Interfaces:
Cloneable
A box representing a symbol (a non-alphanumeric character).
-
Field Summary
FieldsFields inherited from class org.scilab.forge.jlatexmath.Atom
alignment, type, type_limits
-
Constructor Summary
ConstructorsConstructorDescriptionSymbolAtom
(String name, int type, boolean del) Constructs a new symbol.SymbolAtom
(SymbolAtom s, int type) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addSymbolAtom
(InputStream in, String name) static void
addSymbolAtom
(String file) static void
addSymbolAtom
(SymbolAtom sym) createBox
(TeXEnvironment env) Convert this atom into aBox
, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ...static SymbolAtom
Looks up the name in the table and returns the corresponding SymbolAtom representing the symbol (if it's found).getCharFont
(TeXFont tf) Get the CharFont-object that uniquely identifies the character that is represented by this atom.getName()
char
boolean
setUnicode
(char c) Methods inherited from class org.scilab.forge.jlatexmath.CharSymbol
isMarkedAsTextSymbol, markAsTextSymbol, removeMark
Methods inherited from class org.scilab.forge.jlatexmath.Atom
clone, getLeftType, getRightType
-
Field Details
-
symbols
-
-
Constructor Details
-
SymbolAtom
- Throws:
InvalidSymbolTypeException
-
SymbolAtom
Constructs a new symbol. This used by "TeXSymbolParser" and the symbol types are guaranteed to be valid.- Parameters:
name
- symbol nametype
- symbol type constantdel
- whether the symbol is a delimiter
-
-
Method Details
-
setUnicode
-
getUnicode
public char getUnicode() -
addSymbolAtom
-
addSymbolAtom
-
addSymbolAtom
-
get
Looks up the name in the table and returns the corresponding SymbolAtom representing the symbol (if it's found).- Parameters:
name
- the name of the symbol- Returns:
- a SymbolAtom representing the found symbol
- Throws:
SymbolNotFoundException
- if no symbol with the given name was found
-
isDelimiter
public boolean isDelimiter()- Returns:
- true if this symbol can act as a delimiter to embrace formulas
-
getName
-
createBox
Description copied from class:Atom
Convert this atom into aBox
, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ... -
getCharFont
Description copied from class:CharSymbol
Get the CharFont-object that uniquely identifies the character that is represented by this atom.- Specified by:
getCharFont
in classCharSymbol
- Parameters:
tf
- the TeXFont containing all font related information- Returns:
- a CharFont
-