mathjax can be used in nodejs since version 3;for version 2,the mathjax-node library provides nodejs compatibility.