Recently, I've had trouble doing this, and at first, I thought it was related to R Bookdown. I've tried the equation on your ClavertonDown (which I'm going to start experimenting with) and I'm having the same problem.
Here are the keyboard actions I use.
With markdown stuff, I've not had much luck and I'm wondering if there is something about the version of mathjax being used by Markdown or if there is a fight for the keyboard commands that is at play here.
Hello world... $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
This is a bug in MathJax 2.7.2 or when this is in use with Markdown generated formats, perhaps. It was confirmed in transformations with this version from RMarkdown and Clavertondown. But with 2.7.9 in Xerte and Bookdown it does not occur.
Confirmed not working in Clavertondown with the current setup and this does produce 2.7.2
Well. It turns out that Bookdown originally hard-encoded a MathJax setup, for the github format, of https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML. Presumably this was after the MathJax CDN was closed down and CloudFlare didn't have a latest. But this url points to https://mathjax.rstudio.com/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML - so it was never updated. When I forked Bookdown and then diverged away from Bookdown this was retained in Clavertondown.
There is no way of adapting this. This was reported and discussed at https://github.com/rstudio/bookdown/issues/915 which remains open.
At some point during this Bookdown changed the hard-encoded url to be https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/latest.js?config=TeX-MML-AM_CHTML which makes sense and we should do that too.
The EPub has MathML in it so is not using MathJax unless the Viewer is. This is outside of our concern. The third HTML format Clavertondown produces is a HTML page. In this case there is no hard-coded url and it defaults to the current Pandoc default. This is now MathJax 3.x and this is a problem for three reasons:
So, for HTML page format we need to match the hard-encoding of the MathJax setup present in github format.
This leaves the question of... what is happening in RMarkdown? Why is that ending up with 2.7.2 if the HTML page format does not? Puzzling.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.