doc-parsing / cli
pix2tex (LaTeX-OCR)
Capability: pix2tex (LaTeX-OCR)
Use it when
- You have a screenshot or image of a printed math formula from a paper and need the corresponding LaTeX source instead of retyping it symbol by symbol.
- Generic OCR engines mangle equations into garbage characters and you need a model trained specifically to emit LaTeX markup from formula images.
What it solves
Not the fit when
- Handwritten formulas (only partial, experimental support per the README TODO)
- Very large or zoomed-in high-resolution images, which degrade accuracy despite the resolution-prediction preprocessing step
- General text OCR of full documents; it targets isolated formula crops
- Unverified use: the README warns to always double check the predicted LaTeX
- full-page document ocr
- pdf table extraction
- scanned document layout parsing
- speech or audio transcription
Install
pip install "pix2tex[gui]" (requires Python 3.7+ and PyTorch; model checkpoints download automatically)
Invoke
Run `latexocr` for the GUI screenshot workflow (predicted LaTeX is rendered and copied to clipboard), or `pix2tex` on the CLI for images from disk or clipboard; in Python: from pix2tex.cli import LatexOCR; LatexOCR()(Image.open('img.png'))Alternatives
No reviewed alternatives recorded yet.