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

    Interface DisplayMathContext

    Everything setting a display needs on top of MathContext.

    interface DisplayMathContext {
        diagnostics: {
            code?:
                | "syntax"
                | "unsupported"
                | "undefined-command"
                | "undefined-environment"
                | "undefined-reference"
                | "duplicate-label"
                | "missing-file"
                | "missing-font"
                | "overfull-box"
                | "underfull-box"
                | "budget-exceeded"
                | "limit-exceeded"
                | "stopped"
                | "internal";
            column?: number;
            construct?: string;
            file: string;
            line: number;
            message: string;
            severity: "error"
            | "warning"
            | "info";
        }[];
        face: TextFace;
        measure: number;
        renderer: MathRenderer
        | null;
        reported: Set<string>;
        setInlines: (inlines: readonly Inline[], at: SourceRef) => HList;
    }

    Hierarchy (View Summary)

    Index
    diagnostics: {
        code?:
            | "syntax"
            | "unsupported"
            | "undefined-command"
            | "undefined-environment"
            | "undefined-reference"
            | "duplicate-label"
            | "missing-file"
            | "missing-font"
            | "overfull-box"
            | "underfull-box"
            | "budget-exceeded"
            | "limit-exceeded"
            | "stopped"
            | "internal";
        column?: number;
        construct?: string;
        file: string;
        line: number;
        message: string;
        severity: "error"
        | "warning"
        | "info";
    }[]
    face: TextFace

    The surrounding text face, resolved. Math is set in MathJax's own faces; this one is here only to supply the x-height and the size that turn ex into points.

    measure: number

    The text width the display is centred in and the number is flush against.

    renderer: MathRenderer | null

    The renderer, injected the way CompileOptions.fonts is and for the same reason: createMathRenderer() is async and compile() is not, so construction happens outside the engine. null when the caller supplied none — which is a diagnostic the moment a document actually contains math, and costs a math-free document nothing.

    reported: Set<string>

    Latched so a document with two hundred formulas and no renderer produces one diagnostic rather than two hundred identical ones — the same mechanism LayoutContext.missingFaces uses for an absent font.

    setInlines: (inlines: readonly Inline[], at: SourceRef) => HList

    Inlines to a horizontal list, so the number is shaped the way all text is.