lzanini/mdbook-katex

[Bug] building with `static-css = true` results in downloading fonts twice

SichangHe opened this issue · 0 comments

I just noticed that building with

[preprocessor.katex]
static-css = true

is extremely slow ( > 3min).

I watched the build process, it looks like this:

  1. The fonts pop up one by one in book/html/katex/fonts after this message shows up:
[INFO] (mdbook::book): Book building has started
  1. After all the fonts are downloaded, they get deleted when this message shows up:
[INFO] (mdbook::book): Running the html backend
  1. The fonts get downloaded again
  2. For completeness's sake:
[INFO] (mdbook::book): Running the katex backend
[INFO] (mdbook::renderer): Invoking the "katex" renderer

I suspect that the html backend clears up what it think it does not need.