The script adds {$$ ... $$}
and {$...$}
markups that
display LaTeX-style math equations, the first form centers the equation,
while the second generates the equation "inline".
Added in some rudimentary cross referencing. It is now possible to add
\label{labelname} tags into display equations, which cause the
equation to be numbered, and can then be referenced in the main text
using an \eqref{labelname}. This is best explained with an example.
In Equation \eqref{eq:gamma} below I will define a famous special function.
{$$ \label{eq:gamma} \Gamma(z) = \int_0^{\infty} t^{z-1} e^{-t} dt $$}
Equation \eqref{eq:gamma} defines the {$\Gamma$} function, an
extension of the factorial function.