Anki as a knowledge base (with a "massive cloze note")

Sorry for taking so long. I wanted to resist the urge to post every little advance on the first impulse and make sure things are fleshed out before sharing (Edit: guess this one was still a bit to hasty haha). Here is a demo deck that uses the note template I worked on the past few days.

[Forum] - Massive Cloze Demo Deck - AnkiWeb

Items may be separated with

  • an ordered list (<ol>)
  • a <table>
  • <br><br> (paragraphs)

Companion Add-on: Auto-scroll to Cloze - AnkiWeb

I wrote an add-on you might find useful when editing large notes:

demo (1)

It scrolls to the cloze responsible for the selected card in the browser. It is a feature I have written a while back for my own private note type, but now that there seems to be an interest in this, I generalised it a bit and made it work with tables too.

The add-on is currently set to only work with the demo note type to make sure there are no issues with your other note types.


There seems to be some issues both with the note type and the add-on. If anything doesn’t work as expected, please notify me here or per dm, so I can fix it.
Edit: I updated the demo deck listing. Let’s see if this one is more stable.

5 Likes

So, how am i supposed to use the Add-on?
Maybe i’m missing a button or hotkey, but couldn’t make it work.

I’ve just downloaded the deck, but cards are displayed as blank cards, both in review mode and in preview mode (Windows version). Is there something I need to do?

Edit: Found the issue. I used some fancy JS syntax that I found out about just yesterday - and that only worked on Linux. A fix will come shortly.

It should automatically search for the relevant cloze and scroll to it - as long as the note contains either an ordered list or a table.
For lists you can either use the native Anki 2.1.46 buttons or Mini Format Pack - AnkiWeb for lower versions.

Also, since the note type id of the demo deck is hardcoded into the add-on, it won’t work on different note types (as a safety measure to prevent unwanted styling).
I will write some config logic so you can define which note types will be enabled.

Sorry for the inconvenience - it’s all very rough and experimental currently. This will take me some time.


That’s strange. I will check on Windows to see if I can replicate this. Edit: So far I couldn’t. Would you mind sharing the error message - if there is any - per dm?

According to my tests, it should currently work on the following clients:

  • Anki Desktop (Linux & Windows, Mac not yet tested)
  • AnkiDroid
  • AnkiMobile
    • (Here the header won’t behave like it should (position: sticky) due to a different document structure. I’ll have to ask the forum for help.)
2 Likes

Hey, the Add-on seems to work right now, by the way how can i strip basically all the styling from the template?

I want a normal cloze note type regarding the style, but i don’t want to loose any functionalities like the indicator for active paragraph.

I’m looking for something similar to this, but with the indicator and the rest of functionalities.

It can’t look exactly like the normal cloze note type for several reasons (mainly the scroll functionality), but I updated it to be more plain by default:

[Forum] - Massive Cloze Demo Deck | Revised Edition - AnkiWeb

Kooha-2021-08-08-13_02_53

Changes

  • Remove all color functionality
    • I had forced this upon you without it being requested and never explained how to use it.
  • Simplify styling
    • The default style is now as plain as reasonably achievable.
    • I commented some variables and left definitions you can tweak on top.
    • CSS that is meant to be preserved for the note type to work is now minified.
  • Extra information is now blurred on the backside, not completely hidden
    • it can be revealed by
      • scrolling
      • clicking/touching anywhere
      • hitting Tab (key can be changed, search for “keydown” in the code)
  • Demo deck contains fewer notes (one for each method).
  • AnkiMobile is now supported.
    • Header stays fixed now.
    • Some buggy visuals on card flipping have been observed on my old iPad.

@01101 I left the default accent color blue as this is what most people are used to. If you want the clozes to be green, you can use something like #04aa6d for the variable --accent-color. Please let me know if this is any better.

3 Likes

That’s perfect! Thanks a lot. Every time i’ve asked you for something you’ve gone above and beyond to provide a solution, you’re definitely an inspiration for me.

2 Likes

is it compatible with “Closet” right now? if not, will it be?

I could make it compatible, no problem. However, that would complicate the note type a bit, because I would need to add some more fields. Also, I wouldn’t do it with a cloze note type (it won’t allow you to use the Closet clozes, which are arguably better).

If I do that, I will publish it as a separate deck. I’ll take a few days off from that though to focus on other stuff :wink:

1 Like

Completely understandable, thanks for all the work you’ve been doing. :+1:

1 Like

Matthias’s work is fantastic, when I suggested the feature in this post to enable a “massive cloze” I never imagined that something would be done with such speed, quality and much beyond than what was suggested and imagined.

Thanks for facilitating our study :slight_smile:

The only problem I couldn’t solve was fixing the header style and the letters were also very small on my computer, although they were in a nice size on AnkiDroid, but I think this is my problem as an ignorant user (haha) and not from this amazing note.

1 Like

Do you mean this?

Yeeep!

It is like if font-size: clamp(12px, calc(0.96em + 0.96vmin), 22px); and --header-font-size: clamp(20px, calc(0.97em + 0.97vmin), 26px); always be in the smallest size possible for me.

I don’t know if it was supposed to be done this way, but this is what i’ve done for changing the header style and font family and size of the text.

Header(Front):
anki_MlIGu81y4q

Font family(Styling):
anki_g1KT49Et4E

Font size(Styling):
anki_fDuvJTLFdi

2 Likes

A little better, thank you.

1 Like

The answer here is that Anki Desktop (newer versions) don’t support the new CSS commands yet. clamp, max, min, stuff like that. I remember my templates suddenly not working from updating Anki, and it turns out that Anki Desktop downgraded their some versions back.

2 Likes

On the one hand it’s good to know that I wasn’t doing any nonsense, on the other hand it’s curious that the new versions don’t support such features.

I am currently with 2.1.44.

Thanks for clarifying.

@kleinerpirat This is awesome work! I’d like to ask if there is a way to incorporate an “extra section” that only appears when the corresponding card is being reviewed. For example, I would like to make a Cloze deletion “{{c1::mitochondria}} is the powerhouse of the cell” and I would like to add extra background info that is related just to this card (ie. “mitochondria makes ATP”) and only appears when this Cloze is being reviewed. Is this possible, or if not, could you suggest any workarounds? Currently, I’ve been placing the extra information under the same Cloze number, so as to keep them together, but I would like to know if there is a more elegant way. Thank you again!

The cleanest (and easiest) solution I can think of is to use my Tippy Tooltips add-on.

For now, it doesn’t support extended editing, so it’s only suitable for short tooltips. But in the future, I will extend its functionality.

Furthermore, with an extra script (included in sample note type) you can automatically convert Wikipedia links into preview-tooltips:


Take a look at the first three cards of the note “History of Medicine” in the sample deck (which I updated right now) to see how I would use it.

If something doesn’t work, please don’t hesitate to report your issue on the support thread: Tippy Tooltips [Official Support]

Hi,
how do you exactly implement this template?

Can you make a step by step instructions for dummies? :smiley:

Because:
-I added a new note type (cloze)
-then when clicked on “Cards” i copy pasted the HTML code in front template, but nothing happened…

-when I made a card with multiple questions, only one poped up, not showing the whole picture