Reputation: 41
I am using katex in my web application to render Math equations. I need to convert the math equation into an image(png or jpg). I tried html2canvas.js, but it could not able to convert some symbols. Is there any front-end tools to convert math equations to image.?
Upvotes: 2
Views: 1910
Reputation: 60988
To generate an image client-side you'd want the formula rendered to a canvas then save that to a file. There is a feature request for render to canvas. A long while ago I had written an implementation. But it wasn't merged upstream and I haven't kept up with changes there. If you don't need recent KaTeX features you might still give that codebase of mine a try.
Otherwise there definitely is interest in getting a solution included. Ideally a solution would implement and then use an intermediate representation to be shared by all render backend.
Upvotes: 2