LatexParser class final
Parses LaTeX math into a MathNode tree.
The parser never throws for bad input (unless
ParseOptions.throwOnError is set): unknown commands become
ErrorNodes, input cut off at the end becomes IncompleteNodes and
incomplete flags, and every problem is recorded as a Diagnostic.
Constructors
- LatexParser(String input, {ParseOptions options = const ParseOptions(), MacroTable? macros})
-
Creates a parser for
input. Pass a sharedmacrostable to keep\gdef/\newcommanddefinitions across formulas.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → ParseOptions
-
Options.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → SourceText
-
The normalized source.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
) → ParseResult - Parses the whole input.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
newMacroTable(
) → MacroTable - A macro table preloaded with the built-in macros.
-
suggestCommand(
String name, Iterable< String> known) → String? -
The known command closest to
name(at most two edits for longer names, one for short ones; swapped neighbours count as one), or null when nothing is close.