frenya / vscode-recall

MIT License
24 stars 7 forks source link

Properly support math markdown. #8

Closed Sett17 closed 2 years ago

Sett17 commented 2 years ago

Math equations are rendered but the notation between the $$ is also shown.

Using equations in my flashcards would be a big part of my learning, so using those would be really helpful.

steps to reproduce:

---
recall: header
---

# test

$\alpha \cdot \pi$

# test2

$$
\alpha \cdot \pi
$$

outputs: img1 the output is the same for both tests above

expected output: img2

Right now I do not have time to look further into this, but maybe I will in a month or so.

frenya commented 2 years ago

Hi Sett. Thanks for reaching out. The issue was caused by a missing CSS file and is now fixed in v0.11.4. Let me know if if works correctly for you now.

Sett17 commented 2 years ago

I think now ( or maybe it was the case even before ) the inline notation does not work. This is not that big of a deal for me, because of the \text{} environment and the fact that my cards are mostly math.

frenya commented 2 years ago

Thanks for the update. The math seems to be rendering correctly in my environment (or at least the same as it does in the Markdown preview). Would you be willing to share some file that is not rendering properly so that I can investigate more? Thanks in advance.

YPOC commented 1 year ago

I still have problems with displaying math in cards.

recall: header
---

# test

## test2

this should be printed inline: $4\cdot 10^{-3}\,\text{rad}$, but is it?

next is some centered math: 
$$
a^2+b^2=c^2
$$
closing line

Recall's flash card: image

MarkDown preview: image

frenya commented 1 year ago

Hi, Yannick. In v0.12 of the plugin, I have added a feature that could help with this (as part of solving issue #14).

Can you please try running the 'Recall: Enable CSS styles from other markdown preview extensions' command and selecting the math-related css styles in the dropdown? Let me know if it solved your problem.

YPOC commented 1 year ago

Thanks Frantisek, selecting the katex.css from Markdown All in One resolved the issue.

image

frenya commented 1 year ago

Perfect. Thanks for letting me know.