lzanini / mdbook-katex

A preprocessor for mdBook, rendering LaTex equations to HTML at build time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to parse the input

MordragT opened this issue · comments

Hey there thank you for creating this preprocessor,
I am not able to get mdbook-katex working on NixOS

This is the output I am getting.

2022-09-04 15:50:04 [INFO] (mdbook::book): Book building has started
2022-09-04 15:50:04 [INFO] (mdbook::book): Running the katex backend
2022-09-04 15:50:04 [INFO] (mdbook::renderer): Invoking the "katex" renderer
Unable to parse the input
2022-09-04 15:50:04 [INFO] (mdbook::cmd::serve): Serving on: http://localhost:3000
2022-09-04 15:50:04 [INFO] (mdbook::cmd::watch): Listening for changes...
2022-09-04 15:50:04 [INFO] (warp::server): Server::run; addr=[::1]:3000
2022-09-04 15:50:04 [INFO] (warp::server): listening on http://[::1]:3000 

This does even happen on very simple input like $ 2 + 3 $

@MordragT, how did you install mdbook-katex?

I am using the latest release in NixOS 0.2.10, should I be using git master ?

You have three options as of now that I know:

  1. Ignore the error message. I used the old version (0.2.10) before and it correctly processes the markdown despite displaying the error.
  2. Use git master of mdbook-katex as specified in the README of this repository.
  3. Use mdbook-katex2, which you can install without using the git master.

Sadly the code is not displayed correctly, so ignoring the error message is not an option. For now I am just using the inbuilt mathjax support in mdbook which is fine for me, but when I find the time I will test both options.

If the builtin MathJax works for you, might as well use that so you have one less dependency. MathJax also provides more options than katex, such as rendering as SVG. The most noticeable downsides are the slower load time, and failure to restore to the position in the page when using mdbook's hot reload, which is the real killer for me.

It the problem solved for you?

Closing this issue as the original problem has been addressed. @MordragT, please open a new issue if anything else needs to be addressed.