Make LaTeX compatible with MathJax version 3 (#230)
* Make MathJax version 3 work * Change my contributor link
This commit is contained in:
parent
d779128a2c
commit
30850ff725
|
@ -46,3 +46,4 @@
|
||||||
- [Lionel Brianto](https://lionel.brianto.dev)
|
- [Lionel Brianto](https://lionel.brianto.dev)
|
||||||
- [Luis Zarate](https://github.com/jlzaratec)
|
- [Luis Zarate](https://github.com/jlzaratec)
|
||||||
- [Ariejan de Vroom](https://www.devroom.io)
|
- [Ariejan de Vroom](https://www.devroom.io)
|
||||||
|
- [Bobby Lindsey](https://bobbywlindsey.com)
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
{{- if .Params.math -}}
|
{{- if .Params.math -}}
|
||||||
<script type="text/javascript" async
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||||
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
|
<script type="text/javascript" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||||
MathJax.Hub.Config({
|
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/startup.js" id="MathJax-script"></script>
|
||||||
tex2jax: {
|
<script>
|
||||||
inlineMath: [['$','$']],
|
MathJax = {
|
||||||
displayMath: [['$$','$$']],
|
tex: {
|
||||||
|
inlineMath: [
|
||||||
|
['$', '$']
|
||||||
|
],
|
||||||
|
displayMath: [
|
||||||
|
['$$', '$$']
|
||||||
|
],
|
||||||
processEscapes: true,
|
processEscapes: true,
|
||||||
processEnvironments: true,
|
processEnvironments: true
|
||||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
},
|
||||||
TeX: { extensions: ["AMSmath.js", "AMSsymbols.js"] }
|
options: {
|
||||||
|
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
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>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Params.katex -}}
|
{{- if .Params.katex -}}
|
||||||
|
|
Loading…
Reference in New Issue