Simple Perl scripts which use regex search and replace to in-place convert Latex markdown files (which use $[MATH]$ and $$[MATH]$$) to Gitlab markdown (which uses $`[MATH]`$ and ```math [MATH]``` and vice versa.
One caveat: the $$[MATH]$$ style should have the math environment delimiters on separate newlines, so this works:
$$
[MATH]
$$
but the below and similar variations don't:
$$[MATH]$$
Additionally, the very first character in the file should not be $.