Skip to content

Commit 5738142

Browse files
Use mathjax (#366)
* Use mathjax * Include MathJax when delimiters are present --------- Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
1 parent f404ad7 commit 5738142

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

layouts/partials/head.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ if (findRE `(\$.*\$)|(\\\\\[.*\\\\\])|(\\\\\(.*\\\\\))` .Content) }}
2+
<script>
3+
MathJax = {
4+
tex: {
5+
displayMath: [['$$', '$$'], ['\\[', '\\]']],
6+
inlineMath: [['$', '$'], ['\\(', '\\)']],
7+
}
8+
};
9+
</script>
10+
<script type="text/javascript" id="MathJax-script" async
11+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
12+
</script>
13+
{{ end }}
14+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans">

0 commit comments

Comments
 (0)