Recall that `\[x^2+1/2\]` is the notation for blocked math display in latex.

The `\[\]` provides an empty mathjax box to put the math in. In the javascript code, we get the element produced by this and update the source instead of making a new math element every time.