@mathjax/src
    Preparing search index...

    Interface MenuMathItem

    The new function for MathItem that adds the context menu

    interface MenuMathItem {
        display: boolean;
        initialID: number;
        inputData: OptionList;
        inputJax: InputJax<HTMLElement, Text, Document>;
        isEscaped: boolean;
        math: string;
        metrics: Metrics;
        root: MmlNode;
        start: Location<HTMLElement, Text>;
        toMathML: (
            node: MmlNode,
            math: MathItem<HTMLElement, Text, Document>,
        ) => string;
        typesetRoot: HTMLElement;
        addMenu(document: MenuMathDocument, force?: boolean): void;
        checkLoading(document: MenuMathDocument): void;
        clear(): void;
        compile(document: MathDocument<HTMLElement, Text, Document>): void;
        complexity(
            document: ComplexityMathDocument<HTMLElement, Text, Document>,
            force?: boolean,
        ): void;
        convert(
            document: MathDocument<HTMLElement, Text, Document>,
            end?: number,
        ): void;
        enrich(
            document: MathDocument<HTMLElement, Text, Document>,
            force?: boolean,
        ): void;
        getMenus(document: MenuMathDocument): void;
        removeFromDocument(restore: boolean): void;
        render(document: MathDocument<HTMLElement, Text, Document>): void;
        rerender(
            document: MathDocument<HTMLElement, Text, Document>,
            start?: number,
        ): void;
        reset(restore?: boolean): void;
        setMetrics(em: number, ex: number, cwidth: number, scale: number): void;
        state(state?: number, restore?: boolean): number;
        typeset(document: MathDocument<HTMLElement, Text, Document>): void;
        unEnrich(document: MathDocument<HTMLElement, Text, Document>): void;
        updateDocument(document: MathDocument<HTMLElement, Text, Document>): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    display: boolean

    Whether the math is in display mode or inline mode

    initialID: number

    The starting collapse ID for this expression

    inputData: OptionList

    Extra data needed by the input or output jax, as needed

    inputJax: InputJax<HTMLElement, Text, Document>

    The input jax used to process the math

    isEscaped: boolean

    Whether this item is an escaped character or not

    math: string

    The string representing the expression to be processed

    metrics: Metrics

    The metric information at the location of the math (the em-size, scaling factor, etc.)

    root: MmlNode

    The internal format for this expression (once compiled)

    start: Location<HTMLElement, Text>

    The start and ending locations in the document of this expression

    toMathML: (node: MmlNode, math: MathItem<HTMLElement, Text, Document>) => string

    The serialization visitor

    typesetRoot: HTMLElement

    The typeset version of the expression (once typeset)

    Methods

    • Converts the expression by calling the render actions until the state matches the end state

      Parameters

      • document: MathDocument<HTMLElement, Text, Document>

        The MathDocument in which the math resides

      • Optionalend: number

        The state to end rerendering at (default = LAST)

      Returns void

    • Removes the typeset version from the document, optionally replacing the original form of the expression and its delimiters.

      Parameters

      • restore: boolean

        True if the original version is to be restored

      Returns void

    • Rerenders an already rendered item and inserts it into the document

      Parameters

      • document: MathDocument<HTMLElement, Text, Document>

        The MathDocument in which the math resides

      • Optionalstart: number

        The state to start rerendering at (default = RERENDER)

      Returns void

    • Reset the item to its unprocessed state

      Parameters

      • Optionalrestore: boolean

        True if the original form should be restored to the document when rolling back a typeset version

      Returns void

    • Sets the metric information for this expression

      Parameters

      • em: number

        The size of 1 em in pixels

      • ex: number

        The size of 1 ex in pixels

      • cwidth: number

        The container width in pixels

      • scale: number

        The scaling factor (unitless)

      Returns void

    • Set or return the current processing state of this expression, optionally restoring the document if rolling back an expression that has been added to the document.

      Parameters

      • Optionalstate: number

        The state to set for the expression

      • Optionalrestore: boolean

        True if the original form should be restored to the document when rolling back a typeset version

      Returns number

      The current state