Math Input
A formula-authoring field backed by MathLive. WYSIWYG + LaTeX source modes, with optional virtual keyboard. Emits LaTeX, MathML, or a typed record.
Overview
About
MathInput wraps MathLive's <math-field> web component.
LaTeX shortcuts auto-convert as you type (for example a/b renders as a fraction).
Toggle Mode="MathInputMode.Source" to show raw LaTeX, or set
ShowVirtualKeyboard="true" to surface the on-screen keyboard.
Basic
Basic
Type on the left; the LaTeX and MathML tabs update live on the right.
Mode
Mode: Visual vs Source
Visual renders glyphs; Source exposes the raw LaTeX buffer.
Current: Visual
Virtual keyboard
Virtual keyboard
Focus either field to reveal the on-screen keyboard.
v1 note: MathLive only supports a floating keyboard. Both placement values currently resolve to "appears on focus, floats over content".
BelowField
Floating (focus-activated)
States
States
Forms
Form integration
Binds like any other field and participates in DataAnnotations validation.
Events
Events
Focus the editor, type, blur. The last 10 events appear below.
No events yet.
Dual output
Dual output (LaTeX + MathML)
Both outputs update live; store LaTeX as the canonical value.
LaTeX
MathML
Guidance
Do / Don't
Store LaTeX as the canonical form
Validate formulas on save
string.IsNullOrWhiteSpace(Value) for Required
fields, and consider server-side parsing if the formula must be
mathematically valid.