Skip to main content

Cloze Cards

Cloze cards allow you to hide parts of a sentence or block to test your recall.

Cloze Macro Syntax (Logseq Anki Sync Plugin style)

This is the recommended syntax. This uses numbering to give you full control over card grouping:

  • {{c2 Japan}} is the capital of {{c1 Japan}} (aka {{c1 Nipon}}).

This produces two cards:

FrontBack
Cloze card front 1
Cloze card back 1
Cloze card front 2
Cloze card back 2

Use digits 1-9 to group clozes into cards (c1, c2, etc.).

Original Logseq Cloze Macro Syntax

Logseq's original cloze syntax is also supported for backwards compatibility:

  • Tokyo is the capital of {{cloze Japan}} (aka {{cloze Nipon}}).

This creates separate cards for each cloze but doesn't allow grouping multiple clozes onto one card.

FrontBack
Logseq cloze front 1
Logseq cloze back 1
Logseq cloze front 2
Logseq cloze back 2

replaceCloze Syntax

The replaceCloze block property lets you use search-and-replace patterns so you can create cloze inside code blocks or math expressions.

  • replacecloze:: " 'a^{2}+b^{2}', /(c\^2|c )/gi " The Pythagorean theorem is $$c =\sqrt{ a^{2}+b^{2} }$$ $$c^2= a^{2}+b^{2}$$
FrontBack
replaceCloze front 1
replaceCloze back 1
replaceCloze front 2
replaceCloze back 2

Tips

  • Combine cloze syntax with extra:: blocks to provide mnemonics.