badlydrawnrob / anki

Learn to code with Anki — flashcards and themes for all learning levels. Master your programming language of choice!
MIT License
719 stars 61 forks source link

Allow multiple `{{c1::cloze tags}}` in Missing! cards? #111

Open badlydrawnrob opened 7 months ago

badlydrawnrob commented 7 months ago

⚠️ This idea might be dead in the water. I don't think it's possible with Anki right now (or ever).

It seems Anki requires you to add a {{c1::cloze tag}} to a cloze field for it to display at all.

No cloze found on card is an error that I've come across. This happens if no {{c1::cloze tag}} is allocated to a cloze field. However, if you have two cloze fields, you don't need to use both! Anki doesn't give an error, if you've added a {{c1::cloze tag}} to at least one field, but complains silently.

Making it clear that the field is a cloze type

Previous exploration

I think that multiple {{cloze:text}} fields would be problematic, as Anki complains if no cloze tags are assigned:

Basically Anki creates an empty card if you don't add a {{c1:cloze tag}} (see below).

Empty cards with no cloze tags

Here's one card that has a field (the only cloze field) without a card. To delete it, you have to deselect the checkbox keep notes with no valid cards and hit delete. Otherwise the "empty" card will show up in your study deck as in the above images.

Screenshot 2024-01-17 at 16 52 45
badlydrawnrob commented 7 months ago

Doesn't work

2nd or 3rd cloze field with no tags

  • Both Title and Syntax (inline code) are cloze fields here (without tags)
  • Neither of them render in the card
Screenshot 2024-01-17 at 17 27 15

Also doesn't work ...

A {{c1:cloze tag}} across different fields

  1. Renders the tag (not the answer)
  2. The frontside doesn't even render the field text
    • the reverse renders the full tag (not only the answer)
Screenshot 2024-01-17 at 18 23 39 Screenshot 2024-01-17 at 18 23 46 Screenshot 2024-01-17 at 18 24 02 Screenshot 2024-01-17 at 18 24 09

Does work

2nd, 3rd, 4th, etc cloze field with a tag. However, any cloze field that doesn't have a {{c1::cloze tag}} in it will not render. Damn.

Screenshot 2024-01-17 at 17 27 47
badlydrawnrob commented 7 months ago

Conditionally load the title if no {{c1::cloze tag}} exists?

Screenshot 2024-01-17 at 18 08 33