apes: true, skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'] }, TeX: { equationNumbers: { autoNumber: 'AMS' } } }); MathJax.Hub.Register.StartupHook('TeX Jax Ready', function() { MathJax.InputJax.TeX.prefilterHooks.Add(function(data) { if (data.display) { var next = data.script.nextSibling; while (next && next.nodeName.toLowerCase() === '#text') { next = next.nextSibling } if (next && next.nodeName.toLowerCase() === 'br') { next.parentNode.removeChild(next) } } }); });