Math.tex, SelectableMath.tex, MathStyle, MathOptions, FontOptions,
MathSize, TexParserSettings, Strict, OnErrorFallback,
FlutterMathException, ParseException and BuildException keep their
flutter_math_fork shapes, backed by val_latex. Every command KaTeX 0.19 and
flutter_math_fork define is defined in val_latex too, except
flutter_math_fork’s \cursor.
Mapped to ParseOptions. Unfinished input is an error, as in flutter_math_fork.
TexParserSettings.throwOnError
Ignored: errors go to onErrorFallback.
onErrorFallback
Called with a ParseException holding the first error’s message. The default shows the message as selectable text.
SelectableMath.tex
A Math inside its own SelectionArea, or the enclosing one. Copying gives the LaTeX source.
textScaleFactor
Overrides the platform text scale.
texBreak() is not provided, and the compat Math.tex does not wrap. In the
native API display formulas wrap by themselves, and MathText wraps inline
formulas with the text.
The compat layer exists to get you running; the native API
(package:val_latex_flutter/val_latex_flutter.dart) is where wrapping, taps,
highlights, keyboard navigation, theming and streaming live.
MathText(r'Area $\pi r^2$ …', streaming:true) // text with formulas
Differences you will notice:
Errors render in place, in red, instead of replacing the whole formula;
pass onError to replace it.
Unfinished input (\frac{a) is an error in Math.tex and MathSpan,
as in flutter_math_fork. For text still arriving, use
MathText(streaming: true), or ParseOptions(streaming: true) on one
formula, and it renders what exists.
\text{…} is shaped as a run by Flutter’s text engine: Arabic, Indic
scripts and emoji work.
More LaTeX:\tag, align, gather, multline,
\DeclareMathOperator, \multicolumn, chemistry, units and more — see
Supported LaTeX.
Metrics follow Latin Modern Math, not the KaTeX fonts, so sizes differ
slightly; see Differences from KaTeX.