@mathjax/src
    Preparing search index...

    Interface ChtmlMtableNTD<N, T, D>

    The ChtmlMtable interface for the CHTML Mtable wrapper

    interface ChtmlMtableNTD<N, T, D> {
        _breakCount: number;
        bbox: BBox;
        bboxComputed: boolean;
        childNodes: ChtmlWrapper<N, T, D>[];
        cLines: number[];
        container: ChtmlWrapper;
        containerI: number;
        cSpace: number[];
        cWidths: (string | number)[];
        data: TableData;
        dom: N[];
        factory: ChtmlWrapperFactory;
        fframe: boolean;
        fLine: number;
        font: ChtmlFontData;
        frame: boolean;
        fSpace: number[];
        hasLabels: boolean;
        isTop: boolean;
        itable: N;
        labels: N;
        lineBBox: LineBBox[];
        node: MmlNode;
        numCols: number;
        numRows: number;
        parent: ChtmlWrapper;
        pWidth: number;
        pwidthCells: [ChtmlWrapper<N, T, D>, number][];
        removedStyles: StringMap;
        rLines: number[];
        rSpace: number[];
        stretch: ChtmlDelimiterData;
        styleData: StyleData;
        styles: Styles;
        tableRows: ChtmlMtrNTD<N, T, D>[];
        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;
        addChildren(parents: N[]): void;
        addEm(list: number[], n?: number): string[];
        addLeftBorders(bbox: BBox): void;
        addMiddleBorders(bbox: BBox): void;
        addRightBorders(bbox: BBox): void;
        adjustColumnWidths(width: number): void;
        adjustWideTable(): void;
        breakColumn(i: number, W: number, type: string): void;
        breakTop(mrow: ChtmlWrapper, _child: ChtmlWrapper): ChtmlWrapper;
        breakToWidth(_W: number): void;
        canStretch(direction: string): boolean;
        char(n: number): string;
        computeBBox(bbox: BBox, recompute?: boolean): void;
        computeLineBBox(i: number): LineBBox;
        convertLengths(list: string[]): number[];
        copySkewIC(bbox: BBox): void;
        core(): ChtmlWrapper;
        coreMO(): CommonMo<
            N,
            T,
            D,
            CHTML<N, T, D>,
            ChtmlWrapper<N, T, D>,
            ChtmlWrapperFactory<N, T, D>,
            ChtmlWrapperClass<N, T, D>,
            ChtmlCharOptions,
            ChtmlVariantData,
            ChtmlDelimiterData,
            ChtmlFontData,
            typeof ChtmlFontData,
        >;
        coreRScale(): number;
        createChtmlNodes(parents: N[]): N[];
        createMo(
            text: string,
        ): CommonMo<
            N,
            T,
            D,
            CHTML<N, T, D>,
            ChtmlWrapper<N, T, D>,
            ChtmlWrapperFactory<N, T, D>,
            ChtmlWrapperClass<N, T, D>,
            ChtmlCharOptions,
            ChtmlVariantData,
            ChtmlDelimiterData,
            ChtmlFontData,
            typeof ChtmlFontData,
        >;
        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;
        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,
        ): [ChtmlWrapper<N, T, D>, ChtmlWrapper<N, T, D>];
        getChildAlign(_i: number): string;
        getChildLineBBox(child: ChtmlWrapper, 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<ChtmlCharOptions>;
        getVerticalPosition(i: number, align: string): number;
        getWidth(): number;
        getWrapWidth(i: number): number;
        handleAttributes(): void;
        handleBorders(): void;
        handleColor(): void;
        handleHref(parents: N[]): N[];
        handlePWidth(): void;
        handleScale(): void;
        handleSpace(): 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;
        markUsed(): void;
        mmlNode(
            kind: string,
            properties?: PropertyList,
            children?: MmlNode[],
        ): MmlNode;
        mmlText(text: string): TextNode;
        naturalWidth(): number;
        percent(m: number): string;
        processIndent(
            indentalign: string,
            indentshift: string,
            align?: string,
            shift?: string,
            width?: number,
        ): [string, number];
        px(m: number, M?: number): string;
        recordPWidthCell(cell: ChtmlWrapper, i: number): void;
        remapChars(chars: number[]): number[];
        setChildPWidths(recompute: boolean, w?: number, clear?: boolean): boolean;
        setColumnPWidths(): void;
        setIndent(chtml: N, align: string, shift: number): void;
        setScale(chtml: N, rscale: number): N;
        standardChtmlNodes(parents: N[]): N[];
        stretchColumn(i: number, W: number): void;
        stretchColumns(): void;
        stretchRows(): void;
        text(text: string): T;
        toCHTML(parents: N[]): void;
        toEmbellishedCHTML(parents: N[]): boolean;
        unicodeChars(text: string, name?: string): number[];
        updateHDW(
            cell: ChtmlWrapper,
            i: number,
            j: number,
            align: string,
            H: number[],
            D: number[],
            W: number[],
            M: number,
        ): number;
        walkTree(func: (node: ChtmlWrapper, data?: any) => void, data?: any): any;
        wrap<TT = ChtmlWrapper<N, T, D>>(node: MmlNode, parent?: ChtmlWrapper): 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: ChtmlWrapper<N, T, D>[]

    The children of this node

    cLines: number[]

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

    container: ChtmlWrapper

    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

    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)

    font: ChtmlFontData = null

    Easy access to the font parameters

    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

    itable: N

    The inner table DOM node

    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: ChtmlWrapper = null

    The parent of this node

    pWidth: number

    The full width of a percentage-width table

    pwidthCells: [ChtmlWrapper<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: ChtmlDelimiterData = ...

    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: ChtmlMtrNTD<N, T, D>[]

    The rows of the table

    variant: string = ''

    The mathvariant for this node

    Accessors

    • get breakCount(): number

      Returns number

      The number of breakpoints in the node

    • 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

    • 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

    • 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

      • n: number

        A unicode code point to be converted to a character className reference.

      Returns string

      The className for the character

    • 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

      • 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 CHTML 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

    • 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

      • 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

    • Parameters

      • chtml: N

        The HTML node whose indentation is to be adjusted

      • align: string

        The alignment for the node

      • shift: number

        The indent (positive or negative) for the node

      Returns void

    • Create the standard CHTML elements 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 tree for the wrapped node's output

    • 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: ChtmlWrapper

        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