Expand description
Headless structural math editor core: the host sends commands, reads values, and typesets itself.
Structs§
- Caret
Path - A caret position that survives serialization and editor rebuilds.
- Document
- A whole document, the unit of persistence and of the clipboard, see the README for its JSON shape.
- Editor
- A headless structural math editor that never typesets, keeps no history, and has no callbacks.
- Host
BoxEntry - A host box the caret would have crossed under
HostBoxPolicy::Enter. - Host
Object - Placement of one host box in the rendered fragment.
- Input
Context - Facts a keymap needs to interpret the next key.
- Menu
Item - One row the host renders.
- Menu
View - The rows and state of the open menu, its anchor rectangle comes from
Editor::render. - Metrics
- Size of the whole typeset fragment in points.
- Outcome
- What a command did.
- Point
- A point in points (scaled points divided by 65536), y grows down from the surface’s top left.
- Rect
- A rectangle in points,
(x, y)is its top left corner with y growing down. - Render
Output - Everything the host paints on top of the typeset fragment.
- Selection
- A selection between two carets in the same sequence.
- Snapshot
- Everything needed to put an editor back into a previous state, the host keeps its own undo stack.
- Source
- LaTeX for the typesetter plus the spans that map it back to the document.
- SpanMap
- Opaque byte ranges from document elements into
Source::tex, in export order. - Stale
Source - A
crate::Sourceexported at another revision or by another editor. - Step
- One step down the tree: the child at
nodein the current sequence, then itsslot. - Symbol
- A leaf token plus its math class for editing heuristics.
- Under
Over Spec - Spec for inserting an under or over construct.
Enums§
- Command
- An editor command.
- Deco
- Decoration drawn between an under or over label and its base.
- Dir
- A movement direction.
- Document
Error - A rule broken by a document.
- Edge
- An edge of the whole formula.
- ExitDir
- A direction in which the caret leaves the formula.
- Frac
Style - Fraction rendering style.
- Host
BoxPolicy - How horizontal motion treats host boxes.
- Mark
- Accent mark type.
- Math
Class - Math atom classification used by editing heuristics.
- Matrix
Env - Matrix environment type.
- Menu
Item Kind - What committing a row does.
- NodeDoc
- The serialized form of one node.
- Path
Error - Why a path does not address a caret position in the current document.
- Repair
- One change
Document::repairmade. - Restore
Error - Why
Editor::restorerefused a snapshot. - Script
Slot - Script slot selector.
- Side
- A side relative to a matrix row or column, or the side a host box is approached from.
- Slot
- A named slot of a structure.
- Variant
- Font or text variant.
Constants§
- DOCUMENT_
VERSION - The current serialized document format version.
- MAX_
DEPTH - Deepest allowed slot nesting, sized so a document stays under serde_json’s recursion limit of 128.
- MAX_
HOST_ TOKEN - Largest host box token, since TeX reads the
Nof\hostbox{N}as an integer of at most 2^31 - 1.