Is there a way to render LaTEX/MathJax for Slack Chatting client (web or app)?

45

8

I have a workgroup that uses the Slack chatting app/website/destop version to communicate, and the desire to send usable mathematical expressions across to friends is something we'd like to do there. While it doesnt seem like there is any official implementation of LaTeX or a plugin for it there are many ways for DIY integration: enter image description here

I wanted to know how to get LaTeX rendering working on Slack, be it through integrations and/or customization of Slack and/or through web hooking. The only thing I'd prefer not to do is hook out to another website, make the render into a picture, and then hook it back into Slack.

user507974

Posted 2015-10-02T00:16:49.337

Reputation: 696

Answers

26

I made a small script that installs MathJax in Slack's desktop client (basically the same solution as goatandsheep's, but with some Electron hacking). No server needed, supports both inline and display math, and equations can be edited.

https://github.com/fsavje/math-with-slack

Math in Slack

Fredrik Savje

Posted 2015-10-02T00:16:49.337

Reputation: 361

This worked immediately. – Jess Riedel – 2018-02-18T18:11:27.697

This would be pretty awesome, but unfortunately doesn't work for me on Mac Sierra. :( Any pointers would be great. – space_cadet – 2018-10-18T06:24:02.167

@space_cadet I'm sorry to hear that it does work for you. Please file a bug report on github and describe your problem as detailed as possible: https://github.com/fsavje/math-with-slack/issues

– Fredrik Savje – 2018-10-18T19:43:09.120

Works fine in Mac Mojave (Jan 2019). Thanks a million! – Tim Erickson – 2019-01-14T18:07:05.660

@FredrikSavje, Hi, Is there a way that I can install the script on the workspace? – oshribr – 2019-08-04T18:05:22.937

Unfortunately Slack 4.0.0 has killed the script. Hoping for a fix. – level1807 – 2019-12-08T03:58:51.040

12

I've written a Tampermonkey / Greasemonkey script that you can install as an extension that will render it.

Edit: It's had trouble rendering on streams, since it compiles the content at page load. If someone knows how to do that, that would be awesome.

Edit: MathJax CDN has shut down.

Kemal Ahmed

Posted 2015-10-02T00:16:49.337

Reputation: 121

Thanks, I'm looking over that now. Any chance you could add a little more clarification text to the installer it for people who still dont know know Slack inside and out. – user507974 – 2015-10-17T23:15:06.053

>

  • Download Tampermonkey for Chrome or Greasemonkey for Firefox
  • Add new userscript.
  • Paste the contents of the file into it.
  • – Kemal Ahmed – 2015-12-15T04:07:59.163

    Have others had success using the Greasemonkey script? For me, it appears to be installed but does not render equations in my Slack forum. – half-pass – 2016-05-15T12:13:59.827

    MathJax has not shut down. The only think that's shut down is one of their CDN. – Alessandro Cosentino – 2018-11-22T11:00:44.470

    @AlessandroCosentino thank you for the correction. They have not shut down, but their CDN has. They are using CloudFlare CDN now. – Kemal Ahmed – 2018-11-23T16:31:39.983

    2

    There is a slack plugin on github, check it out https://github.com/colbygk/mathslax

    Also there are Latex plugins from community mentioned by Slack itself https://api.slack.com/community

    Cheers

    igaurav

    Posted 2015-10-02T00:16:49.337

    Reputation: 123

    0

    There is now an app for this on the slack and Rocket.Chat app store.

    https://apps.rocketbooster.net/math

    Marcelleous

    Posted 2015-10-02T00:16:49.337

    Reputation: 1