The object used to handle collapsable content
Values used to compute complexities
The MmlFactory for this visitor
Protected
nodeHolds the mapping from node kinds to visitor funcitons
The options for this visitor
Static
defaultAttributes to include on every element of a given kind
Static
OPTIONSThe options for handling collapsing
Static
renameMmlNode kinds to replace with other names
Static
variantsTranslations for the internal mathvariants
Protected
childrenThe node whose children complexities are to be added
The sum of the complexities, plus child complexity for each one
Protected
getThe node whose attributes are to be produced
The attribute list
The node whose complixity is needed
The complexity of the node (if collapsable, then the collapsed complexity)
Protected
getCreate the list of data-mjx-* attributes
The node whose data list is to be generated
The final class attribute list
Protected
getThe node whose kind is needed
The MamlML node name for that kind
Protected
setThe node whose complixity is being set
The complexity for the node
True if complexity is to be set or just reported
The complexity of the node
Protected
setThe class attribute list
The name for the data-mjx-name attribute
The value of the attribute
Protected
visitCan't really measure annotations, so just use a specific value
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitCan't really measure annotations, so just use a specific value
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
For token nodes, use the content length, otherwise, add up the child complexities
The XMLNode to visit
Any arguments needed by the visitor
Any return value needed for the visitor
Protected
visitFor actions, use the complexity of the selected child
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor enclose, use sum of child complexities plus some for the enclose
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor a fraction, add the complexities of the children and scale by script factor, then add the fraction amount
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitCan't really measure mglyph complexity, so just use a specific value
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node (if collapsable, then the collapsed complexity)
Protected
visitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitPhantom complexity is 0
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor roots, do the sqrt root computation and remove a bit for the root (since it is counted in the children sum but is smaller)
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor semantics, get the complexity from the first child
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor ms, add the complexity of the quotes to that of the content, and use the length of that times the text factor as the complexity
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor square roots, use the child complexity plus the sqrt complexity
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor supscripts and superscripts use the maximum of the script complexities, multiply by the script factor, and add the base complexity. Add the child complexity for each child, and the subsup complexity.
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
Protected
visitFor under/over, get the maximum of the complexities of the under and over elements times the script factor, and that the maximum of that with the base complexity. Add child complexity for all children, and add the underover amount.
The node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
The TextNode to visit
Any arguments needed by the visitor
Any return value needed for the visitor
The XMLNode to visit
Any arguments needed by the visitor
Any return value needed for the visitor
Protected
Static
methodVisitor functions are named "visitKindNode" where "Kind" is replaced by the node kind; e.g., visitTextNode for kind = text.
The node kind whose method name is needed
The name of the visitor method for the given node kind
A visitor pattern that computes complexities within the MathML tree