commit
e3b162689c
@ -508,6 +508,13 @@ article figcaption {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
code.has-jax {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
background: inherit !important;
|
||||
border: none !important;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.read-more {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
@ -13,4 +13,6 @@
|
||||
<nav></nav>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.mathjax }}{{ partial "mathjax_support.html" . }}{{ end }}
|
||||
|
||||
{{ partial "header-extra.html" . }}
|
||||
|
22
layouts/partials/mathjax_support.html
Normal file
22
layouts/partials/mathjax_support.html
Normal file
@ -0,0 +1,22 @@
|
||||
<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 src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script type="text/javascript" id="MathJax-script" async
|
||||
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
Loading…
Reference in New Issue
Block a user