Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/proffan/snap2latex
A minimalist macOS app to convert a snap of Equation to LaTeX without paying :shrug:
https://github.com/proffan/snap2latex
latex latex-ocr ocr
Last synced: about 1 month ago
JSON representation
A minimalist macOS app to convert a snap of Equation to LaTeX without paying :shrug:
- Host: GitHub
- URL: https://github.com/proffan/snap2latex
- Owner: ProfFan
- Created: 2024-02-14T22:42:16.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T20:01:09.000Z (6 months ago)
- Last Synced: 2024-06-14T21:22:59.915Z (6 months ago)
- Topics: latex, latex-ocr, ocr
- Language: Python
- Homepage:
- Size: 2.17 MB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snap2LaTeX
Snap2LaTeX is a tool that converts a picture of a mathematical equation into a LaTeX code. It uses https://github.com/NormXU/nougat-latex-ocr to recognize the equation and convert it into LaTeX code.
Compared to LaTeX-OCR, Snap2LaTeX is a standalone application that does not require any install. It has a simpler interface and uses MPS by default.
# Usage
Download from [releases](https://github.com/ProfFan/Snap2LaTeX/releases).
Run the application.
The application will start downloading the model. It will take a few minutes.
![](./images/downloading.png)
There will be an icon in the system tray.
![](./images/dock-icon.png)
Click on it and select "Capture" to capture a screenshot of the equation. The application will then recognize the equation and display the LaTeX code. When the processing is in progress, the icon will turn yellow.
| Capture | LaTeX |
| --- | --- |
| ![](./images/latex-img.png) | ![](./images/screenshot.png) |**The LaTeX code will be automatically copied to the clipboard**
| Matrix | Code |
| --- | --- |
| ![](./matrix.png) | ![](./images/array.png) |# Build
```bash
cd standalone_app
pip install -U https://github.com/huggingface/transformers/archive/refs/heads/main.zip
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu -U
pip install -r requirements.txt
pyinstaller Snap2LaTeX.spec
```# Alternatives
- [Mathpix](https://mathpix.com/): Paid service.
- [LaTeX-OCR](https://github.com/lukas-blecher/LaTeX-OCR): Free and Open Source. Slightly more verbose interface.# LICENSE
```
Copyright 2024 Fan Jiang
Copyright 2024 NormXUApache License 2.0
```