42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
{{ if .Params.mathjax }}
|
|
|
|
<script>
|
|
MathJax = {
|
|
tex: {
|
|
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
|
displayMath: [['$$', '$$'], ['\\[', '\\]']],
|
|
processEscapes: true,
|
|
processEnvironments: true
|
|
},
|
|
options: {
|
|
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
|
}
|
|
};
|
|
|
|
window.addEventListener('load', (event) => {
|
|
document.querySelectorAll("mjx-container").forEach(function (x) {
|
|
x.parentElement.classList += 'has-jax'
|
|
})
|
|
});
|
|
|
|
</script>
|
|
|
|
<script type="text/x-mathjax-config">
|
|
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>
|
|
<script type="text/javascript" id="MathJax-script" async
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
|
{{ end }}
|
|
|
|
{{ if .Params.figref }}
|
|
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
|
|
<script src="/js/figref.js"></script>
|
|
{{ end }}
|