LaTeX-OCR

LaTeX-OCR

โ˜… 4.2 ๐Ÿ”– 4000 saves ๐Ÿ’ฐ Free Academic WritingGitHub

LaTeX-OCR (pix2tex) is an open-source tool that converts images of mathematical formulas into LaTeX code, using a Vision Transformer model trained for the image-to-markup task. Point it at a screenshot or photo of an equation and it returns the LaTeX source you can paste straight into a document, paper or notebook. It can be used from the command line, through a graphical interface that captures screenshots for you, or as a Python library and API. The project has gathered more than 16,000 stars on GitHub, with its latest updates in 2025.

Overview

Retyping complex equations by hand is slow and error-prone, and general OCR tools struggle with mathematical notation. pix2tex was trained specifically on rendered formulas, so it understands fractions, integrals, superscripts and the rest of the LaTeX vocabulary. Install it with pip and the model checkpoints download automatically. The CLI converts image files or clipboard contents; the GUI (launched as latexocr) lets you snip a region of your screen and immediately see the rendered prediction via MathJax, with the LaTeX copied to your clipboard. It runs locally on your own machine, so formulas from unpublished work never leave your computer.

Key Features

  • Converts images of math formulas into ready-to-paste LaTeX code
  • Vision Transformer model trained specifically for equation recognition (im2latex)
  • Command-line tool for image files and clipboard input
  • GUI with screenshot capture and live MathJax rendering of predictions
  • Usable as a Python library or API for integration into other tools
  • Runs fully locally; model checkpoints download automatically on first use

๐Ÿ’ณ Pricing

LaTeX-OCR is completely free and open source under the MIT license. There are no accounts or paid tiers.

Who Is It For

LaTeX-OCR is for students, researchers and technical writers who regularly move formulas from PDFs, slides or photos into LaTeX documents, and for developers adding equation recognition to note-taking or publishing tools.

๐Ÿš€ Visit LaTeX-OCR Official Site

๐Ÿšฉ Report an issue