Image2LaTeX

repository·master·Indexed 23 days ago

https://github.com/blaisewang/img2latex-mathpix

A desktop application that uses the MathpixOCR API to convert images of equations, text, and tables into LaTeX, MathML, or TSV formats. Supports macOS, Windows, and Linux.

Tokens
882
Snippets
2
Records
10
Agent score
79%

What's inside img2latex-mathpix

  1. How to use Image2LaTeX for OCR

    master

    Image2LaTeX allows you to convert images of formulas or text into LaTeX or MathML formats.

    Workflow:

    1. Use your operating system's default screenshot tool (e.g., Shift (⇧)-Control (⌃)-Command (⌘)-4 on macOS) to capture the formula or text.
    2. Once captured, press the Space key to preview the screenshot.
    3. Press the Enter key to send the OCR request to the MathpixOCR API.

    Platform-specific execution:

    • macOS: Run Image2LaTeX.app.
    • Windows: Run Image2LaTeX.exe.
    • Linux: Run the binary located in the Image2LaTeX-linux/bin/ directory using the command:
    ./Image2LaTeX
    ./Image2LaTeX
  2. Use Image2LaTeX for OCR

    master

    The typical workflow for converting equations or text from an image to LaTeX/MathML is:

    1. Capture a screenshot: Use your operating system's default screenshot tool (e.g., Shift (⇧)-Control (⌃)-Command (⌘)-4 on macOS).
    2. Preview: Press the Space key to preview the captured screenshot.
    3. Process: Press the Return or Enter key to send the OCR request directly to the MathpixOCR API.
  3. Configure MathpixOCR API credentials

    master

    To use Image2LaTeX, you must provide API keys from the MathpixOCR Console. Note that these are distinct from Snip account credentials.

    Setting credentials:

    • First Run: Enter your API keys (without single quotes) when the application starts for the first time.
    • macOS/Windows: Open the Preferences menu and select API Credentials to modify keys.
    • Linux: Right-click anywhere within the application to open the Preferences dialog.
  4. Change API credentials

    master

    If you need to update your API keys after the initial setup, use the following platform-specific methods:

    • macOS and Windows: Click the application's menu bar icon and navigate to Preferences > API Credentials.
    • Linux: Right-click anywhere inside the application window to open the Preferences panel.
  5. Run Image2LaTeX on different platforms

    master

    Follow these instructions to launch the application based on your operating system:

    • macOS: Run Image2LaTeX.app.
    • Windows: Run Image2LaTeX.exe.
    • Linux: Run the binary located at Image2LaTeX-linux/bin/Image2LaTeX or use the command line:
    ./Image2LaTeX
  6. Fix MathML formatting for Microsoft Word

    master
    When using MathML output for Microsoft Word, you may encounter issues with brackets and parentheses around matrices or fractions. To resolve this, click the Professional option from the right-hand side dropdown menu of the equation within the application.