2018-11-20 11:39:08 +00:00
|
|
|
{{- if .Params.math -}}
|
2018-10-03 18:06:20 +00:00
|
|
|
<script type="text/javascript" async
|
2019-09-23 17:18:42 +00:00
|
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
|
2018-10-03 18:06:20 +00:00
|
|
|
MathJax.Hub.Config({
|
|
|
|
tex2jax: {
|
|
|
|
inlineMath: [['$','$']],
|
|
|
|
displayMath: [['$$','$$']],
|
|
|
|
processEscapes: true,
|
|
|
|
processEnvironments: true,
|
|
|
|
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
|
|
|
TeX: { extensions: ["AMSmath.js", "AMSsymbols.js"] }
|
|
|
|
}
|
|
|
|
});
|
|
|
|
MathJax.Hub.Queue(function() {
|
|
|
|
// Fix <code> tags after MathJax finishes running. This is a
|
|
|
|
// hack to overcome a shortcoming of Markdown. Discussion at
|
|
|
|
// https://github.com/mojombo/jekyll/issues/199
|
|
|
|
var all = MathJax.Hub.getAllJax(), i;
|
|
|
|
for(i = 0; i < all.length; i += 1) {
|
|
|
|
all[i].SourceElement().parentNode.className += ' has-jax';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{{- end -}}
|
2019-04-01 23:14:19 +00:00
|
|
|
{{- if .Params.katex -}}
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
|
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
|
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
|
|
|
|
onload="renderMathInElement(document.body,
|
|
|
|
{
|
|
|
|
delimiters: [
|
|
|
|
{left: '$$', right: '$$', display:true},
|
|
|
|
{left: '$', right: '$', display:false},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
);">
|
|
|
|
</script>
|
|
|
|
{{- end -}}
|