math2latex

Convert handwritten mathematics to latex.

Powered by Handwritten Mathematics Recognizer - easy and abstracted way to recognize handwritten mathematics in a browser or in a web view.

Handwritten Digit Recognizer

Draw a single digit on a canvas on the left.

Handwritten Expression Recognizer

Draw a mathematical expression on the canvas below.

Make sure that your symbols do not overlap and that they are written in one part.

Recognizes:
  • digits: \(0, 1, 2, 3, 4, 5, 6, 7, 8, 9\)
  • operators: \((, ), +, -, \times, \div, \sqrt, =, .\)
  • relations: \(**, *^*, *_*, \frac{*}{*}, \sqrt{*}\)

Usage

The recognition is done through the handwritten digit recogniser which takes a canvas as an input and returns a corresponding latex code. You can download the recognition module from the NPM and import it into your application. It is embeddable in any browser and web view.

Implementation

The codebase consists of Python and TensorFlow scripts producing trained models used by the recognizers implemented in TypeScript to recognise a digit or an expression handwritten on an HTML canvas. Optionally, the package provides a functionality for a user to handwrite mathematics on an HTML canvas.

Future Work and Contribution

The future development includes extending the number of symbols that are recognisable by the system to alphanumeric and other mathematical symbols as well as further improvements in the accuracy of symbol and relation identification. If you are interested in contributing then check out the project repo.