mathjax update to v3

This commit is contained in:
zzossig 2020-07-24 14:07:48 +09:00
parent 2b9fc0a292
commit 4f3acae640
3 changed files with 14 additions and 8 deletions

View File

@ -3,3 +3,10 @@
overflow-y: hidden;
box-sizing: border-box;
}
code.has-jax {
-webkit-font-smoothing: antialiased;
background: inherit !important;
border: none !important;
font-size: 100%;
}

View File

@ -33,14 +33,10 @@
<script>
window.MathJax = {
tex: {
inlineMath: [['$', '$']],
displayMath: [['$$', '$$']],
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\\[', '\\]']],
processEscapes: true,
processEnvironments: true,
tags: "ams"
},
chtml: {
scale: 1.1
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
@ -50,7 +46,7 @@
};
</script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script async src="{{ $js.mathjax.url }}"></script>
<script async src="{{ $js.mathjax.url }}" id="MathJax-script"></script>
{{ end }}
{{ if in .Params.Libraries "msc" }}
@ -501,6 +497,9 @@
// ============================ mathjax ============================
document.querySelectorAll("mjx-container").forEach(function (x) {
x.parentElement.classList += 'has-jax'
});
// =================================================================