Skip to main content

Module math

Module math 

Source
Expand description

Math value / box model: trimmed analog of math.ml’s math_kind (horzBox.ml:134) and low_math_atom (math.ml:9).

Structs§

MathGlyph
One already-positioned glyph inside a laid-out math run: a string set in info (font + size — a superscript carries a smaller size here), placed at dx right of the math box’s origin and dy above its baseline (dy < 0 = below, for subscripts). The analog of math.ml’s LowMathGlyph after horz_of_low_math has resolved its PHGRising shift into an offset.

Enums§

MathCharClass
v0.0.6 math_char_class (primitives.cppo.ml’s MathItalic/…): which Mathematical-Alphanumeric style block a plain ${…} letter resolves to (\mathrm/\mathbf/… — math.satyh’s \math-style). Ord/Hash so it can key Context::math_variant_char_map’s override table.
MathKind
v0.0.6 math_kind (horzBox.ml:134-145). Prefix is a SATySFi-specific class (differential d, \partial); End is a synthetic list-boundary sentinel.

Functions§

default_math_variant_char
Upstream default_math_variant_char_map (primitives.cppo.ml:358-460) as a pure function (base-offset + exception lists) rather than a big table cloned into every Context, which stores only the runtime override map (set-math-variant-char). None means “no remap” — either class/c has no Unicode Mathematical-Alphanumeric counterpart (e.g. a digit), or the letter has no assigned codepoint in that style block (a handful of Script/Fraktur/Double-Struck letters use a distinct legacy symbol instead, per Unicode’s own gaps — the hardcoded exceptions below).