The object used to handle collapsable content
Values used to compute complexities
The MmlFactory for this visitor
ProtectednodeHolds the mapping from node kinds to visitor funcitons
The options for this visitor
StaticdefaultAttributes to include on every element of a given kind
StaticOPTIONSThe options for handling collapsing
StaticrenameMmlNode kinds to replace with other names
StaticvariantsTranslations for the internal mathvariants
ProtectedchildrenThe node whose children complexities are to be added
The sum of the complexities, plus child complexity for each one
ProtectedgetThe 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)
ProtectedgetCreate the list of data-mjx-* attributes
The node whose data list is to be generated
The final class attribute list
ProtectedgetThe node whose kind is needed
The MamlML node name for that kind
ProtectedsetThe 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
ProtectedsetThe class attribute list
The name for the data-mjx-name attribute
The value of the attribute
ProtectedvisitCan'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
ProtectedvisitCan'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
ProtectedvisitFor 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
ProtectedvisitFor 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
ProtectedvisitFor 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
ProtectedvisitCan'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)
ProtectedvisitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
ProtectedvisitPhantom 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
ProtectedvisitFor 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
ProtectedvisitFor 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
ProtectedvisitFor 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
ProtectedvisitFor 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
ProtectedvisitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
ProtectedvisitFor 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
ProtectedvisitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
ProtectedvisitThe node whose complixity is being computed
True if the complexity is to be saved or just returned
The complexity of the node
ProtectedvisitFor 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 StaticmethodVisitor 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