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

Extra cloze cards generated for specific inputs - possibly involving Latex #1411

Open
cjappl opened this issue Feb 9, 2024 · 1 comment
Open

Comments

@cjappl
Copy link

cjappl commented Feb 9, 2024

Describe the bug
There are a "more than expected" number of cards generated for cloze deletions. These cards all contain LaTex formatting in the cloze deletion. For instance, a card with 2 sections that are cloze sections may generate 4 cards. The last two cards if opened have an error in Anki.

To Reproduce

  1. In Notion, have cloze generations like the following, with Latex in place equations:
    "DFT: symbol $t_n$ denotes the time at sample $n$." (formatted correctly, using latex inside of cloze blocks)
Screenshot 2024-02-09 at 11 50 32 AM
  1. Export using 2Anki

  2. Open cards in "browse"

Expected behavior
2 cloze cards generated, one for each code block

Observed behavior
Screenshot 2024-02-09 at 11 51 34 AM

4 cards are generated. If you attempt to open the 3rd or 4th card you get an error
Screenshot 2024-02-09 at 11 53 04 AM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Firefox
  • Version 122.0

Additional context
This does not seem to happen on ALL cloze of this type.
Screenshot 2024-02-09 at 11 54 59 AM
properly generates 3
Screenshot 2024-02-09 at 11 55 20 AM

Screenshot 2024-02-09 at 11 55 51 AM Improperly generates 3 Screenshot 2024-02-09 at 11 56 11 AM
@cjappl
Copy link
Author

cjappl commented Feb 15, 2024

It does seem that having cloze deletions that are Latex in-line formulas does not behave well in many but not all cases.

Symptoms described above, but also there are situations where an unexpectedly many number of clozes are created (for instance in spaces around words, around formulas)

if an inline formula is "$f" for purposes of me writing it here, a statement, and quotes "" surround the intended cloze

Hello "$f" I am testing the cloze "deletion with $f latex symbols like $f"

You would expect the clozes to be
$f
deletion with $f latex symbols like $f

but many times there are a bunch, like:
$f
deletion
' ' (empty space)
with
' $f'
latex symbols
' ' (empty space)
'like '
$f

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

1 participant