2018-11-20 20:51:39 +00:00
|
|
|
<!-- Miscelaneous render related template parts we use multiple times -->
|
|
|
|
{{define "highlighting"}}
|
|
|
|
<!-- TODO: make this conditional on presence of code blocks -->
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/atom-one-light.min.css"/>
|
2018-11-20 21:01:25 +00:00
|
|
|
<script type="text/javascript"
|
|
|
|
src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js" async></script>
|
2018-11-20 20:51:39 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
addEventListener('load', function () {
|
|
|
|
var x = document.querySelectorAll("code[class^='language-']");
|
|
|
|
for (i=0; i<x.length; i++) {
|
|
|
|
hljs.highlightBlock(x[i]);
|
|
|
|
}});
|
|
|
|
</script>
|
|
|
|
{{end}}
|
2018-11-20 21:01:25 +00:00
|
|
|
|
|
|
|
<!-- Include mathjax configuration -->
|
|
|
|
{{define "mathjax"}}
|
|
|
|
<script type="text/x-mathjax-config">
|
|
|
|
MathJax.Hub.Config({
|
|
|
|
extensions: ["tex2jax.js"],
|
|
|
|
jax: ["input/TeX", "output/HTML-CSS"],
|
|
|
|
tex2jax: {
|
|
|
|
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
|
|
|
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
|
|
|
processEscapes: true
|
|
|
|
},
|
|
|
|
"HTML-CSS": { fonts: ["TeX"] }
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML" async></script>
|
|
|
|
{{end}}
|