-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-render KaTeX and highlight #107
Comments
Katexvar katex = require("./libs/katex/katex.min.js")
var html = katex.renderToString("x^2 + \\exp(x) - 1 = 0", {
displayMode: true});
console.log(html)
|
Status update
The last issue may be mitigated quite a bit if instead of firing node in the markdown conversion, we do it in the html conversion, in that case it may be somewhat easier to find all math blocks in one shot and fire node just once per page. |
The second version (conversion directly in the HTML) is implemented on branch prerender2, will experiment a bit and pick one and then use the same modus operandi for highlights.js |
Update:
|
now done and applied on personal website, works great. |
npx katex [-d] -i inltx.tex -o tt.html
This may require a fair bit of work to function but could lead to a removal of requiring the
katex.js
andhighlight.js
by just doing everything locally (pre-rendering to HTML) before it's pushed which would lead to even faster pages.The text was updated successfully, but these errors were encountered: