Skip to content

Commit

Permalink
Use mathjax (#366)
Browse files Browse the repository at this point in the history
* Use mathjax

* Include MathJax when delimiters are present

---------

Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
  • Loading branch information
jarrodmillman and stefanv authored Nov 2, 2023
1 parent f404ad7 commit 5738142
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ if (findRE `(\$.*\$)|(\\\\\[.*\\\\\])|(\\\\\(.*\\\\\))` .Content) }}
<script>
MathJax = {
tex: {
displayMath: [['$$', '$$'], ['\\[', '\\]']],
inlineMath: [['$', '$'], ['\\(', '\\)']],
}
};
</script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
{{ end }}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans">

0 comments on commit 5738142

Please sign in to comment.