Skip to content

Instantly share code, notes, and snippets.

@zettoone
Created July 24, 2012 03:36
Show Gist options
  • Save zettoone/3167864 to your computer and use it in GitHub Desktop.
Save zettoone/3167864 to your computer and use it in GitHub Desktop.
Jekyll MathJax Template Layout
<!-- MathJax Section -->
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>
MathJax.Hub.Config({
tex2jax: {
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment