TeXterity is a native, offline-first desktop game for learning to type LaTeX used in
graduate mathematics and physics. It is written in Rust with eframe/egui and uses
RaTeX for production parsing, layout, and display-list generation.
The defining interaction is source-linked formula teaching: every pedagogical region
in a rendered prompt retains its canonical byte span. Hovering or keyboard-focusing a
region reveals the exact source fragment that produced it. Grading uses a tutor-owned
syntax tree, so safe syntax variants such as x^2 and x^{2} can be equivalent without
confusing mathematical equivalence with LaTeX fluency.
cargo run -p tutor_app --bin texteritytutor_app is the Cargo workspace package; texterity is the executable and
installed application name.
The application stores progress in the platform data directory. Set
TEXTERITY_DATA_DIR to use an explicit directory for testing or portable operation.
No account, network connection, browser, JavaScript runtime, webview, or system TeX
installation is required.
The dark-first desktop interface opens on one clear action: Choose a lesson. The collapsible left rail provides Learn, Practice, Progress, Reference, Achievements, and Settings; its manual state is remembered, while compact windows use a temporary navigation drawer. Foundation is the first authored curriculum track, and every locked lesson names the prerequisite that unlocks it.
Tutorials keep the authored learning gates but present them as one continuous
workbench: read the combined lesson brief, restore the required source fragment,
then type complete LaTeX beneath the large rendered formula. The formula inspector,
fixed feedback area, and multiline IBM Plex Mono editor remain in stable positions.
Press Ctrl+Enter to check, Ctrl+Shift+Enter to check and continue, or plain
Enter to add a line. See the user guide for the complete
journey and keyboard behavior.
cargo fmt --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-features
cargo doc --workspace --no-deps
python3 tools/generate_builtin_content.py --check
python3 scripts/audit-runtime-boundaries.py
cargo xtask verify --releaseCI executes every benchmark budget and compiles all six libFuzzer targets. See
performance verification, fuzzing, and
release packaging for the corresponding local commands.
The acceptance matrix traces every normative
AT-001 through AT-026 contract to its automated and packaged-host evidence.
See the architecture walkthrough to trace a learner answer from the native input widget through scanning, structural grading, the state reducer, SQLite persistence, and UI feedback. Content authors should start with the content guide.
tutor_core: deterministic game and learning-domain state.tutor_latex: source spans, tutor syntax, macros, grading, diagnostics.tutor_renderer_ratex: the only crate allowed to import RaTeX; its optional themed paint path changes visible default ink without changing layout or mapping.tutor_content: immutable built-in/custom content indexes and validation.tutor_storage: synchronous SQLite repositories and atomic JSON interchange.tutor_app: native presentation, embedded visual assets, and effect execution; it may streamline navigation but cannot redefine domain transitions.xtask: content, corpus, architecture, packaging, and quality gates.
The complete normative product specification is preserved in
latex_typing_game_spec.
MIT. The executable embeds KaTeX math fonts, IBM Plex Sans/Mono interface fonts, and Lucide icons for offline operation. Their upstream licenses and pinned payload details are recorded in THIRD_PARTY_NOTICES.md.
