An offline LaTeX formula editor that offers real-time preview with customizable rendering engines (KaTeX/MathJax). It includes features like click-to-insert LaTeX elements, clipboard export, and image export (SVG, PNG, JPG). Designed for both ease of use and offline-first functionality, the editor is lightweight and deployable on local servers.
-
Real-time Preview: Instantly render LaTeX formulas with KaTeX or MathJax.
-
Click-to-insert: Easily insert LaTeX elements at the cursor.
-
Export Options: Export formulas as SVG, PNG, JPG, or copy formulas as PNG to the clipboard.
-
Minimalistic Interface: Clean and simple UI for focused editing.
-
Cross-Platform: Works locally by opening
index.htmlin any modern browser. -
Customizable: Lightweight structure for easy modifications.
Live demo available at: https://latex.moskensoap.xyz
You can easily run the LaTeX Formula Editor by following these simple steps:
-
Option 1: Clone with Git
Open a terminal and run the following command:
git clone https://github.com/moskensoap/latex-formula-editor.git
Then, navigate to the project folder and open
index.htmlin any modern browser. -
Option 2: Download ZIP
Go to the repository page, click "Code" > "Download ZIP", and extract the files. After extracting, simply double-click
index.htmlto open it in your browser.
git clone https://github.com/moskensoap/latex-formula-editor.git
cd latex-formula-editor
npm installnpm run start# Build for Windows (64-bit)
npm run build:win64
# Build for Windows (32-bit)
npm run build:win32
# Build for macOS (Intel)
npm run build:mac
# Build for macOS (Apple Silicon)
npm run build:mac-arm
# Build for Linux (64-bit)
npm run build:linuxcd distFind the appropriate executable for your platform in the generated folder (e.g., latexformula-win32-x64) and run the application.
Enjoy!
docker run --restart unless-stopped -d -p 8080:80 --name latex-formula-editor moskensoap/latex-formula-editor:latestAccess via:
http://localhost:8080 (local)
http://<your-ip>:8080 (remote)
If you need a custom Docker image, or if the architecture of the provided Docker Hub image does not suit your needs, you can build your own Docker image by following these steps:
- To start:
cd docker
docker compose up -d- To stop:
docker compose downAccess via:
http://localhost:8080 (local)
http://<your-ip>:8080 (remote)
Powered by LaTeX-OCR by @lukas-blecher.
- To start:
cd docker/pix2tex
docker compose up -d- To stop:
docker compose downAccess via:
http://localhost:8501 (local)
http://<your-ip-address>:8501 (remote)
This project bundles:
-
MathJax: https://github.com/mathjax/MathJax
-
html2canvas: https://github.com/niklasvh/html2canvas
You can update KaTeX or MathJax by replacing the corresponding folders. If folder structure changes, adjust paths in the HTML accordingly.
We are grateful to these excellent open-source projects for making this editor possible.
We welcome your suggestions, questions, and feature ideas! Feel free to open an issue to start a discussion or report a problem.