1
0

math.html 924 B

123456789101112131415161718192021222324
  1. {{- if eq .Params.math "true" -}}
  2. <script type="text/javascript" async
  3. src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
  4. MathJax.Hub.Config({
  5. tex2jax: {
  6. inlineMath: [['$','$']],
  7. displayMath: [['$$','$$']],
  8. processEscapes: true,
  9. processEnvironments: true,
  10. skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
  11. TeX: { extensions: ["AMSmath.js", "AMSsymbols.js"] }
  12. }
  13. });
  14. MathJax.Hub.Queue(function() {
  15. // Fix <code> tags after MathJax finishes running. This is a
  16. // hack to overcome a shortcoming of Markdown. Discussion at
  17. // https://github.com/mojombo/jekyll/issues/199
  18. var all = MathJax.Hub.getAllJax(), i;
  19. for(i = 0; i < all.length; i += 1) {
  20. all[i].SourceElement().parentNode.className += ' has-jax';
  21. }
  22. });
  23. </script>
  24. {{- end -}}