Help with cloze formatting and bullet points

Hello there, I’m looking for help with a problem that I am encountering with card formatting.

The issue arises when I want to put two or more bullet points embedded within a cloze. What ends up happening is that only the top bullet point appears correctly formatted like a normal answer would, the other bullet points appear similar to other non-answer text.

appearing like

I know that I can just have a cloze attached to each bullet point individually, but I’d rather not have the “hint” that the answer requires two bullet points, if that makes any sense. Any help is sincerely appreciated!

For reference, here is the formatting of the card

Hi,

Try this formatting (it reminds me of C++…)? Not particularly pretty, but it seems to do what you want. Note: there seems to be a strange behaviour associated with how cloze works; I will report that now.

HR

image

Here is the bug: Cloze resets indentation of bullet points to level one

You are exactly right. That does what I want in terms of the formatting of the answer, but it doesn’t look good.

image

I’ll try to keep playing around with it

Try this format (press Shift+Enter to insert a <br> instead of <p>)

image

So with that layout I go back to my initial issue of the answer text looking the same as the question text

This seems like a slightly different issue, but I appreciate you reporting it. Maybe this is just something that might need to be updated down the road.

Maybe try this: open the HTML editor (e.g. by clicking CTRL+Shift+X), then move <li> after {{c1::

E.g. this HTML will give this result


But after moving <li> after the opening cloze ‘tag’ it should look something like this:


Here is the initial card text/HTML editor before making any of your suggestions

What the answer looks like

I could be completely missing something (e.g. I had no idea this HTML editor ever existed prior to this conversation) but it looks like the <.li> is already after the opening cloze.

If that is your HTML, try moving the marked </li> before {{c1::

This is a fun game of whack a mole. Here is the updated text/HTML editor.

So that fixed my initial problem of bulleted list (or at least anything beyond the first bullet point) not appearing as an answer should. But now this created two new issues.

  1. On the back of the card, the next header, in this case “Major contraindications” now appears as an answer

  1. On the front of the card the “Major contraindications” is formatted incorrectly (not aligned with the rest of the list despite appearing so in the text editor).

Also, I thanks for all y’alls help so far. It honesty is very much appreciated.

Try replacing your HTML with this:

<div style="text-align:center">TEST 2</div><ul><li>Indications/Contraindications</li><ul><li>FDA approved for:</li><ul>{{c1::<li>GAD</li>}}</ul><li>Offlabel use:</li><ul>{{c1::<li>Unipolar depression (augmentation, off-label use)</li><li>SSRI associated sexual dysfunction</li><li>Movement disorders (third/fourth line)</li><li>Shivering, targeted temperature management</li>}}</ul><li>Major contraindications:</li><ul>{{c1::<li>Hypersensitivity to buspirone or its components</li><li>Concurrent use of MAOIs</li>}}</ul></ul></ul>

The alignment and the cloze syntax now seem to behave correctly on my computer.
If it still does not work correctly on your end, please send a screenshot of the Styling section of your notes (you can access it by cliking on the Cards... button at the top of the Editor or pressing Ctrl+L).

To summarize the changes, I tried to simplify and tidy up the code a bit. For details about the HTML, see the spoiler.

Some technical details for future reference
  • if there are opening and closing tags straddling {{c1:: or }}, they will often interfere with the cloze-syntax and will make the cloze deletion not render properly.
    E.g.: <li>{{c1::</li> or <ul>{{c1::Example </ul>}}

  • In general, it is advisable to keep the opening (<tag>) and closing (</tag>) tag either both inside or both outside the cloze.
    E.g.: <ul>{{c1::<li>Example</li>}}</ul>

  • You can check which opening tag corresponds to which closing tag, by clicking on either of them in the HTML editor. Anki should automatically highlight both of them:

  • To make the alignment of the Front side of the card more consistent, make sure that all the clozes follow the same pattern regarding <ul> e <li>.
    E.g. usually you should not have both <ul>{{c1::Example}}</ul> and {{c1::<ul>Example 2</ul>}} in the same note.

If this does not fix it and/or you have any questions, please ask!

1 Like

That fixes the issue perfectly. Thank you so much for helping me with the issue and teaching me something new about anki!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.