goessner/mdmath

Math commands not supported, don't know why

NeoFantom opened this issue · 3 comments

Why my many math commands won't compile? E.g. \ket is not supported. Do I have to manually install something like KaTeX?

Same issue encountered, though mdmath doesn't says clearly it uses KaTeX for math it seems like I can still use the cases environment but I cannot use align nor equation with split nested in it.

```math
\begin{align}
    \sum\vec{F_{ext}}=\frac{d\vec{p}}{dt}
\end{align}
```

Should show:
image

We can easily fix that by writing :

```math
\sum\vec{F_{ext}}=\frac{d\vec{p}}{dt}
``` (1)

image

But when it comes to equation and split :

```math
\begin{equation}
    \begin{split}
        \sum\vec{F_{ext}}&= m\vec{a}\\
        \vec{P} + \vec{f_f} &= m\vec{a}\\
        m \vec{g} -\lambda \vec{v} &= m\vec{a}\\
        -mg\vec{e_y} -\lambda (\vec{v_x}+\vec{v_y}) &= m(\vec{a_x}+\vec{a_y})\\
        -mg\vec{e_y} -\lambda\vec{v_x} -\lambda\vec{v_y} &= m\vec{a_x} + m\vec{a_y}\\
        -mg\vec{e_y} -\lambda\dot{x}\vec{e_x} -\lambda\dot{y}\vec{e_y} &= m\ddot{x}\vec{e_x} + m\ddot{y}\vec{e_y}\\
    \end{split}
\end{equation}
```

image
It doesn't renders and shows an error..
image

@NeoFantom: Function \ket{\psi} works for me ... can't reproduce (dollars delimiters used)
grafik

@sehnryr: In readme.md it is stated explicite, that mdmath depends only on markdown-it and katex.

I cannot reproduce above failures, as both work for me
grafik

and
grafik

... beware of automatic numbering with katex.

dlqqq commented

There's a few things that could be causing this:

  1. You could be using the wrong extension. I've seen at least 3 markdown extensions are called some variant of "Markdown Math", though most are out-of-date (meaning you can't use relatively new features like equation environments or bra-ket notation). Search for goessner.mdmath.

  2. You have the Markdown All-In-One extension with its own (outdated) KaTeX math engine enabled. Disable that in the extension settings.

After following the above steps, I got this extension working beautifully 🥂