Skip to content

Commit

Permalink
themes: mathjax support
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Jan 26, 2021
1 parent 04b7e85 commit a53ba19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions themes/research/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
{{ partial "header" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer" . }}
{{ partial "scripts" .}}
</body>
</html>
13 changes: 13 additions & 0 deletions themes/research/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<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": { fonts: ["TeX"] }
});
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML' async></script>

0 comments on commit a53ba19

Please sign in to comment.