Add optional Mathjax to Tusky
Latex style mathematics on the web requires loading Mathjax or Katex javascript libraries. An example of this is this toot, which looks like this in a web browser

In Tusky, these libraries are not loaded, so the latex syntax is shown as is. This is what the toot looks like in Tusky

Please add an option to loads mathjax or katex libraries inside Tusky.
-
Tusky Version: 20.0
-
Android Version: Any
-
Android Device: Any
-
Mastodon instance (if applicable): N/A
-
[ x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
I would really like this actually
Yes, this would be nice to have.
- We need Android Java or Kotlin libraries for this though, can't have JavaScript in Tusky
- It would be nice if there where some kind of flag in the Api that lets us know that a post contains LaTeX so we render it as the user intended
There seem to be a couple existing Android libraries
@[email protected] sent me this helpful link that might help us understand exactly what subset is in use on Mathstodon "links at the bottom to lists of supported TeX commands and stuff" https://docs.mathjax.org/en/latest/input/tex/index.html#tex-support
1. We need Android Java or Kotlin libraries for this though, can't have JavaScript in Tusky
Hmmm. This certainly complicates things.
Usually Mathjax converts the latex mathematics into styled html that is rendered by the browser as usual. This has the advantage that zooming keeps the relative size of the text and math constant.
There are android-friendly libraries for latex, but they convert each latex expression to its own svg image.
How about this one? https://github.com/tech-pw/RenderX
(I'm not a software dev so no idea how suitable it is, just came across this issue while looking for a way to display latex in tusky.)
For what it's worth, if MathML rendering is significantly easier to implement/fix that might be good enough. There are some patches to support rendering MathML (slowly) making it through the pipeline. I believe Mathstodon already supports it.