Going to start updating mathstodon.xyz to Mastodon 3.0.0. Hopefully it'll all go smoothly


It worked!
For other people running my MathJax patch, here's a commit that adds MathJax (and the plaintext TeX → unicode auto-replacement) into Mastodon 3.0.0: github.com/tootsuite/mastodon/

My quest to update everything to use MathJax v3 continues.
I've rewritten my MathJax patch for mastodon to use v3.
Here's the new code: github.com/christianp/mastodon
(now running on mathstodon.xyz!)

Show thread

@christianp I think I'll hold off on converting my blog to MathJax 3. Previously it just worked to load the script from from a CDN. But now the corresponding recipes in docs.mathjax.org/en/latest/web don't work, probably because the blog software I'm using (Jekyll) converts the math blocks to <script type="math/tex"> (as docs.mathjax.org/en/latest/upg still recommends) and the new MathJax doesn't seem to understand that format for delimiting math.

@11011110 yeah, v3 doesn't use math/tex tags at all. That page in the docs should be clearer that it applies only to v2.
I'll have a look at jekyll - adding v3 support to it would help a lot of people, I reckon! Are you using any plugins or non-default config stuff to get mathjax support?

@christianp It's just the default processing (which is actually in kramdown; see kramdown.gettalong.org/math_en) together with an easily-changed line in a template file that puts the script into all the htmls. The template is trivial to change but kramdown isn't. And I don't have any control over which version of kramdown is run on the site that hosts my blog.

@christianp But the kramdown docs that I linked to have some code for swapping out the math/tex with something else to make it work with katex that might also work with mathjax 3

@christianp Ever looked into KaTeX instead of Mathjax? Just curious if you have. No idea if it's any better.

@JordiGH I have. It's nice and fast but it's missing a few of the more obscure commands. Would work well in mastodon, but MathJax v3 is fast so why bother?

@christianp Just noticed a mildly annoying side effect: Now when I select all the text of a toot and copy to my clipboard, I don't get any of the math.

(It's only mildly annoying because it didn't work correctly before, in a different way, and now I can at least control-click on the formula and get its TeX coding separately.)

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!