Members
INTER_ATOM_SPACINGprivatestaticconstant
Return HTML markup representing this span, its style, classes and children.
INTER_ATOM_TIGHT_SPACINGprivatestaticconstant
Methods
coalesce(spans: Array.<Span>) → Array.<Span>privatestatic
Attempts to coalesce (merge) spans, for example consecutive text spans. Return a new tree with coalesced spans.
spans
Array.<Span>
coalesced tree
makeFontSizer() → Spanprivatestatic
Makes an element placed in each of the vlist elements to ensure that each element has the same max font size. To do this, we create a zero-width space with the correct font size. // Note: without this, even when fontSize = 0, the fraction bar is no // longer positioned correctly
makeSpan(content: string,Span,Array.<Span>, classes: string)privatestatic
Make an element made of a sequence of children with classes
classes
string
list of classes attributes associated with this node
makeSpanOfType(type: string, content: string,Array.<Span>, classes: string)privatestatic
type
string
One of 'mbin', 'mop', 'mord', 'mrel' 'mclose', 'mpunct', 'minner'
classes
string
CSS classes decorating this span See https://tex.stackexchange.com/questions/81752/ for a thorough description of the TeXt atom type and their relevance to proper kerning.
makeSymbol(fontFamily: string, symbol: string, classes: string)privatestatic
fontFamily
string
symbol
string
classes
string
makeVlist(context: Context, elements: Array.<(number|Span)>, pos: string, posData: number)privatestatic
Create a new span of type vlist, a set of vertically stacked items
context
Context
elements
Array.<(number|Span)>
An array of Span and integer. The integer can be either some kerning information or the value of an individual shift of the preceding child if in 'individualShift' mode
pos
string
The method that will be used to position the elements in the vlist.
One of:
"individualShift": each child must be followed by a number indicating how much to shift it (i.e. moved downwards)"top": posData specifies the topmost point of the vlist (>0 move up)"bottom": posData specifies the bottommost point of the vlist (>0 move down)"shift": the baseline of the vlist will be positioned posData away from the baseline of the first child. (>0 moves down)
posData
number
toString(…args: string) → stringprivatestatic
Return a string made up of the concatenated arguments. Each arguments can be either a string, which is unchanged, or a number, which is converted to a string with at most 5 fractional digits.
args
string
repeatable
