diff options
Diffstat (limited to 'docs/js/api-docs.js')
-rw-r--r-- | docs/js/api-docs.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/js/api-docs.js b/docs/js/api-docs.js index ce89d8943b..96c63cc127 100644 --- a/docs/js/api-docs.js +++ b/docs/js/api-docs.js @@ -41,3 +41,23 @@ function addBadges(allAnnotations, name, tag, html) { .add(annotations.closest("div.fullcomment").prevAll("h4.signature")) .prepend(html); } + +$(document).ready(function() { + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.async = true; + script.onload = function(){ + MathJax.Hub.Config({ + displayAlign: "left", + tex2jax: { + inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], + displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], + processEscapes: true, + skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'a'] + } + }); + }; + script.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + + 'cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'; + document.getElementsByTagName('head')[0].appendChild(script); +}); |