Skip to main content

Crate mathtex_editor_core

Crate mathtex_editor_core 

Source
Expand description

Headless structural math editor core: the host sends commands, reads values, and typesets itself.

Structs§

CaretPath
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.
HostBoxEntry
A host box the caret would have crossed under HostBoxPolicy::Enter.
HostObject
Placement of one host box in the rendered fragment.
InputContext
Facts a keymap needs to interpret the next key.
MenuItem
One row the host renders.
MenuView
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.
RenderOutput
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.
StaleSource
A crate::Source exported at another revision or by another editor.
Step
One step down the tree: the child at node in the current sequence, then its slot.
Symbol
A leaf token plus its math class for editing heuristics.
UnderOverSpec
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.
DocumentError
A rule broken by a document.
Edge
An edge of the whole formula.
ExitDir
A direction in which the caret leaves the formula.
FracStyle
Fraction rendering style.
HostBoxPolicy
How horizontal motion treats host boxes.
Mark
Accent mark type.
MathClass
Math atom classification used by editing heuristics.
MatrixEnv
Matrix environment type.
MenuItemKind
What committing a row does.
NodeDoc
The serialized form of one node.
PathError
Why a path does not address a caret position in the current document.
Repair
One change Document::repair made.
RestoreError
Why Editor::restore refused a snapshot.
ScriptSlot
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 N of \hostbox{N} as an integer of at most 2^31 - 1.