Atrium — shared contracts and the typesetting engine
    Preparing search index...

    Interface MathInline

    $…$ or \(…\) — a math run inside a paragraph.

    The mathematics is carried as a TeX string, not as a sub-tree, and that is the load-bearing decision of the math work. The engine does not implement TeX's mlist layout; it hands the run to MathJax and converts the SVG that comes back (D41). A renderer wants exactly one thing — the TeX — so modelling the inside of a formula as document-model nodes would be inventing a second representation that nothing reads and that could only drift from the first.

    source is what the expanded AST prints back to, not a slice of the file: macro expansion runs before the document walk, so a \newcommand used inside $…$ is already gone by the time this node is built. That is what the renderer must be given — MathJax has never heard of the document's own macros — and it is also why D41 §5 warns against gating on the raw source.

    interface MathInline {
        construct: string;
        display: false;
        kind: "math";
        loc: SourceRef;
        source: string;
        style: TextStyle;
    }

    Hierarchy

    • InlineBase
      • MathInline
    Index
    construct: string

    "$...$" — the construct for diagnostics.

    display: false

    Always false here, and always true on DisplayMathBlock. Present on both so a renderer reads one field off whichever node it was handed rather than re-deriving the style from the node's kind at every call site — it is literally MathJax's { display } option.

    kind: "math"

    Where this material starts in the source. Only start — see SourceSpan.

    source: string

    The TeX between the delimiters, macro-expanded, ready for the renderer.

    style: TextStyle

    The style in force where the run sits. Math is set in its own faces, so this is not the face the formula gets; it is what the size is taken from (inline math is set at the surrounding type size) and what a diagnostic names when it has to describe the surroundings.