fsavje / math-with-slack

Rendered math (MathJax) with Slack's desktop client
MIT License
431 stars 62 forks source link

asciimath #42

Open vwwv opened 5 years ago

vwwv commented 5 years ago

Really awesome repo! it worked out of the box :)

Btw mathjax support asciimath, would it be possible to use asciimath then with slack? how?

fsavje commented 5 years ago

I'm glad you found it useful! Support for asciimath is possible, but it is not without its issues. The main problem is that support for asciimath and TeX-type math at the same time might become too clunky. This could be solved with an installation option, selecting between asciimath and TeX match, but then the two installations becomes incompatible. I've put it on the long-term todo list.

In the meanwhile, it should be fairly easy to tweak things yourself to get asciimath support. Open the script after you've downloaded it (but before installation), and find the mathjax_config.text variable in the injection script. Make the relevant changes here to load asciimath instead of TeX. For example, change jax: ['input/TeX', 'output/HTML-CSS'] to jax: ['input/AsciiMath', 'output/HTML-CSS']. You might need to play around with the configuration a bit to get it to work (I haven't tried).

The issue with this tweak is the same as above. For your team members to have your asciimath rendered properly, they would need to make exactly the same tweaks that you've done. If they don't, their slack clients will try to render your asciimath code as TeX math.

vwwv commented 5 years ago

thanks for the info! I'll try