com.agog.mathdisplay.parse / MTMathAtom

MTMathAtom

open class MTMathAtom : Any

A MTMathAtom is the basic unit of a math list. Each atom represents a single character or mathematical operator in a list. However certain atoms can represent more complex structures such as fractions and radicals. Each atom has a type which determines how the atom is rendered and a nucleus. The nucleus contains the character(s) that need to be rendered. However the nucleus may be empty for certain types of atoms. An atom has an optional subscript or superscript which represents the subscript or superscript that is to be rendered.

Certain types of atoms inherit from MTMathAtom and may have additional fields.

Constructors

<init> MTMathAtom(type: MTMathAtomType, nucleus: String)

A MTMathAtom is the basic unit of a math list. Each atom represents a single character or mathematical operator in a list. However certain atoms can represent more complex structures such as fractions and radicals. Each atom has a type which determines how the atom is rendered and a nucleus. The nucleus contains the character(s) that need to be rendered. However the nucleus may be empty for certain types of atoms. An atom has an optional subscript or superscript which represents the subscript or superscript that is to be rendered.

Properties

fontStyle var fontStyle: MTFontStyle

The font style to be used for the atom.

fusedAtoms var fusedAtoms: <ERROR CLASS>
indexRange var indexRange: NSRange
nucleus var nucleus: String
subScript var subScript: MTMathList?

An optional subscript.

superScript var superScript: MTMathList?

An optional superscript.

type var type: MTMathAtomType

Functions

copyDeep open fun copyDeep(): MTMathAtom
copyDeepContent fun copyDeepContent(atom: MTMathAtom): MTMathAtom
description fun description(): String
finalized fun finalized(newNode: MTMathAtom): MTMathAtom
open fun finalized(): MTMathAtom
fuse fun fuse(atom: MTMathAtom): Unit
scriptsAllowed fun scriptsAllowed(): Boolean

Returns true if this atom allows scripts (sub or super).

toLatexString open fun toLatexString(): String
toStringSubs fun toStringSubs(s: String): String

Inherited Companion Object Properties

aliases val aliases: <ERROR CLASS><String, String>
fontStyleWithName val fontStyleWithName: <ERROR CLASS><String, MTFontStyle>

Companion Object Functions

atomForCharacter fun atomForCharacter(ch: Char): MTMathAtom?
atomWithType fun atomWithType(type: MTMathAtomType, value: String): MTMathAtom
isNotBinaryOperator fun isNotBinaryOperator(prevNode: MTMathAtom?): Boolean
typeToText fun typeToText(type: MTMathAtomType): String

Inherited Companion Object Functions

accentName fun accentName(accent: MTAccent): String?
accentWithName fun accentWithName(accentName: String): MTAccent?
addLatexSymbol fun addLatexSymbol(name: String, atom: MTMathAtom): Unit
atomForLatexSymbolName fun atomForLatexSymbolName(symbolName: String): MTMathAtom?
boundaryAtomForDelimiterName fun boundaryAtomForDelimiterName(delimName: String): MTMathAtom?
delimiterNameForBoundaryAtom fun delimiterNameForBoundaryAtom(boundary: MTMathAtom): String?
fontNameForStyle fun fontNameForStyle(fontStyle: MTFontStyle): String
fractionWithNumerator fun fractionWithNumerator(numStr: String, denominatorStr: String): MTFraction
latexSymbolNameForAtom fun latexSymbolNameForAtom(atom: MTMathAtom): String?
mathListForCharacters fun mathListForCharacters(chars: String): MTMathList
operatorWithName fun operatorWithName(name: String, limits: Boolean): MTLargeOperator
supportedLatexSymbolNames fun supportedLatexSymbolNames(): List<String>
tableWithEnvironment fun tableWithEnvironment(env: String?, cells: MutableList<MutableList<MTMathList>>, error: MTParseError): MTMathAtom?
times fun times(): MTMathAtom

Inheritors

MTAccent class MTAccent : MTMathAtom
MTFraction class MTFraction : MTMathAtom
MTInner class MTInner : MTMathAtom
MTLargeOperator class MTLargeOperator : MTMathAtom
MTMathColor class MTMathColor : MTMathAtom
MTMathSpace class MTMathSpace : MTMathAtom
MTMathStyle class MTMathStyle : MTMathAtom
MTMathTable class MTMathTable : MTMathAtom
MTOverLine class MTOverLine : MTMathAtom
MTRadical class MTRadical : MTMathAtom
MTUnderLine class MTUnderLine : MTMathAtom