# Support KaTeX for fast math in HTML #1626

Closed
opened this issue Sep 15, 2014 · 5 comments

Projects
None yet
4 participants
Owner

Merged

### deltakam commented Aug 2, 2016

 It does not seem to work by adding option '--katex'. Anyone has a solution?
Owner Author

### jgm commented Aug 4, 2016

 Could you be more specific about the problem you're having? What version of pandoc are you using? Does the generated HTML contain the expected link to katex.min.js? +++ deltakam [Aug 02 16 13:58 ]: It does not seem to work by adding option '--katex'. Anyone has a solution? — You are receiving this because you modified the open/close state. Reply to this email directly, [1]view it on GitHub, or [2]mute the thread. References

### deltakam commented Aug 5, 2016 • edited

 jgm: Version: pandoc 1.17.2 I tried again to realize that katex works. However, whenever there is an error in an equation, any equations afterwards are not rendered. That's why I thought it does not work. Would it be due to Katex itself?

### anibali commented Sep 6, 2016

 I am able to use Katex with Pandoc 1.17.2, but the output file is gigantic (~3 MB) and takes an extremely long time to generate. It also has a tendency to crash the browser. I think the cause is the many fonts which are embedded from Katex's CSS file. I can't really see anything you can do about this, but just thought I'd leave this here for anyone interested. It's a bit of a shame since it would make a great alternative to MathJax for self-contained output.
Contributor

### cagix commented Sep 6, 2016

 Same here: Pandoc 1.17.2 and -t html5 --self-contained --katex produces after quite a pause for reflection a huge HTML. It seems, that is the price for having a self contained HTML file ... I just checked: Katex itself is quite small: katex.min.css 21 kB, katex.min.js 116 kB. The fonts folder however is about 2.1 MB ... @jgm Is there an alternative to --self-contained in the way, that all local files/dependencies (e.g. figures) will be embedded in the HTML but Katex/MathJax will be included just as link to the repository?