Math rendering (re-visited)

I think it would be good to come back to this discussion, since it was officially confirmed today that Chrome versions > 109 will support MathML rendering. This will mean that Chrome, Edge, Firefox and Safari all support MathML in the next couple months, which will remove the need for MathJax/KaTeX.

On selecting a dialect, I really like the RST way of specifying dialect before the block. Following an existing precident is always nice, and it avoids the above question of “what is math vs. what is the dialect” in @Christopher_Jefferso’s example $f:A \mapsto B$. It would also allow markdown to eventually support the same syntax for regular inline code, which would be awesome - but that’s a separate discussion. Example:

You are allowed to do this in RST with rules :python:`print("Hello world!")`

Example for inline math: :asciimath:$sum_(i=1)^n i^3=((n(n+1))/2)^$

Assume tex by default $\frac{\partial y}{\partial x}$

This will display the rendered equations:

$$asciimath
sum_(i=1)^n i^3=((n(n+1))/2)^
$$

$$
 x = a_0 +
  \frac{1}{
    \displaystyle a_1 +\frac{1}{
      \displaystyle a_2 +
      \frac{1}{\displaystyle a_3 + a_4}
    }
  } 
$$

The below will display the literal text:

```asciimath
sum_(i=1)^n i^3=((n(n+1))/2)^
```

```tex
 x = a_0 + ...
```

In general, imho it might be good to say that in general, $$/$ is for rendered code (tex by default but not restricted to tex or even math in general) and code fences for raw. That would allow for consistency with something like $$mermaid, if Github didn’t get the jump on that one too fast.

Since the last comment in this discussion, GitHub now also supports math rendering. Their syntax is consistent with the inofficial decisions made here: Writing mathematical expressions - GitHub Docs