Skip to content

alvinosh/mathovi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mathovi

Mathovi turns plain text into math. Type semicolon-separated expressions and get typeset equations instantly.

It ships in two forms that share the same parser:

  • Desktop app (Tauri + Svelte) — a live editor with an instant equation preview rendered by MathJax. No LaTeX install required. Export to PNG, SVG, .tex, or copy the LaTeX.
  • CLI — the original tool: render expressions to a PNG via latex + dvipng.

example

Syntax

a = 5 / 5 + 5;

b = sqrt(5);

(x^n - y^n) = (x-y) * (x^(n-1) + x^(n-2)*y + ... + x*y^(n-2) + y^(x-1));
  • Separate expressions with ;
  • Operators: + - * / ^ =
  • Functions: sqrt, sin, cos
  • ... renders an ellipsis

Project layout

mathovi/
├── core/        # shared lexer / parser / evaluator (text -> LaTeX), no UI
├── cli/         # original command-line tool (LaTeX -> PNG via latex/dvipng)
├── src-tauri/   # Tauri desktop app (Rust backend + commands)
└── frontend/    # Svelte + Vite UI (live MathJax preview + export)

A Cargo workspace ties core, cli, and src-tauri together; core is the single source of truth for the language.

Desktop app

Prerequisites

  • Rust and the Tauri v2 system deps (on Windows 11, WebView2 is already installed).
  • Node.js 20+ (for the Svelte/Vite frontend).
  • The Tauri CLI: cargo install tauri-cli --version "^2" --locked

Run (from the project root)

npm --prefix frontend install
cargo tauri dev

cargo tauri dev starts the Vite dev server and opens the app with hot reload.

Build a release bundle

cargo tauri build

Produces the executable and installers (NSIS .exe / WiX .msi on Windows) under target/release/bundle/.

Regenerating the icon

The app icon is generated from app-icon.png:

node tools/gen-icon.mjs        # writes app-icon.png
cargo tauri icon app-icon.png  # writes src-tauri/icons/*

CLI

The CLI still renders to a PNG via LaTeX, so it needs LaTeX (latex and dvipng) installed.

cargo build --release -p mathovi-cli
# binary: target/release/mathovi
mathovi --input <input_file> --output <output.png>
mathovi --string "a = sqrt(5)" --output out.png
mathovi -s "y = sin(x)^2" -o out.png --open

Plans

  • Support for simple calculus expressions, derivatives / integrals
  • Support for linear algebra expressions, vectors / matrices

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors