Skip to content

A Menu Bar app for macOS and GUI app for WIndows/Linux that allows you to take a screenshot of equations and generate latex code of that equation

Notifications You must be signed in to change notification settings

shanto268/snip2tex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LatexOCR Menu Bar App


This is a simple Menu Bar app for macOS and a simple GUI app for Windows and Linux that allows you to execute LatexOCR, a command-line tool for OCR of math equations.

This would not have been possible if not for the great work by Lukas Blecher's LaTeX OCR Project

Installation

Step 1: Install LatexOCR

Install LatexOCR by running the following command in your preferred conda env:

pip install 'pix2tex[gui]'

Step 2: Clone this repository

Clone this repository to your local machine by running the following command:

git clone https://github.com/shanto268/snip2tex.git

Step 3: Install the required libraries

macOS

Install the required library by running the following command:

pip install rumps

Step 4: Set the path to LatexOCR

Open the snip2tex.py file and set the command variable to the path of the latexocr command on your system.

Path of latexocr can be found by which latexocr (macOS and Linux) or by searching for the location of the (get-command latexocr.exe).Path file (Windows)

Step 5: Run the app

Run the app by running the following command:

python snip2tex.py

Usage

macOS

After running the app, it should create a Menu Bar Tool - tool and all you need to do is press Snip2TeX and then a new window (left figure below) would pop up.

Click on the Snip button or press Option+S and then it would act like a screenshot feature (blue region below) similar to what happens when you press Cmd+Shift+4 (middle figure below)

but now whatever feature you cover should be an equation and once you are done snapping it will generate the corresponding LaTeX code that you can simply copy (right figure below)

Windows and Linux

After running the app, a simple GUI window will appear with a "Snip2TeX" button and an output area. Press the "Snip2TeX" button to execute the LatexOCR command, and the output will be displayed in the output area. To close the application, press the "Quit" button.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Menu Bar app for macOS and GUI app for WIndows/Linux that allows you to take a screenshot of equations and generate latex code of that equation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages