- Blog /
Mathpix plugin in ONLYOFFICE: turn handwritten formulas and text into editable content
Working with scientific and technical documents often involves complex formulas embedded in images or scans. Rewriting them manually can be slow and error-prone. The Mathpix plugin for ONLYOFFICE solves this problem by converting images into editable LaTeX, text, MathML, or HTML. Read on to learn how it works.
What is Mathpix?
Mathpix is a platform that offers AI-powered tools for scientific writing, including OCR, PDF editing, and collaboration features. One of its core services, Mathpix OCR, extracts text and mathematical expressions from images and scanned documents and converts them into editable code.
Now, this technology is available in ONLYOFFICE through the Mathpix plugin, developed during our plugin development contest. It allows users to extract formulas and handwritten or printed text from images directly within the document editor.
With the Mathpix plugin, you can:
- Upload one or several images at once
- Convert both printed and handwritten formulas into editable formats
- Recognize and extract handwritten text along with mathematical expressions
- Instantly preview recognition results and make edits on the spot
- Choose how to output your content — in LaTeX, plain text, MathML, or HTML
- Insert results directly into your document or copy them with a click
This tool is especially useful for students, educators, researchers, and anyone who regularly works with scientific content.
How to use the plugin
Let’s take a closer look at how the plugin works.
1. Open the Mathpix plugin
Go to the Plugins tab in the ONLYOFFICE Document Editor and click on Mathpix.
2. Enter your API credentials
Click the Settings icon in the plugin interface.
Enter your App ID and App Key. Save the credentials and select your preferred output formats (LaTeX and Text are selected by default).
3. Upload images
Click the upload area to add one or several image files.
4. Recognize content
Click Recognize to process the images. A preview of the recognition result will appear.
5. Edit and choose format
Review the result, make edits if needed, and select your desired output format from the dropdown menu.
6. Insert or copy
Use Insert to add the content to your document, or Copy to paste it elsewhere.
As you can see, the handwritten formula was recognized successfully. You can now continue editing it directly in the document editor.
As an experiment, we also tried recognizing handwritten text. The result was quite good — we found only one typo in the word “answer” and a few punctuation inconsistencies, most likely due to the slightly blurry photo of the notebook page.
How to install the plugin
- Open the ONLYOFFICE Document Editor.
- Go to the Plugins tab and click Plugin Manager in the top toolbar.
- Find Mathpix and click Install.
That’s it — the plugin is ready to use! You can now start working with image-based formulas right inside your ONLYOFFICE editor.
Note: An internet connection is required to use the plugin, as it communicates with the Mathpix API. You’ll also need to register at Mathpix.com to get your API credentials (App ID and App Key).
Make math editing easier with ONLYOFFICE
ONLYOFFICE offers a complete suite for editing documents, spreadsheets, presentations, forms, and PDFs. Whether you work online or offline, on your own or in a team, ONLYOFFICE helps streamline your workflow.
Create a free DocSpace account to work online or download the Desktop Editors for local editing on Windows, Linux, or macOS.
Are you a developer? Add your plugin to the ONLYOFFICE Plugin Marketplace! Contact us via email or drop us a message at @only_office.
Create your free ONLYOFFICE account
View, edit and collaborate on docs, sheets, slides, forms, and PDF files online.