@mathjax/src
    Preparing search index...

    Interface SpeechMathItem<N, T, D>

    The functions added to MathItem for enrichment

    interface SpeechMathItem<N, T, D> {
        display: boolean;
        generatorPool: GeneratorPool<N, T, D>;
        inputData: OptionList;
        inputJax: InputJax<N, T, D>;
        isEscaped: boolean;
        math: string;
        metrics: Metrics;
        root: MmlNode;
        start: Location<N, T>;
        toMathML: (node: MmlNode, math: MathItem<N, T, D>) => string;
        typesetRoot: N;
        attachSpeech(document: MathDocument<N, T, D>): void;
        clear(): void;
        compile(document: MathDocument<N, T, D>): void;
        convert(document: MathDocument<N, T, D>, end?: number): void;
        detachSpeech(document: MathDocument<N, T, D>): void;
        enrich(document: MathDocument<N, T, D>, force?: boolean): void;
        removeFromDocument(restore: boolean): void;
        render(document: MathDocument<N, T, D>): void;
        rerender(document: MathDocument<N, T, D>, 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<N, T, D>): void;
        unEnrich(document: MathDocument<N, T, D>): void;
        updateDocument(document: MathDocument<N, T, D>): void;
    }

    Type Parameters

    • N

      The HTMLElement node class

    • T

      The Text node class

    • D

      The Document class

    Hierarchy (View Summary)

    Index

    Properties

    display: boolean

    Whether the math is in display mode or inline mode

    generatorPool: GeneratorPool<N, T, D>

    The speech generators for this math item.

    inputData: OptionList

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

    inputJax: InputJax<N, T, D>

    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<N, T>

    The start and ending locations in the document of this expression

    toMathML: (node: MmlNode, math: MathItem<N, T, D>) => string

    The serialization visitor

    typesetRoot: N

    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<N, T, D>

        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

    • 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