Fork me on GitHub

mathAtom

Methods

decompose(context: Context, atoms: MathAtom,Array.<MathAtom>) → Array.<Span>privatestatic

Return a list of spans equivalent to atoms. A span is the most elementary type possible, for example 'text' or 'vlist', while the input atoms may be more abstract and complex, such as 'genfrac'

context Context

Font family, variant, size, color, etc...

atoms MathAtom | Array.<MathAtom>
Array.<Span>   
Source

getFontName(symbol: string,Array.<Span>, fontFamily: string) → stringprivatestatic

Given a font family ('mathbf', 'mathit'...) return a corresponding font name. If the font does not support the specified symbol return an alternate font or null if none could be determined.

symbol string | Array.<Span>

the character for which we're seeking the font

fontFamily string

such as 'mathbf', 'mathfrak', etc...

string   

a font name

Source

makeColGap(width: number)privatestatic

Used in decomposeArray to create a column separator span.

width number
Source

makeColOfRepeatingElements()privatestatic

Used in decomposeArray to create a column of repeating elements.

Source

makeStack(context: Context, nucleus: Span, nucleusShift: integer, slant: integer, above: Span, below: Span, type: string)Spanprivatestatic

Combine a nucleus with an atom above and an atom below. Used to form limits and used by \stackrel.

context Context
nucleus Span

The base over and under which the atoms will be placed.

nucleusShift integer

The vertical shift of the nucleus from the baseline.

slant integer

For operators that have a slant, such as \int, indicate by how much to horizontally offset the above and below atoms

above Span
below Span
type string

The type ('mop', 'mrel', etc...) of the result

Span   
Source