Skip to content
Wrapper for calling Mahtpix OCR API to emulate Mathpix Snip Tool
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Mathpix Snip OCR API.workflow/Contents

Mathpix OCR wrapper

This repository includes a Python wrapper for Mathpix OCR API and an Automator workflow to emulate the Mathpix Snip Tool.


Python 3. 3.5 or higher should be sufficient.

In order to grab image from the clipboard, the pillow package is used. Optionally, you can directly parse the path of image by option -i.


Prepare a JSON file named .mathpix_api.json in the same path as the Python script

    "app_key": "xxxxxxxxxxxx",
    "app_id": "xxxxxxxxxxxx"

The values should be those from your Mathpix account. Then try the example

python3 -p --format latex_styled -i example.png


The scripts is only tested on macOS. Meanwhile, when grabing image from the clipboard, the image will be copied as '.temp_eq.png' under the same path as the script. Therefore you have to put the script under the directory you have the writting permission.


Public domain

You can’t perform that action at this time.