Solutions like Sphinx, GitBooks, and Dropbox Paper do this already.
PR welcome.
You can use markdown-it-katex to use Katex.
_
Below is my way:
markdown-it-katexyarn add markdown-it-katex
config.js in .vuepressmodule.exports = {
...
markdown: {
config: md => {
md.use(require("markdown-it-katex"));
}
}
};
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/github-markdown-css/2.2.1/github-markdown.css"/>
Closing as this can be done in userland.
Thanks a lot! VuePress is awesome! Love it
Is anyone here still using latex equations in Vuepress?
markdown-it-katex is no longer maintained, so I've been trying @neilsustc/markdown-it-katex and markdown-it-texmath.
Both of these result in _excruciatingly_ slow dev server startups / refreshes, as in 30+ minutes. However, production builds seem to be fine.
I'm curious if anyone knows what might be causing these slow webpack-dev-server startups / refreshes and if there is a workaround or potential solution?
Thanks.
@songololo Hi there!
I wrote a new plugin vuepress-plugin-mathjax yesterday. Can you try it out to see if satisfies your needs?
@Shigma, wow, thanks, that really makes it easier.
In the meantime I had been using the markdown-it-mathjax to parse the markdown to mathjax supported syntax, and then loading the mathjax script in the head of the file. This was not ideal because mathjax wouldn't refresh when changing pages, so I had to use a module to force mathjax to refresh on page changes.
Most helpful comment
You can use
markdown-it-katexto use Katex._
Below is my way:
markdown-it-katexconfig.jsin.vuepress