- Home
- THEME
- Simple Anki theme
- Puzzle Anki theme
- Cloze Anki theme
- Selectable
- THEME COLOURS
- THEME
I've been experimenting and using this theme A LOT. It's very quick to generate lots of cards, but takes a little care and consideration to get right.
Key: ★ Required / ☆ Optional (recommended)
The Cloze theme is very flexible. You can do pretty much anything you like with it, and generate as many cards as you like (though I advise no more than 5 per note, or things can become unwieldy).
You'll recognise some of these fields from the Puzzle and Simple themes.
- The main question, statement or fact.
- The type of
Syntax
we're learning.
- The actual function or symbol, i.e.
len()
. - This will be wrapped in
<code>
- Here we create our cloze deletions, allowing us to hide/show code easily — You can learn more about clozes in the Anki documentation. See notes about known bug in Anki Power Format Pack plugin.
- Enter a
<pre>
block with a cloze tag:x.{{c1::is_integer()::x is a float, check if int}}
- You can use multiple cloze tags on the same card:
{{c1::int(x)::x is a string, convert to int}}
- Or, create separate cards within the same code block:
print('True if x.{{c1::is_integer()}} else {{c2::'False'}})
- Syntax highlighting using the included themes.
- Enter a
- A short explanation of what we're trying to learn.
- For any key functions or symbols, wrap in
<code>
.
Key: ✎ Optional
Use sparingly, as it's always best to be succinct with Anki. Think of this as a 'reference' for future use:
- Links to documentation
- Supplementary notes
- Anything that is universal between cards
- Store raw
.md
for future editing, if necessary
- Power Format Pack renders the cloze fields as
pre
code, not cloze tags. This can be easily rectified by writing your code, converting to Markdown, then adding the cloze tags (perhaps keeping the{{c1:cloze tags}}
in the extra Markdown field as a backup.) - Fields marked Optional fields (☆ ✄ ♻ ✎) can be left blank and the template will ignore them. Required fields (✔ and ♞) are required in order for a card to be generated.
- You can reference fields within fields. For instance:
{{☆ Syntax (inline code)}}
or{{★ Key point (code block or image)}}
. This will pick up all the HTML from those fields.- Keep in mind any referenced fields will have to be manually edited if the field name is ever changed, which can be a huge pita.