For context, I’m making flashcards in Anki to learn a foreign language. Right now it’s based on Basic notes with a front and back, plus some extra formats. Most of it is for vocabulary, which works well with Front and Back.
Next I want to tackle grammar, which can easily be tackled with Cloze. I want to use Cloze eventually so I am able to create cards on the fly as I am reviewing them. The alternative is understand every grammar rule and make a format for each of them, which has its own merits, but not the ones I’m looking for.
My question: Can I add a field with Cloze markers {{c1:}}, and a format that recognizes these Cloze markers and generate as many cards as there are Cloze markers?
It seems I cannot, what are my options? Preferably programmatic options.
I use example sentences for the vocabulary card. Sometimes I see a grammar formulation I don’t recognize, and I’d like to make a cloze from it without creating a new note, so I can create them as I review my cards.
I also want to use the bury new/review cards, because I might be able to guess the answer from remembering the whole sentence.
But I guess it makes sense to start with a separate cloze notes for now.
I would never encourage someone to spread the same information across multiple notes! I’m a stalwart supporter of keeping related information together. The question I would ask – does having the same/similar example sentence make a vocab word and a grammar idea (which after all, could be happening to a different word in the sentence) related enough that they belong on the same note?
An alternative approach could be that when you see a new grammar formulation, make that the basis for a new grammar-note, and take a moment to learn it by creating other sentences that use that formulation. You can use those on your grammar-note and not have any overlap with your vocab-note sentences.
However, you have a better idea of what will suit your needs here than I do! If you want to keep things united in a note and cloze is better for your grammar purpose than a question/answer type, you can do this with a custom Cloze note type.
You can’t use a Basic note type to make Cloze cards – but you can use a Cloze type to approximate Basic cards. At its simplest –
Question?
{{c1::Answer}}
You’ll probably want to add a separate cloze-field to your template for your grammar clozes, but as long as you understand the basic logic of cloze, it might work. Let me see if I can recite this correctly …
When the Cloze type prepares to display the Cloze 1 card, it searches every field marked “cloze” in the template looking for c1 markers. Then it displays all of those fields with the c1 text deleted. If you want multiple cloze-fields to show up on the card, you need them to have the same cloze-marker, even if it’s empty.
Experiment with that a bit and see if you can come up with something that satisfies your needs.