new MathAtom(mode: string, type: string, body: string | Array, style: object): MathAtomprivate
body: string | Array
Type can be one of:
mord: ordinary symbol, e.g.
textord: ordinary characters
mop: operators, including special functions,
mbin: binary operator:
mrel: relational operator:
mopen: opening fence:
mclose: closing fence:
minner: special layout cases, overlap,
In addition to these basic types, which correspond to the TeX atom types, some atoms represent more complex compounds, including:
spacing: blank space between atoms
mathstyle: to change the math style used:
text. The layout rules are different for each, the latter being more compact and intended to be incorporated with surrounding non-math text.
root: a group, which has no parent (only one per formula)
group: a simple group of atoms, for example from a
sizing: set the size of the font used
rule: draw a line, for the
line: used by
box: a border drawn around an expression and change its background color
overlap: display a symbol over another
overunder: displays an annotation above or below a symbol
array: a group, which has children arranged in rows. Used by environments such as
genfrac: a generalized fraction: a numerator and denominator, separated by an optional line, and surrounded by optional fences
surd: a surd, aka root
leftright: used by the
delim: some delimiter
sizeddelim: a delimiter that can grow
The following types are used by the editor:
commandindicate a command being entered. The text is displayed in blue in the editor.
error: indicate a command that is unknown, for example
\xyzy. The text is displayed with a wavy red underline in the editor.
placeholder: indicate a temporary item. Placeholders are displayed as a dashed square in the editor.
first: a special, empty, atom put as the first atom in math lists in order to be able to position the caret before the first element. Aside from the caret, they display nothing.
body: string | MathAtom
if true, this atom does not let its
children be selected. Used by the
\enclose annotations, for example.
if true, when the caret reaches the first position in this element's body, it automatically moves to the outside of the element. Conversely, when the caret reaches the position right after this element, it automatically moves to the last position inside this element.