@BenjaminHan I may have a look at this when I get some time. looks like the mathstodon fork is available on github, so there may not be much work to do provided that we trust their implementation!

https://github.com/christianp/mastodon/tree/mathstodon-3.5.3

GitHub - christianp/mastodon at mathstodon-3.5.3

A GNU Social-compatible microblogging server. Contribute to christianp/mastodon development by creating an account on GitHub.

GitHub
@surprisal @BenjaminHan it looks like is no longer being updated, so unfortunately it's unlikely we can merge into present day Mastodon easily. We'll work on having it eventually, feel free to set up an instance meanwhile!
@thegradient @BenjaminHan yeah, the main issue I see is that the only way to implement this currently is by forking mastodon, which is a maintenance burden since you have to periodically update the patch to the latest release. The maintainer already rejected the idea of merging this functionality into the main codebase (https://github.com/mastodon/mastodon/issues/822), so barring some kind of plugin system the only way to implement it is via a fork
Add LaTeX/MathML support · Issue #822 · mastodon/mastodon

It would be great if Mastodon client could render mathematical equations in the toots. This can be very easily accomplished for web clients by including the MathJax script (62 Kb).

GitHub
@surprisal @BenjaminHan yup, and we'd really prefer to avoid a fork. Hopefully we can find a way to do it eventually, but unlikely in the near term.