@mathjax/src
    Preparing search index...

    Class MmlVisitor<N, T, D>

    The visitor to serialize MathML

    Type Parameters

    • N

      The HTMLElement node class

    • T

      The Text node class

    • D

      The Document class

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    mathItem: MathItem<N, T, D> = null

    The MathItem currently being processed

    nodeHandlers: Map<string, VisitorFunction<MmlNode>> = ...

    Holds the mapping from node kinds to visitor funcitons

    options: OptionList = ...

    The options controlling the serialization

    defaultAttributes: { [kind: string]: PropertyList } = ...

    Attributes to include on every element of a given kind

    rename: PropertyList = ...

    MmlNode kinds to replace with other names

    variants: PropertyList = ...

    Translations for the internal mathvariants

    Methods

    • Convert HTML special characters to entities (&, <, >, ") Convert multi-character Unicode characters to entities Convert non-ASCII characters to entities.

      Parameters

      • value: string

        The string to be made HTML escaped

      Returns string

      The string with escaping performed

    • The generic visiting function: Make the string version of the open tag, properly indented, with it attributes Increate the indentation level Add the childnodes Add the end tag with proper spacing (empty tags have the close tag following directly)

      Parameters

      • node: MmlNode

        The node to visit

      • space: string

        The number of spaces to use for indentation

      Returns string

      The serialization of the given node

    • Parameters

      • node: MmlNode

        The math node to visit

      • space: string

        The number of spaces to use for indentation

      Returns string

      The serialized math element

    • Visitor functions are named "visitKindNode" where "Kind" is replaced by the node kind; e.g., visitTextNode for kind = text.

      Parameters

      • kind: string

        The node kind whose method name is needed

      Returns string

      The name of the visitor method for the given node kind