mathtex-editor-core
mathtex-editor-core is the framework-neutral engine behind
mathtex-editor, a structural WYSIWYG math
editor powered by mathtex.
The crate owns the editable math tree, caret, selection, and editing state. Applications send
Commands to an Editor and implement the Host trait to connect typesetting, repainting, content
changes, and boundary events to their UI environment.
Features
- Structural editing for fractions, scripts, radicals, delimiters, accents, matrices, large operators, under/over constructs, and math styles
- Keyboard and pointer navigation across nested structures
- Selection, structural clipboard fragments, and host-managed undo/redo entries
- LaTeX export with source spans matched against
mathtex-irlayout output - Renderer-neutral caret, selection, placeholder, and contextual-menu geometry
- A host boundary that works with native, web, or framework-specific front ends
Architecture
Command -> Editor -> structural tree -> LaTeX + source spans
-> Host::typeset -> mathtex IR
-> RenderOutput
The model is the canonical document. LaTeX is generated as a render and interchange output; this crate does not parse arbitrary LaTeX back into editor state.
For the default browser-style keyboard mapping and backslash command catalog, use
mathtex-editor-keymap.
Licensed under either Apache-2.0 or MIT.