Math-Convert: Local Image-to-LaTeX

by giacolees
5
4
3
2
1
Score: 35/100
New Plugin

Description

This plugin has not been manually reviewed by Obsidian staff. Convert image regions to LaTeX formulas with local, offline AI inference.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Math-Convert: Local Image-to-LaTeX

Snap a photo of any equation. Get clean LaTeX. Never leave Obsidian.

Math-Convert runs a full AI model directly on your machine — no cloud, no subscription, no data leaving your device. Photograph a textbook, screenshot a paper, or paste from your clipboard, and within seconds you have publication-ready LaTeX to drop straight into your notes.

Perfect for formula sketching. FormulaNet is a compact 20 M-parameter model — small enough to run entirely in WebAssembly on a single thread. That tight architecture is what makes it ideal for a fast sketch-to-LaTeX workflow: draw or photograph a rough formula, get the LaTeX back in seconds, and keep writing. No GPU, no server, no waiting.


Demo

Demo


Why Math-Convert?

Retyping equations is tedious and error-prone. Online converters are slow, require accounts, and send your work to someone else's server. Math-Convert is different:

  • Fully offline after the first download — the model runs locally via WebAssembly
  • Privacy-first — your images never leave your machine
  • Zero friction — lives right inside Obsidian, no tab-switching required
  • Instant on repeat use — the model is cached after the first run (~100 MB, one-time)

How it works

Math-Convert embeds FormulaNet, a 20 M-parameter vision-to-sequence model, and runs it locally using @huggingface/transformers over WebAssembly. The model is fetched from Hugging Face on first use and cached automatically — every subsequent conversion is instant and requires no internet connection.

The deliberately small parameter count is a feature, not a limitation. Larger OCR models demand a GPU or a cloud backend; FormulaNet fits entirely in WASM on a single thread, which is exactly what Obsidian's renderer provides. The tradeoff is that it excels at the core sketching use-case — clean, isolated formulas — rather than dense multi-formula pages.


Usage

  1. Open the sidebar — click the ribbon icon or run Open Math-Convert sidebar from the command palette.
  2. Load an image — drag and drop, click Browse, or paste directly from your clipboard.
  3. Select your formula — draw a rectangle around the region you care about. Skip this to convert the whole image.
  4. Click Detect formula — the first run downloads the model with a progress bar; after that it's instant.
  5. Use your LaTeX — hit Copy and paste it anywhere in your vault.

Settings

Setting Default Description
Model ID alephpi/FormulaNet Hugging Face model ID. Swap in any compatible VisionEncoderDecoder checkpoint to experiment with alternative models.

Installation

Community plugin

Once the plugin is approved in Obsidian's community catalog, install it from Settings -> Community plugins -> Browse and search for Math-Convert.

From source

git clone https://github.com/giacolees/obsidian-ligthweightMathConvert
cd obsidian-ligthweightMathConvert
npm install
npm run build

Copy (or symlink) the repo folder into your vault's .obsidian/plugins/math-convert/, then enable it under Settings → Community plugins.


Development

npm run dev   # watch mode — rebuilds main.js on every change
npm run build # type-check + production build
npm run lint  # run linting checks (ESLint)

Releasing to Obsidian Community Plugins

  1. Bump the version with npm version patch (or minor / major).
  2. Push the commit and the Git tag to GitHub.
  3. Let the GitHub release workflow attach manifest.json, main.js, and styles.css to the tagged release.
  4. Submit the repository to the Obsidian community plugin list, or update your existing listing with the new release.

License

MIT