If you write maths in LaTeX, an AI that turns a screenshot of an equation into code can save a lot of retyping. Two free, open-source options you can run on your own PC are pix2tex (LaTeX-OCR) and TexTeller. They do the same basic job but differ in training data, features and how you run them.
At a glance
| pix2tex (LaTeX-OCR) | TexTeller |
|---|
Licence | MIT | Apache 2.0 |
Latest PyPI release (at time of writing) | 0.1.4, 18 Jan 2025 | 1.0.2, 21 Apr 2025 |
Python | 3.7+ (README) | 3.10+ (PyPI) |
Install | pip install "pix2tex[gui]"
| uv pip install texteller
|
Desktop screenshot GUI | Yes (latexocr) | No; browser web demo (texteller web) |
Handwritten formulas | Not listed | Yes (TexTeller 3.0) |
Formula detection in pages | No | Yes, separate detection model |
API server | Streamlit demo + API, Docker | Ray Serve server, Docker |
Training data and accuracy claims
pix2tex's README says it uses formulas gathered from sources such as Wikipedia and arXiv, plus the im2latex-100k dataset, rendered in many fonts. It reports a BLEU score of 0.88 and token accuracy of 0.60 on its own test set.
TexTeller says its current 3.0 model was trained on 80 million image-formula pairs, and its README directly compares this with the roughly 100K dataset used by LaTeX-OCR, claiming "stronger generalization abilities and higher accuracy". That's the TexTeller developers' own claim rather than an independent result, but the much larger training set is a meaningful difference on paper.
What each one can read
pix2tex is built for images of individual maths formulas. Its README advises against zooming in too far, because the model works best with smaller images, and says to double-check results carefully.
TexTeller 3.0, released in June 2024 according to its changelog, added support for scanned images, handwritten formulas and mixed English and Chinese formulas, plus OCR of printed English and Chinese text. An earlier update added paragraph recognition, although the README notes this can only recognise content, not restore a document's structure. TexTeller also has a separate formula detection model and a Python API for it, useful if you need to find equations within a larger page.
If handwritten notes or full pages are part of your workflow, TexTeller has the clearer feature list.
Ease of use
pix2tex has the friendlier everyday workflow. After installing with pip install "pix2tex[gui]", running latexocr opens a small GUI: take a screenshot, see the result rendered with MathJax, and the LaTeX is copied to your clipboard. There's also a pix2tex command-line tool that reads images from disk or the clipboard. We cover it step by step in our guide to converting equations to LaTeX with pix2tex.
TexTeller is command-line and browser based. Its README suggests installing uv, then uv pip install texteller. You run texteller inference on an image file, or texteller web to open a demo at http://localhost:8501 in your browser.
GPU use and serving
pix2tex's README asks you to install PyTorch first, following PyTorch's own instructions.
TexTeller's README says CUDA users may need to install onnxruntime-gpu with uv pip install texteller[onnxruntime-gpu]. Its texteller launch command starts an API server using Ray Serve on port 8000 by default, with options for the number of replicas, CPU cores and GPUs per replica, and an option to run inference with ONNX Runtime. You can set GPUs per replica to a fraction to share one GPU between replicas - handy if you want a shared formula-recognition service for a small team.
Training your own model
Both projects document training. pix2tex uses pix2tex[train] and a config file, and needs XeLaTeX, ImageMagick with Ghostscript and Node.js to generate training images. TexTeller uses texteller[train], an example dataset folder and accelerate launch train.py.
Which should you choose?
Choose pix2tex if you mainly snip printed equations from PDFs or slides and want a simple screenshot-to-clipboard tool.
Choose TexTeller if you need handwritten formulas, scanned pages, mixed Chinese and English, formula detection or a GPU-backed API server.
For whole documents rather than individual formulas, our best PDF to Markdown tools for local RAG guide is a better starting point.