Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wlh320/hugo-theme-hulga.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlh233 <wlh233@live.com>2020-11-13 18:07:41 +0300
committerwlh233 <wlh233@live.com>2020-11-13 18:07:41 +0300
commitab9efea0dc0d0eb0202421aab978d8b54b5dac3b (patch)
tree4e133abd297ba1f7d74696a100af0466a51b1e83 /layouts/partials/math.html
first commit
Diffstat (limited to 'layouts/partials/math.html')
-rw-r--r--layouts/partials/math.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/layouts/partials/math.html b/layouts/partials/math.html
new file mode 100644
index 0000000..02a521c
--- /dev/null
+++ b/layouts/partials/math.html
@@ -0,0 +1,32 @@
+<link rel="stylesheet" href="/css/katex.min.css">
+<script defer src="/js/katex.min.js"></script>
+<script defer src="/js/auto-render.min.js"></script>
+<script>
+ document.addEventListener("DOMContentLoaded", function () {
+ renderMathInElement(document.body, {
+ // ...options...
+ delimiters: [{
+ left: "$$",
+ right: "$$",
+ display: true
+ },
+ {
+ left: "\\[",
+ right: "\\]",
+ display: true
+ },
+ {
+ left: "$",
+ right: "$",
+ display: false
+ },
+ {
+ left: "\\(",
+ right: "\\)",
+ display: false
+ }
+ ]
+
+ });
+ });
+</script>