feat: add katex math typesetting

This commit is contained in:
Henk Verlinde
2021-03-16 15:14:45 +01:00
parent ee9b8983c4
commit 253b938a2e
72 changed files with 159 additions and 4 deletions

10
assets/js/katex.js Normal file
View File

@ -0,0 +1,10 @@
document.addEventListener('DOMContentLoaded', function() {
renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true},
],
});
});

View File

@ -10,6 +10,9 @@
/** Import highlight.js */
// @import "highlight.js/scss/dracula";
/** Import KaTeX */
@import "katex/dist/katex";
/** Import theme styles */
@import "common/fonts";
@import "common/global";

View File

@ -223,3 +223,7 @@ body {
-webkit-text-fill-color: transparent;
-moz-text-fill-color: transparent;
}
.katex {
font-size: $font-size-md;
}