Navigation Menu

Skip to content

etihwnad/mathslax

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MathSlax

A typesetting solution for all of your Slack chat needs.

Dependencies

Requires Java, Node.JS and NPM.

$ sudo apt-get install nodejs npm default-jre
$ sudo apt-get install openjdk-7-jdk # unless a JDK is already installed

Set up

$ cd mathslax
$ cp config.js.example config.js
# edit config.js to use your Slack API integration token
$ make install
$ SERVER=myhostname.com PORT=9999 node server.js

If you prefer, you can also set the server and port in config.js

Set up an outgoing web hook in Slack pointing to myhostname.com:9999/typeset (don't forget the /typeset). Use math! as the prefix.

Usage

In the Slack channel with the web hook configured, you should be able to typeset equations by starting your message with math!. For example, math! x^2 * sin(x) would cause the mathslax bot to comment with a link to a typeset image of x^2 * sin(x).

Note About Debian/Ubuntu node vs nodejs

The npm install step can produce hard to diagnose errors on Debian derived systems (such as Ubuntu 12.x and later). The binary /usr/bin/node was renamed to /usr/bin/nodejs and many packages in npm do not expect this. You can either create a link yourself from /usr/bin/node -> /usr/bin/nodejs or use one of the other various solutions out there (including attempting to use the package nodejs-legacy). Good luck!

About

Slack plugin to render math using MathJax

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.9%
  • Dockerfile 7.2%
  • Shell 4.5%
  • Pug 2.2%
  • Makefile 1.2%