Skip to content

Commit

Permalink
Include MathJax when delimiters are present
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Nov 2, 2023
1 parent b6756f8 commit 9ae5f13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{ if or (eq .Section "posts") (eq .Section "tags") }}
{{ if (findRE `(\$.*\$)|(\\\\\[.*\\\\\])|(\\\\\(.*\\\\\))` .Content) }}
<script>
MathJax = {
tex: {
displayMath: [['$$', '$$'], ['\\[', '\\]']],
inlineMath: [['$', '$'], ['\\(', '\\)']],
}
};
Expand Down

0 comments on commit 9ae5f13

Please sign in to comment.