-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…closes #1393, by @fgtham @gsantner (PR #1576) * Fence KaTeX math expressions * Implement flexmark KaTeX extension based on / stripped down flexmark-ext-gitlab * Update markor-markdown-reference template * In addition to `$...$` and `$$...$$`, math rendering can now be enabled with `\(...\)` for inline and `\[...¸]` for display mode. Co-authored-by: Florian Tham <[email protected]> Co-authored-by: Gregor Santner <[email protected]>
- Loading branch information
1 parent
757efd4
commit 5ac79f9
Showing
5 changed files
with
477 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(function () { | ||
document.addEventListener("DOMContentLoaded", function () { | ||
var mathElems = document.getElementsByClassName("katex"); | ||
var elems = []; | ||
for (const i in mathElems) { | ||
if (mathElems.hasOwnProperty(i)) elems.push(mathElems[i]); | ||
} | ||
|
||
elems.forEach(elem => { | ||
katex.render(elem.textContent, elem, { throwOnError: false, displayMode: elem.nodeName !== 'SPAN', }); | ||
}); | ||
}); | ||
})(); |
Oops, something went wrong.