Skip to content

Commit 3bffe09

Browse files
committed
enable mathjax
1 parent 5f7085b commit 3bffe09

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ defaults:
307307
comments: # true
308308
share: false
309309
related: true
310+
mathjax: true
310311
# _pages
311312
- scope:
312313
path: ""

_includes/scripts.html

+17
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,20 @@
2626
<script src="{{ script | relative_url }}"></script>
2727
{% endfor %}
2828
{% endif %}
29+
30+
<script type="text/javascript" async
31+
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-MML-AM_CHTML">
32+
</script>
33+
34+
<script type="text/x-mathjax-config">
35+
MathJax.Hub.Config({
36+
extensions: ["tex2jax.js"],
37+
jax: ["input/TeX", "output/HTML-CSS"],
38+
tex2jax: {
39+
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
40+
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
41+
processEscapes: true
42+
},
43+
"HTML-CSS": { availableFonts: ["TeX"] }
44+
});
45+
</script>

0 commit comments

Comments
 (0)