myscript-math-web is a web component that offers the possibility to input handwritten mathematical expressions in a HTML5 canvas. The component gets the recognition result in LaTeX, MathML and/or as a symbol tree. It can be integrated in every web application, whatever the JavaScript library you are using. Note that there is no solving component. However, the following features are supported:

  • get the result in MathML, LaTeX or symbol tree,
  • erase a character (scratch-out gesture),
  • undo and redo an action,
  • clear the canvas.

See the API Reference for more information.

In any Math recognition request, an application key and an HMAC key are MANDATORY. They can be obtained in the MyScript Cloud Admin UI.


Try our myscript-math-web demo here and check the source code below:

<!doctype html>
    <meta name="viewport" content="width=device-width, minimum-scale=1.0,
	initial-scale=1.0, user-scalable=no">
    <title>myscript-math-web demo</title>
    <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="../myscript-math-web.html">

    html, body {
        position: absolute;
        height: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    myscript-math-web {
        height: calc(100% - 70px);
<body unresolved>
<template id="app" is="dom-bind">