myscript-math-web

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.

Demo

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

<!doctype html>
<html>
<head>
    <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">

</head>
<style>
    html, body {
        position: absolute;
        height: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    myscript-math-web {
        height: calc(100% - 70px);
    }
</style>
<body unresolved>
<template id="app" is="dom-bind">
    <myscript-math-web
        applicationkey='22eda92c-10af-40d8-abea-fd4093c17d81'
        hmackey='a1fa759f-b3ce-4091-9fd4-d34bb870c601'
        host='webdemo.myscript.com'
        >
    </myscript-math-web>
</template>
</body>
</html>