Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Math Tablet

This directory contains the source code for the Math Tablet, a project of Public Invention.


Math Tablet seeks to make a useful math assistant for stylus-based tablets and other hand-written input means. Our goal is have a genius looking over our shoulder and magically helping as we do math the way we normally do, including drawing diagrams, performing calculations, and producing proofs.


Math Tablet was create by David Jeschke, and he is the Invention Coach and "Benevelont Dictator For Now" of this project. The project is currently licensed under the Affero GPL. We are actively seeking volunteers and contributors.

Current Screenshot

Our current code can accept handwriting and put togetether simple mathematical assertions to perform calculations.

Screen Shot 2019-04-25 at 12 49 54 PM

Running locally

Step 1: Create a MyScript developer account to obtain application keys for their handwriting recognition services. After you create an account, MyScript will send you an email message with an applicationKeyand an hmacKey.

Step 2: Install node if you don't have it already.

Step 3: Create a credentials and configuration directory:

cp -r ~/math-tablet/server/config-dir/ ~/.math-tablet

Edit ~/.math-tablet/credentials.json to insert your MyScript applicationKey and hmacKey.

If you don't have Mathematica, then edit ~/.math-tablet/config.json to remove the "mathematica" section.

Step 4: Create a directory to store user notebooks. In your HOME directory, create a subdirectory math-tablet-usr. Then, create a subdirectory of that directory named after a user, e.g. ~/math-tablet-usr/david. The following command should do the trick on Mac and Linux:

mkdir -p ~/math-tablet-usr/$USER

Step 4: Install dependencies, build, test, and run math-tablet:


Step 5: Open a browser to localhost:3000 and enjoy!

Mathematica Integration

We are currently experimenting with integrating with Mathematica. A goal is to be able to render Mathematica plots. We currently have integration at the most basic level of expression evaluation working, although it is fragile.

For this to work, you need to have a running local WolframKernel, which probably means you need a Mathematica license. This must be started with the script

./scripts/start_wolfram_kernel which must be begun before the server is started. This executes an init file, and produces a simple log.

This work is preliminary and actively under development. There is not good way to kill the kernel except by hand at present.



The scripts/go command runs the following bash scripts:


The source code is divided into two subdirectories, client and server.

The server is an express server, so it would be helpful to be familiar with that. Along with express, we use Pug for HTML templating and Stylus for CSS simplification.

You need to restart the express server if you modify any of the web-server JavaScript files. You do not need to restart the server if you modify PUG HTML (server/views/.pug) or Stylus CSS (server/public/stylesheets/.styl) files. Just refresh the browser page.

Static assets to be served by the web server are placed in the server/publicdirectory.

Running Mocha tests

There is a set of Mocha unit tests in server/test subdirectory. To run them:

# -or-
cd server; npm test
You can’t perform that action at this time.