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:
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>