Open amatsune opened 1 month ago
@abdnh or @RisingOrange I think I discussed this idea with you in the past to make it possible to do a cloze overlapper via the note styling without needing the addon. Might be worth looking into this here?
@AnKingMed I think you mentioned implementing something like this https://github.com/michalrus/anki-simple-cloze-overlapper?
Yeah whatever you think is simplest and best
The trickiest part is probably that we need to add a new field to the note type and make sure it's working properly with AnkiHub.
Could we use one by one field?
We can but that's unintuitive, since it's not tied to the one by one feature.
@amatsune Does this sample deck work as expected for you? (Try it in a new profile) cloze overlapper.zip
It's a basic implementation of cloze overlapper that works with the one-by-one feature.
I'll have to do some testing. Can't do it today though
Which Note Type (and version) is this about?
All notes that use Cloze deletions
Checklist
What Anki version are you using?
What Operating system are you using? (i.e. MacOS, Windows, Linux)
Windows 11
Problem case
Currently it's not possible to create real "overlapping clozes" in the Anking card format. I'm aware of the One-by-One cloze feature, but it lacks the option to hide the remaining cloze field (similar to the Image Occlusion hide one-guess one/hide all-guess one.
I often have a need for cards that share overlapping cloze contents but that only reveal one field in the front like this:
I achieved this result using the Modern Cloze Overlapper (MCO).
I tried to make a copy of the Anking card type and edit the script into the card format, but didn't manage to get it to work. I had a card with duplicated text:
Front:![image](https://github.com/AnKing-VIP/AnKing-Note-Types/assets/48121978/3844a377-e7b5-4329-9628-6ca0aeb7198e)
Back:![image](https://github.com/AnKing-VIP/AnKing-Note-Types/assets/48121978/c7966461-a687-4fe7-bccf-51a934659eb2)
I tried removing the part of the code that output the front/back text, and managed to remove the duplication issue, but that gave me another set of problems: I either got rid of the anking one-by-one function and formatting/styling (notice the difference in the shade of pink of the cloze field) or the MCO didn't do anything.
Front:
Back:
I can't seem to find a way to reconcile the two features and get them to work together.
Solution
Integrate the function of the MCO card to the Anking note types (including the Before|After|OnlyContext|RevealAll|InactiveHints customization field).
Else, make the Anking note type at least compatible, for those who decide to manually add the required card formatting script.
Else, if possible, I'd settle for some guidance on how to create a custom workaround for me and others who might have an interest.
More information
I know I'm overreaching at this point but... since this issue is regarding overlapping clozes, if there was a way to create clozes that only partially overlap such as:
{{c1::((c3::This [[c2::is)) a ((c3::cloze}} deletion))]]
Card 1 […] deletion
Card 2 This […]
Card 3 […] a […]
Not sure how the syntax for that would have to work, so I used multiple punctuation marks to make them clear, though something like this would likely be optimal:
{{c1::{{c3::This {{c2::is::c3}} a {{c3::cloze::c1::hint}} deletion::c3::multi word hint}}::c2}}
Card 1 [hint] deletion
Card 2 This […]
Card 3 […] a [multi word hint]
If keeping the MCO Before|After|OnlyContext|RevealAll|InactiveHints field, a possible result would be something like:
{{c4::This {{c1::is a much {{c2::longer::c1::hint 1}} cloze::c2::hint 2}}::c4::hint 4}} deletion for {{c3::exemple::c3:: hint 3}}
Card 1 This [hint 1] cloze deletion for exemple
Card 2 This is a much [hint 2] deletion for exemple
Card 3 This is a much longer cloze deletion for [hint 3]
Card 4 [hint 4] deletion for exemple
Some different settings would result in:
Card 1 (1,1,false,true,false) This [hint 1] cloze deletion for exemple
Card 1 (0,2,false,true,true) This [hint 1] cloze deletion for exemple
Card 2 (1,0,true,true,false) This is a much [hint 2] deletion for
Card 3 (1,1,false,true,false) This [...] cloze deletion for [hint 3]
Card 4 (0,0,false,true,true) [hint 4] deletion for [hint 3]
Card 4 (1,1,false,true,true) [hint 4] deletion for exemple
EDIT: Finished the suggestion and some formatting.