Skip to content

Commit af98505

Browse files
committed
3rd Party Service: Update MathJax script reference.
1 parent 301eac2 commit af98505

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

layout/_scripts/mathjax.swig

+23-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
{% if theme.mathjax %}
2-
<script type="text/x-mathjax-config">
3-
MathJax.Hub.Config({
4-
tex2jax: {
5-
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
6-
processEscapes: true,
7-
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
8-
}
9-
});
10-
</script>
2+
<script type="text/x-mathjax-config">
3+
MathJax.Hub.Config({
4+
tex2jax: {
5+
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
6+
processEscapes: true,
7+
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
8+
}
9+
});
10+
</script>
1111

12-
<script type="text/x-mathjax-config">
13-
MathJax.Hub.Queue(function() {
14-
var all = MathJax.Hub.getAllJax(), i;
15-
for (i=0; i < all.length; i += 1) {
16-
all[i].SourceElement().parentNode.className += ' has-jax';
17-
}
18-
});
19-
</script>
20-
21-
<script type="text/javascript" src="http://cdn.staticfile.org/mathjax/2.4.0/MathJax.js"></script>
22-
<script type="text/javascript" src="http://cdn.staticfile.org/mathjax/2.4.0/config/TeX-AMS-MML_HTMLorMML.js"></script>
12+
<script type="text/x-mathjax-config">
13+
MathJax.Hub.Queue(function() {
14+
var all = MathJax.Hub.getAllJax(), i;
15+
for (i=0; i < all.length; i += 1) {
16+
all[i].SourceElement().parentNode.className += ' has-jax';
17+
}
18+
});
19+
</script>
2320

21+
{% if config.language === 'zh-Hans' %}
22+
<script type="text/javascript" src="http://cdn.staticfile.org/mathjax/2.4.0/MathJax.js"></script>
23+
<script type="text/javascript" src="http://cdn.staticfile.org/mathjax/2.4.0/config/TeX-AMS-MML_HTMLorMML.js"></script>
24+
{% else %}
25+
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
26+
{% endif %}
2427
{% endif %}

0 commit comments

Comments
 (0)