feat: add katex math typesetting
This commit is contained in:
10
assets/js/katex.js
Normal file
10
assets/js/katex.js
Normal 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},
|
||||
],
|
||||
});
|
||||
});
|
@ -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";
|
||||
|
@ -223,3 +223,7 @@ body {
|
||||
-webkit-text-fill-color: transparent;
|
||||
-moz-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.katex {
|
||||
font-size: $font-size-md;
|
||||
}
|
||||
|
Reference in New Issue
Block a user