Update mathjax.py

Update logic for calculating Typogrify version testing