parseAndLayout method
Parse and lay out latex, returning a DisplayList.
displayMode — true (default) for display/block style ($$...$$);
false for inline/text style ($...$).
This is a synchronous, CPU-bound call. For long formulas, use compute with ratexParseAndLayoutInIsolate:
final dl = await compute(
ratexParseAndLayoutInIsolate,
(latex: tex, displayMode: true),
);
Implementation
DisplayList parseAndLayout(String latex, {bool displayMode = true}) =>
_ffi.parseAndLayout(latex, displayMode: displayMode);