Improved MathJax's tex2jax detection