jasonwilliams / anki

Anki VSCode Plugin
MIT License
273 stars 31 forks source link

Support Cloze for Latex Equations #85

Open Mjvolk3 opened 1 year ago

Mjvolk3 commented 1 year ago

When I try to use Cloze on latex equations now, they do not render properly. For example they the $ sign is just recognized as an actual $. Thanks for your consideration.

rleyvasal commented 1 year ago

This can be done as follows: [This should also be helpful in the documentation]

# Mathjax with Cloze

## \[ {{c2::\left(\frac{d}{b}\right)^{n} }}={{c1::\frac{a^{n} }{b^{n} } }} \]

\[ enter mathjax with cloze here \]

mathjax_with_cloze

rleyvasal commented 1 year ago

@jasonwilliams may need to look further into this one.

Maybe the math parser in Anki for VSCode is not replacing the $$ mathjax $$ to \[ mathjax \] on the ## card line.

$$ mathjax $$ not working on ## Card line but \[ mathjax \] works

Note that \[ mathjax \] is Anki Mathjax syntax

Example below

# Mathjax with Cloze

## \[ {{c2::\left(\frac{d}{b}\right)^{n} }}={{c1::\frac{a^{n} }{b^{n} } }} \]

\[ enter mathjax with cloze here \]

This is Anki syntax, not markdown.

## $$ {{c2::\left(\frac{d}{b}\right)^{n} }}={{c1::\frac{a^{n} }{b^{n} } }} $$

$$ enter mathjax with cloze here $$

Not working.
jasonwilliams commented 1 year ago

This looks like a duplicate of https://github.com/jasonwilliams/anki/issues/102 can I close this?

I also commented there

rleyvasal commented 1 year ago

I believe this is not a duplicate.

This issue is about Cloze and Mathjax on the Card header, whereas https://github.com/jasonwilliams/anki/issues/102 is about an issue with underscore _ in the Mathjax not being rendered correctly by Markdown marked parser.

Note: There are no problems with Markdown underscores _ in this issue.