Jwrede / Anki-KaTeX-Markdown

Creates a new Basic and a new Cloze Note Type that support Markdown and KaTeX
75 stars 5 forks source link

Request align environment support. #15

Closed pilgrimlyieu closed 3 years ago

pilgrimlyieu commented 3 years ago

2021-08-28_15-24-36 2021-08-28_15-25-34

aligned environment works but align environment doesn't.

Here is the test code.

$$\begin{align}a&=1\\bc&=1\end{align}$$

$$\begin{align}a=1\\bc=1\end{align}$$

$$\begin{aligned}a&=1\\bc&=1\end{aligned}$$

$$\begin{aligned}a=1\\bc=1\end{aligned}$$
Jwrede commented 3 years ago

Hi, this is a problem with KaTeX itself, the error is known but there seems to be no fix for it (https://katex.org/docs/issues.html 4th bullet and https://github.com/KaTeX/KaTeX/issues/1007). I don't know why they think aligned is a replacement for align because aligned doesn't provide the numbering which is especially important for math cards but sadly I can't change anything internal in KaTeX.

pilgrimlyieu commented 3 years ago

Hi, this is a problem with KaTeX itself, the error is known but there seems to be no fix for it (https://katex.org/docs/issues.html 4th bullet and KaTeX/KaTeX#1007). I don't know why they think aligned is a replacement for align because aligned doesn't provide the numbering which is especially important for math cards but sadly I can't change anything internal in KaTeX.

OK. Thanks you. But I can use align environment through KaTeX in VSCode.😂

Jwrede commented 3 years ago

Yea same, I'm pretty sure the problem lies in the auto-render addon for KaTeX which I'm using and the VSCode markdown plugin uses its own renderer