Closed pvskand closed 8 years ago
There is no render
property in this library. That is a katex
method.
Why is this error showing up?
Please read the docs more closely. That example is using KaTeX, another library. Remove these lines:
var katex = algebra.katex;
var render = algebra.render;
This library doesn't have either of those methods.
Okay I am sorry for not reading the Docs properly. I thought KaTeX was a part of algebra.js. My bad!
From their docs over here you can include KaTeX in your HTML easily:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js"></script>
At that point you should be able to use katex.render
in a <script>
tag like I do in the docs:
<script>
katex.render(...)
</script>
I have used the sample code given in your Docs bu there is this error showing up saying that Cannot read property render. Should we define it like
var render = new algebra.render
? I did that as well but wasn't able to rectify the error.