@mathjax/src
    Preparing search index...

    Interface SvgMtableNTD<N, T, D>

    The SvgMtable interface for the SVG Mtable wrapper

    interface SvgMtableNTD<N, T, D> {
        _breakCount: number;
        bbox: BBox;
        bboxComputed: boolean;
        childNodes: SvgWrapper<N, T, D>[];
        cLines: number[];
        container: SvgWrapper;
        containerI: number;
        cSpace: number[];
        cWidths: (string | number)[];
        data: TableData;
        dom: N[];
        dx: number;
        factory: SvgWrapperFactory;
        fframe: boolean;
        fLine: number;
        font: SvgFontData;
        frame: boolean;
        fSpace: number[];
        hasLabels: boolean;
        isTop: boolean;
        labels: N;
        lineBBox: LineBBox[];
        node: MmlNode;
        numCols: number;
        numRows: number;
        parent: SvgWrapper;
        pWidth: number;
        pwidthCells: [SvgWrapper<N, T, D>, number][];
        removedStyles: StringMap;
        rLines: number[];
        rSpace: number[];
        stretch: SvgDelimiterData;
        styleData: StyleData;
        styles: Styles;
        tableRows: SvgMtrNTD<N, T, D>[];
        utext: string;
        variant: string;
        get adaptor(): DOMAdaptor<N, T, D>;
        get breakCount(): number;
        get containerWidth(): number;
        get fixesPWidth(): boolean;
        get jax(): JX;
        get kind(): string;
        get linebreakOptions(): {
            inline: boolean;
            LinebreakVisitor: null;
            lineleading: number;
            width: string;
        };
        get linebreaks(): Linebreaks<
            N,
            T,
            D,
            CommonOutputJax<N, T, D, WW, WF, WC, CC, VV, DD, FD, FC>,
            WW,
            WF,
            WC,
            CC,
            VV,
            DD,
            FD,
            FC,
        >;
        get metrics(): Metrics;
        addBorderBroken(
            path: number[][],
            color: string,
            style: string,
            t: number,
            i: number,
            parent: N,
            dx: number,
        ): void;
        addBorderSolid(
            path: number[][],
            color: string,
            child: N,
            parent: N,
            dx: number,
        ): void;
        addChildren(parents: N[]): void;
        addEm(list: number[], n?: number): string[];
        addLeftBorders(bbox: BBox): void;
        addMiddleBorders(bbox: BBox): void;
        addRightBorders(bbox: BBox): void;
        addUtext(x: number, y: number, parent: N, variant: string): number;
        adjustColumnWidths(width: number): void;
        adjustWideTable(): void;
        breakColumn(i: number, W: number, type: string): void;
        breakTop(mrow: SvgWrapper, _child: SvgWrapper): SvgWrapper;
        breakToWidth(_W: number): void;
        canStretch(direction: string): boolean;
        charNode(variant: string, C: string, path: string): N;
        computeBBox(bbox: BBox, recompute?: boolean): void;
        computeLineBBox(i: number): LineBBox;
        convertLengths(list: string[]): number[];
        copySkewIC(bbox: BBox): void;
        core(): SvgWrapper;
        coreMO(): CommonMo<
            N,
            T,
            D,
            SVG<N, T, D>,
            SvgWrapper<N, T, D>,
            SvgWrapperFactory<N, T, D>,
            SvgWrapperClass<N, T, D>,
            SvgCharOptions,
            SvgVariantData,
            SvgDelimiterData,
            SvgFontData,
            typeof SvgFontData,
        >;
        coreRScale(): number;
        createMo(
            text: string,
        ): CommonMo<
            N,
            T,
            D,
            SVG<N, T, D>,
            SvgWrapper<N, T, D>,
            SvgWrapperFactory<N, T, D>,
            SvgWrapperClass<N, T, D>,
            SvgCharOptions,
            SvgVariantData,
            SvgDelimiterData,
            SvgFontData,
            typeof SvgFontData,
        >;
        createSvgNodes(parents: N[]): N[];
        drawBBox(): void;
        em(m: number): string;
        embellishedBBox(i: number): LineBBox;
        explicitVariant(
            fontFamily: string,
            fontWeight: string,
            fontStyle: string,
        ): string;
        extendHD(i: number, H: number[], D: number[], M: number): void;
        findContainer(): void;
        firstChild(dom?: N): N;
        fixed(x: number, n?: number): string;
        getAlignmentRow(): [string, number];
        getAlignShift(): [string, number];
        getAlignX(W: number, bbox: BBox, align: string): number;
        getAlignY(
            H: number,
            D: number,
            h: number,
            d: number,
            align: string,
        ): number;
        getAttributeArray(name: string): string[];
        getBBox(save?: boolean): BBox;
        getBBoxHD(height: number): number[];
        getBBoxLR(): number[];
        getBreakNode(bbox: LineBBox): [SvgWrapper<N, T, D>, SvgWrapper<N, T, D>];
        getChildAlign(_i: number): string;
        getChildLineBBox(child: SvgWrapper, i: number): LineBBox;
        getColumnAttributes(name: string, i?: number): string[];
        getColumnHalfSpacing(): number[];
        getColumnWidths(): ColumnWidths;
        getColumnWidthsAuto(swidths: string[]): ColumnWidths;
        getColumnWidthsFixed(swidths: string[], width: number): ColumnWidths;
        getColumnWidthsPercent(swidths: string[]): ColumnWidths;
        getComputedWidths(): number[];
        getEmHalfSpacing(
            fspace: number[],
            space: number[],
            scale?: number,
        ): string[];
        getEqualColumns(width: string): ColumnWidths;
        getEqualRowHeight(): number;
        getFrameSpacing(): number[];
        getLineBBox(i: number): LineBBox;
        getMathMLSpacing(): void;
        getOuterBBox(save?: boolean): BBox;
        getPadAlignShift(side: string): [number, string, number];
        getPercentageWidth(): void;
        getRowAttributes(name: string, i?: number): string[];
        getRowHalfSpacing(): number[];
        getRScale(): number;
        getScale(): void;
        getSpace(): void;
        getStyleData(): void;
        getStyles(): void;
        getTableData(): TableData;
        getTeXSpacing(isTop: boolean, hasSpacing: boolean): void;
        getText(): string;
        getUnbrokenHD(): [number, number];
        getVariant(): void;
        getVariantChar(variant: string, n: number): CharDataArray<SvgCharOptions>;
        getVerticalPosition(i: number, align: string): number;
        getWidth(): number;
        getWrapWidth(i: number): number;
        handleAttributes(): void;
        handleBorder(): void;
        handleColor(): void;
        handleHref(parents: N[]): N[];
        handleId(y: number): number;
        handleScale(): void;
        handleStyles(): void;
        html(type: string, def?: OptionList, content?: (N | T)[]): N;
        invalidateBBox(bubble?: boolean): void;
        isTopEmbellished(): boolean;
        length2em(length: Property, size?: number, scale?: number): number;
        mmlNode(
            kind: string,
            properties?: PropertyList,
            children?: MmlNode[],
        ): MmlNode;
        mmlText(text: string): TextNode;
        naturalWidth(): number;
        pathNode(C: string, path: string): N;
        percent(m: number): string;
        place(x: number, y: number, element?: N): void;
        placeChar(
            n: number,
            x: number,
            y: number,
            parent: N,
            variant?: string,
            buffer?: boolean,
        ): number;
        processIndent(
            indentalign: string,
            indentshift: string,
            align?: string,
            shift?: string,
            width?: number,
        ): [string, number];
        px(m: number, M?: number): string;
        recordPWidthCell(cell: SvgWrapper, i: number): void;
        remapChars(chars: number[]): number[];
        setChildPWidths(recompute: boolean, w?: number, clear?: boolean): boolean;
        setColumnPWidths(): void;
        standardSvgNodes(parents: N[]): N[];
        stretchColumn(i: number, W: number): void;
        stretchColumns(): void;
        stretchRows(): void;
        svg(type: string, def?: OptionList, content?: (N | T)[]): N;
        text(text: string): T;
        toEmbellishedSVG(parents: N[]): boolean;
        toSVG(parents: N[]): void;
        unicodeChars(text: string, name?: string): number[];
        updateHDW(
            cell: SvgWrapper,
            i: number,
            j: number,
            align: string,
            H: number[],
            D: number[],
            W: number[],
            M: number,
        ): number;
        useNode(variant: string, C: string, path: string): N;
        walkTree(func: (node: SvgWrapper, data?: any) => void, data?: any): any;
        wrap<TT = SvgWrapper<N, T, D>>(node: MmlNode, parent?: SvgWrapper): TT;
    }

    Type Parameters

    • N

      The HTMLElement node class

    • T

      The Text node class

    • D

      The Document class

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    Properties

    _breakCount: number = -1

    The cached number of linebreaks

    bbox: BBox

    The bounding box for this node

    bboxComputed: boolean = false

    Whether the bounding box has been computed yet

    childNodes: SvgWrapper<N, T, D>[]

    The children of this node

    cLines: number[]

    The width of columns lines (or 0 if no line for the column)

    container: SvgWrapper

    The parent node of this table (skipping non-parents and mrows)

    containerI: number

    The position of the table as a child node of its container

    cSpace: number[]

    The spacing between columns

    cWidths: (string | number)[]

    The column widths (or percentages, etc.)

    data: TableData

    The bounding box information for the table rows and columns

    dom: N[] = null

    The DOM tree generated for this wrapper

    dx: number = 0

    Offset due to border/padding

    The factory used to create more wrappers

    fframe: boolean

    True if there is a frame or data-frame-styles

    fLine: number

    The size of the frame line (or 0 if none)

    frame: boolean

    True if there is a frame

    fSpace: number[]

    frame spacing on the left and right

    hasLabels: boolean

    True if there are labeled rows

    isTop: boolean

    True if this mtable is the top element, or in a top-most mrow

    labels: N

    The column for labels

    lineBBox: LineBBox[] = []

    Sizes of lines into which the element is broken

    node: MmlNode
    numCols: number

    The number of columns in the table

    numRows: number

    The number of rows in the table

    parent: SvgWrapper = null

    The parent of this node

    pWidth: number

    The full width of a percentage-width table

    pwidthCells: [SvgWrapper<N, T, D>, number][]

    The table cells that have percentage-width content and the column numbers for them

    removedStyles: StringMap = null

    Styles that must be handled directly by the wrappers (mostly having to do with fonts)

    rLines: number[]

    The width of row lines (or 0 if no lone for that row)

    rSpace: number[]

    The spacing between rows

    stretch: SvgDelimiterData = ...

    Delimiter data for stretching this node (NOSTRETCH means not yet determined)

    styleData: StyleData = null

    The padding and border information from the style attribute

    styles: Styles = null

    The explicit styles set by the node

    tableRows: SvgMtrNTD<N, T, D>[]

    The rows of the table

    utext: string = ''

    buffered unknown text

    variant: string = ''

    The mathvariant for this node

    Accessors

    • get containerWidth(): number

      Easy access to the container width

      Returns number

      The container width

    • get fixesPWidth(): boolean

      Returns boolean

      True if children with percentage widths should be resolved by this container

    • get linebreakOptions(): {
          inline: boolean;
          LinebreakVisitor: null;
          lineleading: number;
          width: string;
      }

      Easy access to the linebreak options

      Returns { inline: boolean; LinebreakVisitor: null; lineleading: number; width: string }

      The linebreak options

    Methods

    • Create a dashed or dotted border line with the given width and color

      Parameters

      • path: number[][]

        The points for the border segment

      • color: string

        The color to use

      • style: string

        Either 'dotted' or 'dashed'

      • t: number

        The thickness for the border line

      • i: number

        The side being drawn

      • parent: N

        The parent container

      • dx: number

        The offset of the node

      Returns void

    • Create a solid border piece with the given color

      Parameters

      • path: number[][]

        The points for the border segment

      • color: string

        The color to use

      • child: N

        Insert the border before this child, if any

      • parent: N

        The parent container

      • dx: number

        The offset of the node

      Returns void

    • Adds "em" to a list of dimensions, after dividing by n (defaults to 1).

      Parameters

      • list: number[]

        The array of dimensions (in em's)

      • Optionaln: number

        The number to divide each dimension by after converted

      Returns string[]

      The array of values with "em" added

    • Parameters

      • x: number

        The x-position of the text

      • y: number

        The y-position of the text

      • parent: N

        The container for the text

      • variant: string

        The variant to use for the string

      Returns number

      The computed width of the text

    • Do linebreaking on the cells of a column

      Parameters

      • i: number

        The number of the column to break

      • W: number

        The width to break to

      • type: string

        The column width type (fit, auto, dimen, percentage)

      Returns void

    • Parameters

      • variant: string

        The name of the variant being used

      • C: string

        The hex string for the character code

      • path: string

        The data from the character

      Returns N

      The or node for the glyph

    • Parameters

      • bbox: BBox

        The bounding box to modify (either this.bbox, or an empty one)

      • recompute: boolean = false

        True if we are recomputing due to changes in children that have percentage widths

      Returns void

    • Converts an array of dimensions (with arbitrary units) to an array of numbers representing the dimensions in units of em's.

      Parameters

      • list: string[]

        The array of dimensions to be turned into em's

      Returns number[]

      The array of values converted to em's

    • Set the CSS for a token element having an explicit font (rather than regular mathvariant).

      Parameters

      • fontFamily: string

        The font family to use

      • fontWeight: string

        The font weight to use

      • fontStyle: string

        The font style to use

      Returns string

      The explicit font marker

    • Extend the H and D of a row to cover the maximum height needed by top/bottom aligned items

      Parameters

      • i: number

        The row whose hight and depth should be adjusted

      • H: number[]

        The row heights

      • D: number[]

        The row depths

      • M: number

        The maximum height of top/bottom aligned items

      Returns void

    • Parameters

      • x: number

        The dimension to display

      • n: number = 1

        The number of digits to display

      Returns string

      The dimension with the given number of digits (minus trailing zeros)

    • Parameters

      • H: number

        The total height

      • D: number

        The total depth

      • h: number

        The height to be aligned

      • d: number

        The depth to be aligned

      • align: string

        How to align (top, bottom, center, axis, baseline)

      Returns number

      The y position of the aligned baseline

    • Parameters

      • name: string

        The name of the attribute to get as an array

      Returns string[]

      The array of values in the given attribute, split at spaces (after leading and trailing spaces are removed, and multiple spaces have been collapsed to one).

    • Return the wrapped node's bounding box, either the cached one, if it exists, or computed directly if not.

      Parameters

      • save: boolean = true

        Whether to cache the bbox or not (used for stretchy elements)

      Returns BBox

      The computed bounding box

    • Parameters

      • name: string

        The name of the attribute to get as an array

      • Optionali: number

        Return this many fewer than numCols entries

      Returns string[]

      The array of values in the given attribute, split at spaces, padded to the number of table columns (minus 1) by repeating the last entry

    • Determine the column widths that can be computed (and need to be set). The resulting arrays will have numbers for fixed-size arrays, strings for percentage sizes that can't be determined now, and null for stretchy columns tht will expand to fill the extra space. Depending on the width specified for the table, different column values can be determined.

      Returns ColumnWidths

      The array of widths

    • Parameters

      • fspace: number[]

        The frame spacing to use

      • space: number[]

        The array of spacing values to convert to strings

      • Optionalscale: number

        A scaling factor to use for the sizes

      Returns string[]

      The half-spacing as stings with units of "em" with frame spacing at the beginning and end

    • Get the bounding box for the i-th line (first and last may be part of a surrounding line). Get the bbox from the lineBBox cache, or compute it, as needed.

      Parameters

      • i: number

        The number of the segment whose sizes are to be obtained

      Returns LineBBox

      The bounding box of the specified segment

    • Return the wrapped node's bounding box that includes borders and padding

      Parameters

      • save: boolean = true

        Whether to cache the bbox or not (used for stretchy elements)

      Returns BBox

      The computed bounding box

    • Parameters

      • name: string

        The name of the attribute to get as an array

      • Optionali: number

        Return this many fewer than numRows entries

      Returns string[]

      The array of values in the given attribute, split at spaces, padded to the number of table rows (minus 1) by repeating the last entry

    • Get the spacing using the TeX rules

      Parameters

      • isTop: boolean

        True when this is a top-level embellished operator

      • hasSpacing: boolean

        True when there is an explicit or inherited 'form' attribute

      Returns void

    • Copy RDFa, aria, and other tags from the MathML to the SVG output nodes. Don't copy those in the skipAttributes list, or anything that already exists as a property of the node (e.g., no "onlick", etc.). If a name in the skipAttributes object is set to false, then the attribute WILL be copied. Add the class to any other classes already in use.

      Returns void

    • Add the foreground and background colors (Only look at explicit attributes, since inherited ones will be applied to a parent element, and we will inherit from that)

      Returns void

    • Add an anchor for hrefs and insert hot boxes into the DOM containers

      Parameters

      • parents: N[]

        The HTML nodes in which the output is to be placed

      Returns N[]

      The roots of the HTML tree for the node's output

    • Firefox and Safari don't scroll to the top of the element with an Id, so we shift the element up and then translate its contents down in order to correct for their positioning. Also, Safari will go to the baseline of a element (e.g., when mtextInheritFont is true), so add a text element to help Safari get the right location.

      Parameters

      • y: number

        The current offset of the element

      Returns number

      The new offset for the element if it has an id

    • Parameters

      • type: string

        The tag name of the HTML node to be created

      • def: OptionList = {}

        The properties to set for the created node

      • content: (N | T)[] = []

        The child nodes for the created HTML node

      Returns N

      The generated HTML tree

    • Parameters

      • length: Property

        A dimension (giving number and units) or number to be converted to ems

      • size: number = 1

        The default size of the dimension (for percentage values)

      • scale: number = null

        The current scaling factor (to handle absolute units)

      Returns number

      The dimension converted to ems

    • Parameters

      • x: number

        The x-offset for the element

      • y: number

        The y-offset for the element

      • element: N = null

        The element to be placed

      Returns void

    • Parameters

      • n: number

        The character number

      • x: number

        The x-position of the character

      • y: number

        The y-position of the character

      • parent: N

        The container for the character

      • variant: string = null

        The variant to use for the character

      • buffer: boolean = false

        True to collect unknown characters into one text element

      Returns number

      The width of the character

    • Parameters

      • indentalign: string

        The indentalign to process

      • indentshift: string

        The indentshift to process

      • align: string = ''

        The default alignment for 'auto'

      • shift: string = ''

        The default indentshift for 'auto'

      • width: number = ...

        The container width for relative shifts

      Returns [string, number]

      The alignment and indentation shift (normal and last) for the Mo

    • Parameters

      • m: number

        A number of em's to be shown as pixels

      • M: number = -LENGTHS.BIGDIMEN

        The minimum number of pixels to allow

      Returns string

      The number with units of px

    • Recursively resolve any percentage widths in the child nodes using the given container width (or the child width, if none was passed). Overriden for mtables in order to compute the width.

      Parameters

      • recompute: boolean

        True if we are recomputing due to changes in children

      • w: number = null

        The width of the container (from which percentages are computed)

      • clear: boolean = true

        True if pwidth marker is to be cleared

      Returns boolean

      True if a percentage width was found

    • Create the standard SVG element for the given wrapped node.

      Parameters

      • parents: N[]

        The HTML elements in which the node is to be created

      Returns N[]

      The roots of the HTML trees for the wrapped node's output

    • Parameters

      • type: string

        The tag name of the svg node to be created

      • def: OptionList = {}

        The properties to set for the created node

      • content: (N | T)[] = []

        The child nodes for the created SVG node

      Returns N

      The generated SVG tree

    • Create the HTML for an embellished mo, if this is one.

      Parameters

      • parents: N[]

        The HTML nodes where the output is to be added

      Returns boolean

      True when embellished output is produced, false if not

    • Parameters

      • text: string

        The text to turn into unicode locations

      • name: string = ...

        The name of the variant for the characters

      Returns number[]

      Array of numbers represeting the string's unicode character positions

    • Parameters

      • cell: SvgWrapper

        The cell whose height, depth, and width are to be added into the H, D, W arrays

      • i: number

        The column number for the cell

      • j: number

        The row number for the cell

      • align: string

        The row alignment

      • H: number[]

        The maximum height for each of the rows

      • D: number[]

        The maximum depth for each of the rows

      • W: number[]

        The maximum width for each column

      • M: number

        The current height for items aligned top and bottom

      Returns number

      The updated value for M

    • Parameters

      • variant: string

        The name of the variant being used

      • C: string

        The hex string for the character code

      • path: string

        The data from the character

      Returns N

      The node for the glyph