@mathjax/src
    Preparing search index...

    The class for determining if a subtree can be collapsed

    Index
    collapse: CollapseFunctionMap = ...

    The type-to-function mapping for semantic types

    The current node

    The current complexity

    The newly computed complexity

    complexity: ComplexityVisitor

    The complexity object containing this one

    cutoff: TypeRole<number> = ...

    The cutt-off complexity values for when a structure of the given type should collapse

    marker: TypeRole<string> = ...

    These are the characters to use for the various collapsed elements (if an object, then semantic-role is used to get the character from the object)

    NOCOLLAPSE: number = 10000000

    A constant to use to indicate no collapsing

    • Parameters

      • node: MmlNode

        The node to check if its child is collapsible

      • n: number

        The position of the child node to check

      • m: number = 1

        The number of children node must have

      Returns MmlNode

      The child node that was collapsed (or null)

    • Check if a node should be collapsible and insert the maction node to handle that. Return the updated complexity.

      Parameters

      • node: MmlNode

        The node to check

      • complexity: number

        The current complexity of the node

      Returns number

      The revised complexity

    • Check if the complexity exceeds the cutoff value for the type

      Parameters

      • node: MmlNode

        The node to check

      • complexity: number

        The current complexity of the node

      • type: string

        The semantic type of the node

      Returns number

      The revised complexity

    • Parameters

      • node: MmlNode

        The node whose child text is needed

      • id: string

        The (semantic) id of the child needed

      Returns string

      The text of the specified child node

    • Parameters

      • root: MmlNode

        The top of the MathML tree

      • node: MmlNode

        The node to make collapsible by replacing with an maction

      • extra: string[]

        The extra nodes (if any) that need to be included in linked mactions

      Returns void

    • Parameters

      • root: MmlNode

        The root of the MathML tree

      • action: MmlNode

        The maction node that controls the potential group

      • extra: string[]

        The list of extra nodes for this group (if non-empty)

      Returns void

    • Add maction nodes to the nodes in the tree that can collapse

      Parameters

      • node: MmlNode

        The root of the tree to check

      • id: number

        The initial id to use

      • parts: SemanticMap

        The map of ids to extra nodes

      Returns number

      The initial id used

    • Parameters

      • node: MmlNode

        The node to check

      • complexity: number

        The current complexity of the node

      • text: string

        The text to use for the collapsed node

      Returns number

      The revised complexity for the collapsed node

    • Parameters

      • node: MmlNode

        The node whose attribute is to be split

      • id: string

        The name of the data-semantic attribute to split

      Returns string[]

      Array of ids in the attribute split at commas

    • Parameters

      • complexity: number

        The current complexity

      • node: MmlNode

        The node to check

      • n: number

        The position of the child node to check

      • m: number = 1

        The number of children the node must have

      Returns number

      The updated complexity