lzanini / mdbook-katex

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

matrix rendering #98

Closed justletmecreatetheaccount closed 11 months ago

justletmecreatetheaccount commented 11 months ago

hello !

mdbook-katex don't render my matrices but they're syntax good since https://katex.org/#demo is showing me the matrix without error

here is an example of the "buggy" code:

$$\begin{bmatrix}P & Q \\\frac{\text{d}x}{\text{d}s} & \frac{\text{d}y}{\text{d}s} \\ \end{bmatrix}\begin{bmatrix} \frac{\partial u}{\partial x} \\ \frac{\partial u}{\partial y} \\ \end{bmatrix}= \begin{bmatrix} R \\ \frac{\text{d}u}{\text{d}s} \\ \end{bmatrix}$$

mdbook-katex process it well because dollars signs gets removed when katex enabled, but it does not show me my matrix, but only the latex text

image

Is the problem coming from me ?

Here is my book.toml


[book]
authors = ["[Vlad Doniga]"]
language = "fr"
multilingual = false
src = "src"
title = "LEPL1103 - Notes"

[preprocessor.katex]
after = ["links"]
throw-on-error = false

[output.html]
# theme = "my-theme"
default-theme = "light"
preferred-dark-theme = "ayu"
# curly-quotes = true
# mathjax-support = false
# copy-fonts = true
# additional-css = ["custom.css", "custom2.css"]
# additional-js = ["custom.js"]
# no-section-label = false
git-repository-url = "https://github.com/MoinesCopistes/lepl1103"
git-repository-icon = "fa-github"
additional-css = ['mdbook-admonish.css','katex-supp.css']
# edit-url-template = "https://github.com/rust-lang/mdBook/edit/master/guide/{path}"
# site-url = "/example-book/"
# cname = "myproject.rs"
# input-404 = "not-found.md"

But anyway, thank you for building this tool, it's like REALLY helpful !

justletmecreatetheaccount commented 11 months ago

PS C:\Users\vladd\OneDrive\Documents\Unif\Q3-perso\lepl1103> mdbook --version mdbook v0.4.35

justletmecreatetheaccount commented 11 months ago

anyway..just had to use the gnu build version... do you know why this issue is happening ?

SichangHe commented 11 months ago

I really feel bad for the hoops you had to jump through to get the correct installation.

The reason why Windows users need to use the GNU build is discovered in #39 and referenced in the "Caveats" section in the README.

People have opened several issues for this exact same problem although the "Getting Started" section in the README tells Windows people what to do.

@justletmecreatetheaccount, could you provide some suggestions as of where I should put the documentation so people would read it?

justletmecreatetheaccount commented 11 months ago

Just did :D #99