Skip to main content

Crate formulaa

Crate formulaa 

Source

Re-exports§

pub use output::latex;

Modules§

ast
Math AST. A formula is a Row (horizontal sequence of nodes); every editable slot in a structure node is itself a Row, so the cursor can always be described as (path into nested rows, column in that row).
complete
Tab completion for \commands.
editor
Structural editing model. The cursor is a path of (node index, field) pairs from the root row plus a column inside the innermost row — the usual WYSIWYG model for math insets.
from_latex
Read LaTeX math back into the AST — the reverse of output/latex. Two promises, in order:
glyphs
The structural glyph constants — the drawing vocabulary that is not a spelling table: nothing here maps a \name to a meaning or classifies families; each constant is one canonical glyph with one structural role. The spelling/classification layer lives under symbols; render and parse spell their pictures with these names.
input
Host-independent keymap: the single place where keystrokes are mapped onto editor operations. The TUI (crossterm) and the wasm bindings (DOM KeyboardEvent) only translate their native events into Key and dispatch through Editor::input, so the two frontends cannot drift apart.
output
AST -> markup serializers (the AA form itself lives in render/parse).
parse
AA -> AST parser: the inverse of render.rs on canonical output.
render
2D layout engine: AST -> rectangular block of chars with a baseline.
symbols
Every table the format rests on, one concern per file: