1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Added inline math

This commit is contained in:
Zack Scholl
2016-02-07 13:38:39 -05:00
parent a4b98dd1c1
commit 3433556629
2 changed files with 14 additions and 5 deletions

View File

@@ -45,9 +45,14 @@
<script>
$( document ).ready(function() {
var tex = document.getElementsByClassName("tex");
Array.prototype.forEach.call(tex, function(el) {
katex.render(el.getAttribute("data-expr"), el);
var texi = document.getElementsByClassName("texi");
Array.prototype.forEach.call(texi, function(el) {
katex.render(el.getAttribute("data-expr"), el, { displayMode: true });
});
var texp = document.getElementsByClassName("texp");
Array.prototype.forEach.call(texp, function(el) {
katex.render(el.getAttribute("data-expr"), el, { displayMode: false });
});
});