Turn Handwritten or Photographed Math into LaTeX
By Laxmi SolutionsUpdated 2 min read
Typing a long formula in LaTeX on a phone is slow. Recognising it is faster: write it with your finger, photograph it from a book or whiteboard, or pick a screenshot, and get LaTeX you can edit. This guide shows how with Snap math in Lemma, which does the recognition on the device, and how to get accurate results.
Three ways in
| Mode | Best for |
|---|---|
| Draw | Writing a formula with your finger or a stylus. |
| Camera | Printed or handwritten formulas on paper or a whiteboard; crop to the formula after taking the photo. |
| Image | Screenshots and photos already on the phone, such as a formula in a PDF or on a slide. |
Open a document in Lemma and tap Snap math on the bar above the keyboard. The first time, the recognition model (about 40 MB) downloads once from Google Play. After that it works offline.
Step by step
- Pick Draw, Camera or Image, and give Snap math one formula.
- Tap Recognize. The LaTeX appears with a rendered preview next to it.
- Fix anything that was misread right in the text box; the preview updates as you edit.
- Insert it at the cursor, copy it, or export the formula as a PNG image.
For example, a handwritten quadratic formula comes back as x = \frac{-b \pm \sqrt{b^{2} - 4ac}}{2a}, ready to place inside an equation environment.
Tips for accurate recognition
- One formula at a time. Crop tightly; surrounding text confuses any recogniser.
- Dark ink on light paper, in even light, with the camera square to the page.
- Make superscripts and subscripts clearly smaller and raised or lowered.
- Tell similar shapes apart: close the top of a 4, cross a 7 or a z if you usually do, and give x and × different shapes.
- Write fraction bars longer than the numerator and denominator.
Check the result
Recognition is good but not perfect, so read the preview before inserting. The usual slips are between look-alike characters:
| Looks like | Check for |
|---|---|
| 1, l, | | Digit one, letter l, or \vert |
| 0, O, o | Zero, capital O, or lowercase o |
| x, × | The variable x or \times |
| Dot | Multiplication \cdot, or a decimal point |
| Brackets | Matching pairs, and \left( ... \right) for tall content |
Your images stay on your phone
Many image-to-LaTeX tools upload your picture to a server. Snap math recognises the formula on the device, so photos of your notes, exams or unpublished work are never sent anywhere. Snap math is part of Lemma Pro, a one-time purchase.
Prefer typing? The LaTeX math symbols cheat sheet lists the commands you need most.