Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (44 sloc) 1.85 KB

Maths Server In Node

math-server.js is a NodeJS script that implements a simple socket server. This server accepts LaTeX math expressions, and processes them using MathJax and the Speech-Rule-Engine to produce spoken math using Aural CSS.

Note that this is early, experimental code, i.e. there is no support, and if it breaks, you get to keep both pieces.

Setup Instructions

Install node, npm and nvm

First some terminology:

Node Version Manager
Node Package Manager
Node executable
  1. Install node and npm. You need a newer node than the default node (nodejs) installed in Ubuntu, use nvm (Node Version Manager) to manage the node installation. See file nvm-setup in this directory for instructions.
  2. Copy the nvm-setup file to your home directory as .nvm-setup, and make sure it runs correctly by executing:
. .nvm-setup
  1. If the above runs without errors, add the line
. .nvm-setup 

to your .bash_profile.

  1. Make sure that your environment is set up to find the right node executable:
which node 

in bash should show that the node executable is found under $HOME/.nvm/....

Install Dependencies


npm install  

in $EMACSPEAK_DIR/js/node to install dependencies.

Test the server at the shell

node math-server.js

Then, from a different shell window, connect to the server.

nc localhost 5000
enter: \frac{a+b}{c+d}

If all goes well, you’ll see an S-expression printed out. Hit C-d to close client and server.

Connect From Within Emacspeak

  • M-x load-library emacspeak-maths
  • M-x emacspeak-maths-start — start the server/client.
  • Invoke the Maths Navigator AKA emacspeak-maths muggle using key s-SPC — here s- means press the Windows key.
  • Read the docs and profit — see info node emacspeak-maths in the emacspeak manual.