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

    Interface MathNode

    One set formula — $x^2$ or a whole display — as a rigid horizontal node .

    It is a box, not a sub-list. Everything inside a formula was laid out by MathJax and arrives as self-contained vector; the engine's own box-and-glue model stops at the outside of it. So this node takes part in line breaking exactly as a very wide unbreakable word does, and the page builder positions it exactly as it positions an image — which is what the math work means by "a math run is a box to the page builder".

    width/height/depth are points on the page, and depth is the one that matters. MathJax reports its box in ex relative to the baseline the run sits on (MathGeometry); an ex is a property of the surrounding text font at the surrounding size, so the multiplication happens in layout/math.ts, which is the first place that knows both. Getting it wrong is the failure the math work singles out: inline math a point or two off the baseline looks subtly wrong down a whole paragraph.

    picture is parsed rather than a string because parsing can fail, and a failure has to be reported where a source line is still known. By the time pdf/content.ts paints it, the only remaining question is arithmetic.

    interface MathNode {
        depth: number;
        height: number;
        kind: "math";
        loc: SourceRef;
        picture: SvgDocument;
        source: string;
        width: number;
    }
    Index
    depth: number

    Below the baseline, positive downwards: MathJax's vertical-align, negated.

    height: number

    Above the baseline — MathJax's height minus its depth, not its total.

    kind: "math"

    Where the run was written, so an emission-time failure still names a line.

    picture: SvgDocument

    The MathJax <svg>, parsed. pdf/svg.ts maps its viewBox onto the placed box.

    source: string

    The TeX this was set from — golden dumps and diagnostics read it.

    width: number