Bug 1027670 - Add IME that handle LaTeX

I understand you are testing if you are inside a LaTeX command or environment. I recommend you alter the `match` name to something like `isCursorInsideLaTeX`.

Have you considered checking `textBeforeCursor` first to see if you are inside something matching the start of a command / environment, then looking for the closing character?