GithubHelp home page GithubHelp logo

shanto268 / snip2tex Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 0.0 890 KB

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

Python 100.00%
latex macos math mathpix menubar-app latexocr academic-writing linux phd phd-thesis

snip2tex's Introduction

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.

snip2tex's People

Contributors

shanto268 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

snip2tex's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.