I used KaTeX for a project of mine a couple of years back. It's fantastic! It's vastly faster than MathJax. Also, and maybe more important: It has a render('latex-string') function. At least way back, MathJax did't have that, and was very opposed to adding one, making it a pain to work with.