-
-
Save uranusjr/2882e927d055d02891f7 to your computer and use it in GitHub Desktop.
KaTeX test
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>KaTeX test</title> | |
<link rel="stylesheet" type="text/css" href="katex.min.css"> | |
<style type="text/css"> | |
iframe { | |
width: 100%; | |
height: 75px; | |
border: none; | |
margin-bottom: 20px; | |
} | |
body { | |
font-size: 15px; | |
} | |
.displaystyle { | |
text-align: center; | |
} | |
</style> | |
<script src="katex.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<iframe src="http://khan.github.io/KaTeX/"></iframe> | |
<div class="math displaystyle" data-expr="\displaystyle \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)"></div> | |
<script type="text/javascript"> | |
Array.prototype.forEach.call(document.getElementsByClassName('math'), function (el) { | |
katex.render(el.getAttribute('data-expr'), el); | |
}); | |
document.getElementsByTagName('iframe')[0].onload = function () { | |
this.contentWindow.scrollTo(0, 1070); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment