Yes if you can figure it out I’d accept a PR. I think it would be a bit more complicated as we need to include the script conditionally depending on whether Katex is enabled or not. Also we’d need to somehow bundle this script with the two apps (mobile and desktop) as it needs to work offline too.

If possible I think the best way would be to include and run this plugin at rendering time (like Katex now), and that way we don’t need to load an external script in the HTML view, and it works directly in both desktop and mobile.