Adding sample cloze strings to Back, without generating cards

I want to create a Note as follows, which will generate only ONE card - for the c1 cloze deletion in the Front.

Front:
If a cloze deletion can be guessed from {{c1::surrounding}} text without true knowledge,
you must add {{c1::real world context}} or {{c1::restructure}} the card.

Back:
Example:

{{c1::Mitochondria}} produce energy. (before)

In cardiac cells, {{c1::mitochondria}} work 24/7 to {{c2::convert}} fatty acids into ATP through {{c3::oxidative phosphorylation}} (after)

However, this STILL generates FOUR cards.

To prevent Anki from processing cloze syntax on the back of your card as actual cloze deletions, I figured that I need to escape the curly braces in the back content.

So I escape the braces on the back - by converting them into html entity codes as follows:

<b>Example:</b>
<div style="color: gray; font-family: monospace">
&#123;&#123;c1::Mitochondria&#125;&#125; produce energy. (before)
  <br><br>
In cardiac cells, &#123;&#123;c1::mitochondria&#125;&#125; work 24/7 to &#123;&#123;c2::convert&#125;&#125; fatty acids into ATP through &#123;&#123;c3::oxidative phosphorylation&#125;&#125; (after)
</div>

However - Anki still generates four cards - three of which show up as cards that do not have anything displayed on the front during review.

What is the official way to ask Anki to ignore Cloze Deletions in the Back - when using Cloze type Notes?

It shouldn’t. Do you have {{cloze:Back}} in your template instead of the default {{Back}}? Without the cloze: part, Anki won’t convert them to close.

Though Anki wouldn’t allow you to add that card now. I’m not sure how to make it work without adding a space:

<div>{{ c1::Mitochondria}} produce energy. (before)</div>

Or adding fake double colons:

{{c1։։Mitochondria}} produce energy. (before)

With the fake colons, you’d get a single card looking like this:

My Back Template is

{{cloze:Text}}<br>
{{Back Extra}}

I am adding the example to the Back Extra field in the Note.

But in this case you’d get a warning and cannot add the card:

Can you try the fake double colon one I mentioned?

How to type in a fake double colon? (escaping?)
In your post they look like a normal double colon.

For now, per your suggestion - I tried fixing the Note with an added space after the first double brace {{ c1:like this}} - in all the sample clozes on the Back - and only one Card was generated.

But this may not be the best solution.

Indeed, they look very similar. I do not know how to type them on a keyboard. You can copy and paste them though from here:

Interesting!
I pasted your fake double colons into a file and did a hex dump.


a@thinkpad MINGW64 ~
$ od -h fake.txt
0000000 89d6 89d6 000a
0000005

a@thinkpad MINGW64 ~
$ od -h real.txt
0000000 3a3a 000a
0000003

What is this 89d6 character!? - As pointed out by remline below - this is UTF8 and the unicode codepoint cannot be read straight from the output of od.

I searched online for colon lookalikes. I think it was stackoverflow or similar; searching for it now, I somehow cannot find the exact page I copied it from, though.

I searched for your fake colon character by pasting it in - and that led me to a page that told me that it was

Unicode Character “﹕” (U+FE55)
﹕
Name: Small Colon

There seem to be a bunch of similar characters:

Based on ":" (U+003A)
[U+FE13︓Presentation Form For Vertical Colon]
[U+FE55﹕Small Colon]
[U+FF1A:Fullwidth Colon]

Since fake.txt is encoded as UTF-8, we can’t read the code point directly from the hex dump. This is because code points greater than 0x7F require multiple bytes to encode.

The colon character in Anon’s example is 0x589, “Armenian Full Stop”.

Oh yes - UTF8 :laughing:

echo "։" | hexdump -C

You see the UTF-8 encoded bytes for the Armenian full stop character ‘։’.

Output:

d6 89

This means the character ‘։’ is stored as two bytes: d6 and 89 in hexadecimal.

2. Step-by-Step: Decoding the Bytes

Let’s break down how these bytes represent ‘։’ in Unicode.

a. Convert Hex to Binary
  • d6 in hex = 11010110 in binary
  • 89 in hex = 10001001 in binary

So the bytes are:

11010110 10001001
b. Recognize the UTF-8 Pattern

For characters outside basic ASCII, UTF-8 uses two or more bytes.
A 2-byte UTF-8 character follows this pattern:

110xxxxx 10xxxxxx
  • The x bits hold the actual character data.
c. Extract the Data Bits

Take only the x bits:

  • From 11010110: the last 5 bits → 10110
  • From 10001001: the last 6 bits → 001001

Join them:

10110 001001
d. Combine and Convert to Decimal

Put the bits together: 10110001001

  • In decimal:
    1×2^10 + 0×2^9 + 1×2^8 + 1×2^7 + 0×2^6 + 0×2^5 + 0×2^4 + 1×2^3 + 0×2^2 + 0×2^1 + 1×2^0
    = 1024 + 256 + 128 + 8 + 1 = 1417
e. Find the Unicode Code Point
  • 1417 in hexadecimal = 0x589
  • Unicode notation: U+0589

This matches the Unicode for ‘։’ (Armenian full stop).

Summary Table

Character Hex Bytes Binary Unicode Code Point
‘։’ d6 89 11010110 10001001 U+0589
sudo apt install icu-devtools
alias unidump='uconv -x "::Any-Hex;"'
echo "։" | unidump
\u0589\u000A

So - Is inserting fake colons the best way of adding cloze strings on the reverse side of a Cloze Note, or is there any other way? :slightly_smiling_face:

Use a special syntax in your fields then use JavaScript to display it correctly.

Back:

[[c1::Mitochondria]] produce energy.

Back template:

<div id="t">{{Back}}</div>

<script>
var e = document.getElementById("t");
e.innerHTML = e.innerHTML.replaceAll("[[", "{{");
e.innerHTML = e.innerHTML.replaceAll("]]", "}}");
</script>

Edit: you can use this addon to automate typing the special syntax. https://ankiweb.net/shared/info/1899278645

If I understand the problem correctly, the purpose of those strings is purely to act as examples of what you could put on a cloze note – is that right?

You don’t need anything sophisticated to disrupt the flow of the {{c . Try hiding some HTML in there, like code-blocking or a zero-width space entity – so it won’t be visible in your example.

{{<code>c7::balloon</code>}}

{{<span>c8::windowsill</span>}}

{{&ZeroWidthSpace;c9::elephant}}

These worked for me [when entered in the HTML view] in a cloze note type for both a cloze-filtered field and a non-cloze-filtered field – and on a non-cloze note type.

Oh - thank you! this is simple.

I had tried
<code></code> and <pre></pre>, but the tags were outside the curly brackets.
That does not work.

<code>
This - put in the Cloze Note's 'Back Extra' field DOES NOT work - it produces three extra incorrect cloze cards.
{{c7::balloon}} {{c8::party}} {{c9::streamers}}  
</code>

but - as per @Danika_Dakika s suggestion - this works

This - put in the Cloze Note's 'Back Extra' field works! - it does not produce three extra incorrect cloze cards.
{{<code>c7::balloon</code>}} {{<code>c8::party</code>}} {{<code>c9::streamers</code>}}