Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math commands not supported, don't know why #110

Closed
NeoFantom opened this issue May 20, 2021 · 3 comments
Closed

Math commands not supported, don't know why #110

NeoFantom opened this issue May 20, 2021 · 3 comments

Comments

@NeoFantom
Copy link

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

@sehnryr
Copy link

sehnryr commented May 21, 2021

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

@goessner
Copy link
Owner

@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.

@goessner goessner closed this as completed Jun 2, 2021
@dlqqq
Copy link

dlqqq commented Jul 6, 2021

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 🥂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants