README file from
GithubLaTeX Input
English | 中文
An LaTeX formula input panel for Obsidian — with a visual editor powered by MathLive and a quick-insert symbol palette. No default hotkeys — bind your own in Settings → Hotkeys to avoid conflicts with your existing setup.
A LaTeX formula input plugin for Obsidian. Click symbols from the palette to auto-generate source, preview live, and insert into the current note; also supports screen-selection OCR and clipboard-image OCR so you can type formulas faster.
✨ Features
- 🎯 Click-to-insert symbols — 10 categories, ~250 symbols. Click to insert at the cursor.
- 👀 Live preview — WYSIWYG-style rendering as you type.
- ⌨️ Editable source — Tweak the raw LaTeX directly in the source box.
- 📸 Screenshot OCR — press the bound hotkey (or click the camera ribbon icon) to drag-select a region, auto-converted to LaTeX.
- 📋 Clipboard OCR — press the bound hotkey (or click the clipboard ribbon icon) to read the image currently in your clipboard.
- 🕘 History — Persisted automatically; reload any past formula to keep editing.
- 🌗 Dark-mode friendly — Follows your Obsidian theme automatically.
- 📦 Zero external dependencies — MathLive is bundled into
main.js.
🚀 Getting Started
Option 1: Install from the Community Plugin Store (recommended)
- In Obsidian, open Settings → Community plugins.
- Make sure Community plugins are enabled (toggle on top of the page).
- Click Browse and search for
LaTeX Input. - Click Install, then go back to Installed plugins and enable LaTeX Input.
If the store search doesn't show it (region/cache issues), open the plugin page directly: https://obsidian.md/plugins?id=latex-input
Option 2: Download from Releases
- Go to Releases and download
main.js,manifest.json, andstyles.css. - In your vault, create the path:
.obsidian/plugins/latex-input/ - Drop the three files into that folder.
- Settings → Community plugins → Installed plugins → enable LaTeX Input.
Option 3: Build from source
git clone <this-repo>
cd latex-input
npm install
npm run build
The build output main.js lives at the repo root. Deploy it together with manifest.json and styles.css to .obsidian/plugins/latex-input/.
⌨️ Hotkeys
No default hotkeys — to avoid conflicts with your existing setup, you'll need to bind them yourself:
- Settings → Hotkeys in Obsidian
- Search for
LaTeX Input - Bind any of the 6 commands:
- Insert LaTeX formula (inline / display)
- Screenshot OCR (inline / display)
- Clipboard OCR (inline / display)
- Optional in-panel hotkeys:
Ctrl + Enterto insert,Escto close.
The σ icon in the left ribbon always opens the panel — no hotkey required.
https://github.com/user-attachments/assets/f74008e1-38ad-44da-a97d-2ad2be519e83
📸 Screenshot OCR
https://github.com/user-attachments/assets/da416d31-9908-4a8f-b58d-0f04f32faa7d
Press the bound hotkey for screenshot OCR (inline / display):
- When screen capture is available — a full-screen overlay appears; drag to select the formula region; release to auto-OCR and insert.
- When screen capture is unavailable — it falls back to clipboard polling with a small floating hint in the bottom-right; any screenshot you take is auto-detected, auto-OCR'd, and auto-inserted.
Press the bound hotkey for clipboard OCR to read the image currently in your clipboard.
First-time use requires configuring your OCR service in the plugin settings (API endpoint, key, model name).
🧩 Panel Layout
🛠 Customizing Symbols
Open symbols.ts and add entries in this format:
{ display: "∑", insert: "\\sum_{i=1}^{n} " }
display— the text shown on the buttoninsert— the LaTeX source inserted on click- To place the caret at a specific position, use
{cursor}insideinsert
npm run build # rebuild
📁 Project Structure
latex-input/
├── manifest.json # Obsidian plugin metadata
├── main.js # Build output (loaded at runtime)
├── main.ts # Entry source
├── symbols.ts # Symbol library (10 categories, ~250 entries)
├── styles.css # Styles
├── package.json # npm config
├── esbuild.config.mjs # Build script (esbuild + MathLive virtual module)
├── tsconfig.json # TypeScript config
└── versions.json # Obsidian version compatibility map
📄 License
Copyright © 2026 Sun · Licensed under GPL-3.0