lzanini / mdbook-katex

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

square brackets cause problems #97

Closed emanuele-em closed 8 months ago

emanuele-em commented 9 months ago

I don't know why but when I write normal square brackets it does not render the entire math inline section:

In the last case, if $\texttt{x}[a]=\texttt{y}[b]$,
In the last case, if $\texttt{x}(a)=\texttt{y}(b)$,

The result is: image

SichangHe commented 9 months ago

Hi @emanuele-em, could you provide your OS information and how you installed mdBook-KaTeX? I cannot reproduce this.

emanuele-em commented 9 months ago

Thank you for your super rapid answer 🚀!

book.toml

[preprocessor.katex]
after = ["links"]

Apple M2 with MacOS Sonoma, but the problem was present also in MacOS Ventura

SichangHe commented 9 months ago

How did you install mdBook-KaTeX?

emanuele-em commented 9 months ago

with cargo following the readme

SichangHe commented 9 months ago

Could you build this debug branch and tell me the output when run? The commands to do that look like:

git clone git@github.com:lzanini/mdbook-katex.git
git switch debug-rendering
cargo b

Then, please run this mdBook-KaTeX you just built by something like:

export PATH=YOUR_MDBOOK_KATEX_REPO/target/debug:$PATH
mdbook build
SichangHe commented 8 months ago

Closing due to inactivity. Please respond if the problem persisted.