ScriptMeasurer class

Script Measurer — Handles a^b (Superscript) and a_b (Subscript).

Supports:

  • Single superscript/subscript.
  • Simultaneous sub/superscripts (e.g., x^{2}_{i}, parsed as a nested structure).

Uses MathStyle state machine to determine script font size:

  • DISPLAY/TEXT -> SCRIPT (0.7x).
  • SCRIPT -> SCRIPT_SCRIPT (0.5x).
  • SCRIPT_SCRIPT -> SCRIPT_SCRIPT (does not shrink further).
Implemented types

Constructors

ScriptMeasurer()

Properties

handledNodeTypes Set<Type>
The set of node types this measurer can handle.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

measure({required LatexNode node, required RenderContext context, required NodeLayout measureNode(LatexNode, RenderContext), required NodeLayout measureGroup(List<LatexNode>, RenderContext)}) NodeLayout
Measures a node and returns its layout.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited