lzanini / mdbook-katex

A preprocessor for mdBook, rendering LaTex equations to HTML at build time.
MIT License
205 stars 34 forks source link

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:106 #23

Closed Yang-Xijie closed 2 years ago

Yang-Xijie commented 2 years ago

Build failed. I have no hint for why this is happening.

$ mdbook serve (or mdbook build)
2022-02-21 16:21:52 [INFO] (mdbook::book): Book building has started
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:106:83
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2022-02-21 16:21:53 [ERROR] (mdbook::utils): Error: The "katex" preprocessor exited unsuccessfully with exit status: 101 status

I tried building locally on latest macOS with mdbook-katex.

Yang-Xijie commented 2 years ago

I have tried the smallest example like only one document with $y=x^2$. It works well. However, with lots of math expressions, something went wrong.

aemonk commented 2 years ago

@Yang-Xijie how did you solve that? I have the same issue.

Yang-Xijie commented 2 years ago

@Yang-Xijie how did you solve that? I have the same issue.

@aemonk Actually, I changed my site from mdBooks to Material for MkDocs, which has a better support for math formula.

aemonk commented 2 years ago

@Yang-Xijie ah ok, I see. I tried again and installed it with cargo install mdbook-katex and it worked.