Merge pull request #307 from joyqat/mathjax-v3-fix-scroll
Update to Mathjax v3, add x-scroll to long formula
This commit is contained in:
commit
2b9fc0a292
|
@ -1,11 +1,5 @@
|
||||||
code.has-jax {
|
|
||||||
font: inherit;
|
|
||||||
font-size: 100%;
|
|
||||||
background: inherit;
|
|
||||||
border: inherit;
|
|
||||||
color: #515151;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MathJax {
|
.MathJax {
|
||||||
font-size: 120% !important;
|
overflow-x: auto;
|
||||||
}
|
overflow-y: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
url = "https://cdn.jsdelivr.net/npm/raphael@2.3.0/raphael.min.js"
|
url = "https://cdn.jsdelivr.net/npm/raphael@2.3.0/raphael.min.js"
|
||||||
|
|
||||||
[js.mathjax]
|
[js.mathjax]
|
||||||
url = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js"
|
url = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
|
||||||
|
|
||||||
[js.webfont]
|
[js.webfont]
|
||||||
sri = "" # no sri
|
sri = "" # no sri
|
||||||
|
|
|
@ -30,35 +30,27 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if in .Params.Libraries "mathjax" }}
|
{{ if in .Params.Libraries "mathjax" }}
|
||||||
<script type="text/javascript" async src="{{ $js.mathjax.url }}?config=TeX-AMS-MML_HTMLorMML">
|
<script>
|
||||||
MathJax.Hub.Config({
|
window.MathJax = {
|
||||||
tex2jax: {
|
tex: {
|
||||||
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
inlineMath: [['$', '$']],
|
||||||
displayMath: [['$$', '$$']],
|
displayMath: [['$$', '$$']],
|
||||||
processEscapes: true,
|
processEscapes: true,
|
||||||
processEnvironments: true,
|
processEnvironments: true,
|
||||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
tags: "ams"
|
||||||
TeX: {
|
},
|
||||||
equationNumbers: { autoNumber: "AMS" },
|
chtml: {
|
||||||
extensions: ["AMSmath.js", "AMSsymbols.js"]
|
scale: 1.1
|
||||||
}
|
},
|
||||||
}
|
options: {
|
||||||
});
|
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
||||||
MathJax.Hub.Queue(function () {
|
ignoreHtmlClass: 'tex2jax_ignore',
|
||||||
// Fix <code> tags after MathJax finishes running. This is a
|
processHtmlClass: 'tex2jax_process'
|
||||||
// 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';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
MathJax.Hub.Config({
|
|
||||||
// Autonumbering by mathjax
|
|
||||||
TeX: { equationNumbers: { autoNumber: "AMS" } }
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||||
|
<script async src="{{ $js.mathjax.url }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if in .Params.Libraries "msc" }}
|
{{ if in .Params.Libraries "msc" }}
|
||||||
|
|
Loading…
Reference in New Issue