@mathjax/src
    Preparing search index...

    Interface MenuMathDocument

    The properties needed in the MathDocument for context menus

    interface MenuMathDocument {
        _actionPromises: Promise<void>[];
        _readyPromise: Promise<any>;
        adaptor: DOMAdaptor<HTMLElement, Text, Document>;
        document: Document;
        inputJax: InputJax<HTMLElement, Text, Document>[];
        math: MathList<HTMLElement, Text, Document>;
        menu: Menu;
        mmlFactory: MmlFactory;
        options: MENU_OPTIONS;
        outputJax: OutputJax<HTMLElement, Text, Document>;
        processed: BitField;
        renderActions: RenderList<HTMLElement, Text, Document>;
        toMML: (node: MmlNode) => string;
        webworker: WorkerHandler<HTMLElement, Text, Document>;
        get kind(): string;
        actionPromises(): Promise<void[]>;
        addMenu(): this;
        addRenderAction(id: string, ...action: any[]): void;
        assistiveMml(): this;
        attachSpeech(): this;
        checkLoading(): boolean;
        clear(): this;
        clearMathItemsWithin(
            containers: ContainerList<HTMLElement>,
        ): MathItem<HTMLElement, Text, Document>[];
        clearPromises(): void;
        compile(): Promise<void> | MenuMathDocument;
        compileAction(
            action?: boolean,
            item?: MathListItem<HTMLElement, Text, Document>,
            recompile?: MathItem<HTMLElement, Text, Document>[],
        ): Promise<void> | MenuMathDocument;
        compileError(math: MathItem<HTMLElement, Text, Document>, err: Error): void;
        compileMath(math: MathItem<HTMLElement, Text, Document>): void;
        complexity(): this;
        concat(list: MathList<HTMLElement, Text, Document>): this;
        convert(math: string, options?: OptionList): HTMLElement | MmlNode;
        convertPromise(
            math: string,
            options?: OptionList,
        ): Promise<HTMLElement | MmlNode>;
        done(): Promise<void>;
        enrich(): this;
        enrichError(
            doc: EnrichedMathDocument<HTMLElement, Text, Document>,
            math: EnrichedMathItem<HTMLElement, Text, Document>,
            err: Error,
        ): void;
        findMath(_options?: OptionList): this;
        getMathItemsWithin(
            elements: ContainerList<HTMLElement>,
        ): MathItem<HTMLElement, Text, Document>[];
        getMetrics(): this;
        getWebworker(): void;
        recompileAction(
            action: boolean,
            recompile: MathItem<HTMLElement, Text, Document>[],
            i?: number,
        ): void | Promise<void>;
        removeFromDocument(_restore?: boolean): this;
        removeRenderAction(id: string): void;
        render(): MenuMathDocument;
        renderPromise(): Promise<MenuMathDocument>;
        rerender(start?: number): this;
        rerenderPromise(start?: number): Promise<MenuMathDocument>;
        reset(options?: ResetList): this;
        savePromise(promise: Promise<any>): void;
        speechError(
            doc: SpeechMathDocument<HTMLElement, Text, Document>,
            math: SpeechMathItem<HTMLElement, Text, Document>,
            err: string,
        ): void;
        state(state: number, restore?: boolean): this;
        typeset(): Promise<void> | MenuMathDocument;
        typesetAction(
            action?: boolean,
            item?: MathListItem<HTMLElement, Text, Document>,
        ): Promise<void> | MenuMathDocument;
        typesetError(math: MathItem<HTMLElement, Text, Document>, err: Error): void;
        updateDocument(): this;
        whenReady(action: () => any): Promise<any>;
    }

    Hierarchy (View Summary)

    Index
    _actionPromises: Promise<void>[]

    The render action promise list

    _readyPromise: Promise<any>

    Promise for the current typeset or conversion action (used to chain the promise-based calls so they don't overlap).

    adaptor: DOMAdaptor<HTMLElement, Text, Document>

    The DOM adaptor for the document

    document: Document

    The document managed by this MathDocument

    inputJax: InputJax<HTMLElement, Text, Document>[]

    The list of input jax for the document

    math: MathList<HTMLElement, Text, Document>

    The list of MathItems for this document

    menu: Menu

    The menu associated with this document

    mmlFactory: MmlFactory

    The MathML node factory for the internal MathML representation

    options: MENU_OPTIONS
    outputJax: OutputJax<HTMLElement, Text, Document>

    The output jax for the document

    processed: BitField

    The bit-field used to tell what steps have been taken on the document (for retries)

    renderActions: RenderList<HTMLElement, Text, Document>

    The list of render actions

    toMML: (node: MmlNode) => string

    Type Declaration

      • (node: MmlNode): string
      • Parameters

        • node: MmlNode

          The node to be serializes

        Returns string

        The serialization of the node

    webworker: WorkerHandler<HTMLElement, Text, Document>

    The webworker handler for the document

    • Returns Promise<void[]>

    • Add context menus to the MathItems in the MathDocument

      Returns this

      The MathDocument (so calls can be chained)

    • Parameters

      • id: string
      • ...action: any[]

      Returns void

    • Add assistive MathML to the MathItems in the MathDocument

      Returns this

      The MathDocument (so calls can be chained)

    • Attach speech to the MathItems in the MathDocument

      Returns this

      The MathDocument (so calls can be chained)

    • Checks if there are files being loaded by the menu, and cancels the typesetting if so.

      Returns boolean

      True if we need to wait for extensions

    • Compile action that handles retryAfter() calls.

      Parameters

      • action: boolean = true

        True when called as a renderAction

      • item: MathListItem<HTMLElement, Text, Document> = ...

        The MathListItem to begin with

      • recompile: MathItem<HTMLElement, Text, Document>[] = []

        Array of MathItems to be rerendered (e.g., with forward references)

      Returns Promise<void> | MenuMathDocument

      A promise for restarting, otherwise void

    • Produce an error using MmlNodes

      Parameters

      • math: MathItem<HTMLElement, Text, Document>

        The MathItem producing the error

      • err: Error

        The Error object for the error

      Returns void

    • Parameters

      • math: MathItem<HTMLElement, Text, Document>

        The item to compile

      Returns void

    • Perform complexity computations on the MathItems in the MathDocument

      Returns this

      The MathDocument (so calls can be chained)

    • Perform enrichment on the MathItems in the MathDocument

      Returns this

      The MathDocument (so calls can be chained)

    • Set up the worker handler for this document

      Returns void

    • If any were added to the recompile list, compile them again

      Parameters

      • action: boolean

        True when called as a renderAction

      • recompile: MathItem<HTMLElement, Text, Document>[]

        Array of MathItems to be rerendered (e.g., with forward references)

      • i: number = 0

        The entry in the recompile list to start at

      Returns void | Promise<void>

      A promise for restarting, otherwise void

    • Parameters

      • _restore: boolean = false

      Returns this

    • Parameters

      • id: string

      Returns void

    • Parameters

      • start: number = STATE.RERENDER

      Returns this

    • Parameters

      • promise: Promise<any>

      Returns void

    • Parameters

      • doc: SpeechMathDocument<HTMLElement, Text, Document>

        The MathDocument for the error

      • math: SpeechMathItem<HTMLElement, Text, Document>

        The MathItem causing the error

      • err: string

        The error message being processed

      Returns void

    • Parameters

      • state: number
      • restore: boolean = false

      Returns this

    • Typeset action that handles retryAfter() calls.

      Parameters

      • action: boolean = true

        True when called as a renderAction

      • item: MathListItem<HTMLElement, Text, Document> = ...

        The MathList item to start with

      Returns Promise<void> | MenuMathDocument

      The current MathDocument (for chaining)

    • Produce an error using HTML

      Parameters

      • math: MathItem<HTMLElement, Text, Document>

        The MathItem producing the error

      • err: Error

        The Error object for the error

      Returns void

    • Parameters

      • action: () => any

      Returns Promise<any>