优化mathjax js引入方式

This commit is contained in:
virusdefender
2016-03-14 14:55:08 +08:00
parent 13c73e71b8
commit 76244e1fdf
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
<script src="https://cdn.bootcss.com/mathjax/2.6.1/MathJax.js"></script>

View File

@@ -39,4 +39,5 @@
{% endblock %}
{% block js_block %}
<script src="/static/js/app/oj/problem/problem.js"></script>
{% include "oj/problem/_mathjax_js.html" %}
{% endblock %}

View File

@@ -48,4 +48,5 @@
{% endblock %}
{% block js_block %}
<script src="/static/js/app/oj/problem/problem.js"></script>
{% include "oj/problem/_mathjax_js.html" %}
{% endblock %}