Cloze Overlapper [Official thread]

Glutanimate's Avatar

Glutanimate

25 Feb, 2017 07:47 PM

This is the official support thread for Cloze Overlapper. Please direct all of your questions, suggestions, and support requests regarding the add-on here.

Showing page 3 out of 5. View the first page

  1. 61 Posted by silence820 on 14 Jun, 2017 02:03 PM

    silence820's Avatar

    has anyone had success using awesome tts or any other type of audio with this addon? if so please explain how you were able to make it work properly.

  2. 62 Posted by silence820 on 16 Jun, 2017 06:00 PM

    silence820's Avatar

    I have downloaded the audio cloze addon for anki, but I do not understand how to make it work. I would like to add audio from Awesome TTS to my flashcards that I created using the cloze overlapper addon but I cannot seem to get it to function properly.
    Here is my process;

    I used the regular cloze addon and it worked with awesome tts. The problem with me using cloze is it reveals too much information.

    I then used the cloze overlapper addon. Using your instructions, I then went in and edited each field. When I was done I added the cards to a test deck, and when I tried them no audio played. I went to the browse tab and saw that the fields did not have any of the edits I made to each word, only the words themselves remained. I have attached some screenshots to illustrate what I have written. It is obvious that I am doing something wrong, I just wish I knew what is was?

    Could you please provide some guidance on the matter?

    Also is it possible to add “type answer” to cloze overlapper, and if so, how?

    Thanks in advance for your help.

  3. 63 Posted by Derek on 19 Jun, 2017 03:22 AM

    Derek's Avatar

    I would like to be able to have nested overlapping too. An example best illustrates what I mean. Consider the following information:

    Information

    The three primary colours and example shades are:
    1. Red
         1.1 Crimson
         1.2 Ruby
         1.3 Vermillion
    2. Blue
         2.1 Baby blue
         2.2 Powder blue
    3. Yellow
         3.1 Cream
         3.2 Chiffon
    

    Top level card #1/3

    The three primary colours and example shades are:
    1. ???
         1.1 ...
         1.2 ...
         1.3 ...
    2. ...
         2.1 ...
         2.2 ...
    3. ...
         3.1 ...
         3.2 ...
    

    Top level card #2/3

    The three primary colours and example shades are:
    1. Red
         1.1 ...
         1.2 ...
         1.3 ...
    2. ???
         2.1 ...
         2.2 ...
    3. ...
         3.1 ...
         3.2 ...
    

    Top level card #3/3

    The three primary colours and example shades are:
    1. ...
         1.1 ...
         1.2 ...
         1.3 ...
    2. Blue
         2.1 ...
         2.2 ...
    3. ???
         3.1 ...
         3.2 ...
    

    Second level card #1/7

    The three primary colours and example shades are:
    1. Red
         1.1 ???
         1.2 ...
         1.3 ...
    2. Blue
         2.1 ...
         2.2 ...
    3. Yellow
        3.1 ...
        3.2 ...
    

    Second level card #2/7

    The three primary colours and example shades are:
    1. Red
         1.1 Crimson
         1.2 ???
         1.3 ...
    2. Blue
         2.1 ...
         2.2 ...
    3. Yellow
        3.1 ...
        3.2 ...
    

    Second level card #7/7

    The three primary colours and example shades are:
    1. Red
         1.1 ...
         1.2 ...
         1.3 ...
    2. Blue
         2.1 ...
         2.2 ...
    3. Yellow
        3.1 Cream
        3.2 ???
    
  4. 64 Posted by Glutanimate on 20 Jun, 2017 04:03 PM

    Glutanimate's Avatar

    @silence820:

    I'd love to help, but I'm afraid I don't have any experience with audio in overlapping clozes, or audio clozes in general. I'd give it a try, but I don't have the time for that right now. But hopefully somebody else who's used audio clozes before will be able to chime in and provide some guidance.

    As far as typing in the answer is concerned, please see here: https://github.com/glutanimate/cloze-overlapper/issues/1.

    @Derek:

    Thanks for the thoughtful suggestion. I'd like to explore transforming more advanced hierarchical lists into viable overlapping clozes in the future. It's only a matter of finding the time to do so :).

  5. 65 Posted by HoloLens on 27 Jul, 2017 01:14 PM

    HoloLens's Avatar

    I mostly use OC not for deal with list, but for hiding other clozes when reviewing one cloze, which can avoiding cloze-deletions of the same note being hints to each other. so setting "0,1,0 | n,n,n,y" is my favorite.

    Is it possible to make the cards generated by OC become "related"? so the two "bury related" options can work normally, which makes it exactly perfect to replace the original cloze-deletion function.

    Millions of thanks to create so many wonderful addons!


    Update: So idiot, just found "override sibling-spacing" option in the global setting, although only works for desktop, still useful! Thanks!

  6. 66 Posted by Glutanimate on 27 Jul, 2017 06:16 PM

    Glutanimate's Avatar

    @bootislands:

    Glad you found Cloze Overlapper useful and happy to hear that you figured that out. Just typing things out can sometimes lead you down the right path :) !

    Though for completeness' sake: The cards produced by the add-on are 'related' by default. It's only through the sibling-spacing override options that they become unrelated in respect to the burying options. This is only true for the desktop release, however. On mobile, sibling-burying should always be active, unless you've deactivated it in the deck options

  7. 67 Posted by Darcee on 29 Jul, 2017 05:03 AM

    Darcee's Avatar

    Help please
    All of a sudden the cloze overlapper will show only the first generated cloze overlapper. I have done the restore defaults. I have reinstalled it. It wont generate more than one cloze.

  8. 68 Posted by Glutanimate on 30 Jul, 2017 10:12 AM

    Glutanimate's Avatar

    @Darcee:

    It looks like you are using an add-on that restricts the search results in the browser to the first card ('Card' checkbox to the right of the search bar). Do the other cards appear if you disable that checkbox?

  9. 69 Posted by Darcee on 30 Jul, 2017 02:22 PM

    Darcee's Avatar

    Hi
    Oh wow!
    Thank you so much that is what it was!
     It happened after i deleted a card and I was freaking out cause I thought
    i lost all those cards.
    After trying some things i realized that the cards were still there and
    that maybe I accidentally changed some setting but couldn't figure out what
    it was.

    I use the cloze overlapper for most of my cards. I am very thankful you
    developed it.
    I have watched all your videos which have been very helpful.

    Thanks again
    Darcee

  10. 70 Posted by Glutanimate on 31 Jul, 2017 08:40 PM

    Glutanimate's Avatar

    You're very welcome! Happy to hear that Cloze Overlapper has become such a major part of your Anki experience.

  11. 71 Posted by Tanay Banerjee on 05 Aug, 2017 05:41 AM

    Tanay Banerjee's Avatar

    Hi,
    First of all, thanks a lot making our lives in the Anki world so much easier with your add-ons, more so this one. But people like me, who are not acquainted with programming, do from time to time find ways to mess up with the codes so as to make the add-on not work properly.
    So here is my problem, which with the the add-on is working but with the way it is displaying the text. I have tried to change the card templates a bit according to my need. But the alignments are getting a bit messed up.

    In the FRONT template I have added
    <div class="extra"><hr></div> {{#Mnemo}}{{Mnemo}}{{/Mnemo}}
    between
    {{cloze:Full}}</code> </pre>
    and
    <div class="hidden">

    In the BACK template I have added
    {{#Mnemo}}<div>{{Mnemo}}</div>{{/Mnemo}}
    between
    <div class="extra"><hr></div>
    and
    <div class="text"><div class="fullhint">{{hint:Original}}</div></div>

    In the STYLING I have changed a bit of font colour and font sizes along with the background colour.

    Here are changed templates in full:
    FRONT TEMPLATE

    <div class="front">
      {{#Title}}The manufacturing units of <div class="title">{{Title}}</div>
    are situated in <br>{{/Title}}
       <div class="text">
        {{cloze:Text1}}
        {{cloze:Text2}}
        {{cloze:Text3}}
        {{cloze:Text4}}
        {{cloze:Text5}}
        {{cloze:Text6}}
        {{cloze:Text7}}
        {{cloze:Text8}}
        {{cloze:Text9}}
        {{cloze:Text10}}
        {{cloze:Text11}}
        {{cloze:Text12}}
        {{cloze:Text13}}
        {{cloze:Text14}}
        {{cloze:Text15}}
        {{cloze:Text16}}
        {{cloze:Text17}}
        {{cloze:Text18}}
        {{cloze:Text19}}
        {{cloze:Text20}}
        {{cloze:Full}}
    <div class="extra"><hr></div>
    {{#Mnemo}}{{Mnemo}}{{/Mnemo}}
        <div class="hidden">
           <div>{{Original}}</div>
        </div>
      </div>
    </div>
    

    STYLING

    /* general card style /
    html {
      / scrollbar always visible in order to prevent shift when revealing answer*/
      overflow-y: scroll;
    }
    .card {
      font-family: Nunito,Arial,Calibri;
      font-size: 20px;
      text-align: center;
      color: black;
      background-color: #dfc;
    }


    /* general layout / .text { / center left-aligned text on card / display: inline-block; align: center; text-align: left; margin: auto; max-width: 40em; color: blue; } .hidden { / guarantees a consistent width across front and back / font-weight: bold; display: block; line-height:0; height: 0; overflow: hidden; visibility: hidden; } .title { font-weight: bold; font-size: 1.5em; / margin-bottom: 1em;*/ text-align: center; color:brown }


    /* clozes / .cloze { / regular cloze deletion */ font-weight: bold; color: blue; font-size: 1.5em; }


    /* original text reveal hint / .fullhint a { color: blue; } .card21 .fullhint{ / no need to display hint on last card */ display:none; }


    /* additional fields */ .extra{ margin-top: 0.5em; margin: auto; max-width: 40em; } .extra-entry{ margin-top: 0.8em; font-size: 0.8em; text-align:left; color: grey; } .extra-descr{ margin-bottom: 0.2em; font-weight: bold; font-size: 1em; }

    BACK TEMPLATE

    <div class="back">
      {{#Title}}The manufacturing units of <div class="title">{{Title}}</div>are situated in{{/Title}}<br>
      <div class="text">
        {{cloze:Text1}}
        {{cloze:Text2}}
        {{cloze:Text3}}
        {{cloze:Text4}}
        {{cloze:Text5}}
        {{cloze:Text6}}
        {{cloze:Text7}}
        {{cloze:Text8}}
        {{cloze:Text9}}
        {{cloze:Text10}}
        {{cloze:Text11}}
        {{cloze:Text12}}
        {{cloze:Text13}}
        {{cloze:Text14}}
        {{cloze:Text15}}
        {{cloze:Text16}}
        {{cloze:Text17}}
        {{cloze:Text18}}
        {{cloze:Text19}}
        {{cloze:Text20}}
        {{cloze:Full}}
        <div class="hidden">{{Original}}</div>
      </div>
      <div class="extra"><hr></div>
    {{#Mnemo}}<div>{{Mnemo}}</div>{{/Mnemo}}
      <div class="text"><div class="fullhint">{{hint:Original}}</div></div>
      <div class="extra">
        {{#Remarks}}
        <div class="extra-entry">
          <span class="extra-descr">Remarks: </span><span>{{Remarks}}</span>
        </div>
        {{/Remarks}}
        {{#Sources}}
        <div class="extra-entry">
          <span class="extra-descr">Sources: </span><span>{{Sources}}</span>
        </div>
        {{/Sources}}
      </div>
    </div>
    <script>
      // remove cloze syntax from revealed hint
      var hint = document.querySelector('.fullhint>[id^="hint"]')
      var html = hint.innerHTML.replace(/[[oc(\d+)::(.?)(::(.?))?]]/mg, "$2")
      hint.innerHTML = html
      // scroll to cloze
      document.addEventListener('DOMContentLoaded', function() {
        setTimeout(function(){
          const cloze1 = document.getElementsByClassName("cloze")[0];
          const rect = cloze1.getBoundingClientRect();
          const absTop = rect.top + window.pageYOffset;
          const absBot = rect.bottom + window.pageYOffset;
          if (absBot >= window.innerHeight) {
            const height = rect.top - rect.bottom
            const middle = absTop - (window.innerHeight/2) - (height/2);
            window.scrollTo(0, middle);};
        }, 1);
      }, false);
    </script>
    

    I am using {{Mnemo}} as a way to remember the names, and I also need to have the <hr> in both the FRONT and BACK templates.

    I am attaching an image.

    So what am I doing wrong here?
    Thanks in advance,
    Regards,
    Tanay

  12. 72 Posted by yblignomis on 06 Aug, 2017 04:13 AM

    yblignomis's Avatar

    HI,
    in trying to use this add on with the Media import add-on it would not allow me to select cloze_overlapper as a card type option and spat out the following error message
    Cheers :)
    S

    Traceback (most recent call last):
      File "/Users/SimonGilby/Library/Application Support/Anki2/addons/cloze_overlapper/config.py", line 210, in onAccept
        modified = self.renameFields(config)
      File "/Users/SimonGilby/Library/Application Support/Anki2/addons/cloze_overlapper/config.py", line 239, in renameFields
        flds = model['flds']
    TypeError: 'NoneType' object has no attribute '__getitem__'

  13. 73 Posted by Glutanimate on 07 Aug, 2017 03:10 PM

    Glutanimate's Avatar

    @Tanay:

    Thanks for the kind words.

    Try putting your added sequence on the front below the second to last closing </div> tag. It is currently located in the same container as the clozed elements and is thus affecting its width.

    @yblignomis:

    I've tried reproducing the issues, but have had no success so far. Could you tell me which exact steps reliably result in that error message for you? The contents of the message would point to the options dialog of the add-on being somehow involved, but I have trouble understanding how.

  14. 74 Posted by Tanay Banerjee on 12 Aug, 2017 04:59 AM

    Tanay Banerjee's Avatar

    Thanks for the suggestion.
    I tried what you suggested. But the problem persisted. Then I put the added sequence i.e. {{#Mnemo}}{{Mnemo}}{{/Mnemo}} after the last </div>, and it worked!
    I still can't figure out why {{#Mnemo}}{{Mnemo}}{{/Mnemo}} needs to be added outside the "front" class <div>.
    Regards,
    Tanay

  15. 75 Posted by Laura on 20 Aug, 2017 05:25 PM

    Laura's Avatar

    I'm new to Anki, but I would love to integrate it in my studies. Especially this addon is awesome...the problem is that it suddenly suspends every following cards - though I believe only the overlapping-cloze-types - after answering one. They also don't show under "suspended cards" in the search-menu and if I desuspend them manually through the deck, they just get suspended again after answering one of the suspended cards. Because I wanted to setup anki quickly, I installed a bunch of addons at once. Maybe some collide? Can anybody help me? I was so happy that Anki was useful to me now, because I can test verbs and their tenses in a list, so that I get feeling for the overall picture too.

  16. 76 Posted by Laura on 20 Aug, 2017 05:35 PM

    Laura's Avatar

    **front**
    <div class="front">
      {{#Title}}<div class="title">{{Title}}</div>{{/Title}}
      <div class="text">
        {{cloze:Text1}}
        {{cloze:Text2}}
        {{cloze:Text3}}
        {{cloze:Text4}}
        {{cloze:Text5}}
        {{cloze:Text6}}
        {{cloze:Text7}}
        {{cloze:Text8}}
        {{cloze:Text9}}
        {{cloze:Text10}}
        {{cloze:Text11}}
        {{cloze:Text12}}
        {{cloze:Text13}}
        {{cloze:Text14}}
        {{cloze:Text15}}
        {{cloze:Text16}}
        {{cloze:Text17}}
        {{cloze:Text18}}
        {{cloze:Text19}}
        {{cloze:Text20}}
        {{cloze:Full}}
        <div class="hidden">
           <div>{{Original}}</div>
        </div>
      </div>
    </div>
    **sytle**
    /* general card style */

    html {
      /* scrollbar always visible in order to prevent shift when revealing answer*/
      overflow-y: scroll;
    }

    .card {
      font-family: "Helvetica LT Std", Helvetica, Arial, Sans;
      font-size: 150%;
      text-align: center;
      color: black;
      background-color: white;
    }

    /* general layout */

    .text {
      /* center left-aligned text on card */
      display: inline-block;
      align: center;
      text-align: left;
      margin: auto;
      max-width: 40em;
    }

    .hidden {
      /* guarantees a consistent width across front and back */
      font-weight: bold;
      display: block;
      line-height:0;
      height: 0;
      overflow: hidden;
      visibility: hidden;
    }

    .title {
      font-weight: bold;
      font-size: 1.1em;
      margin-bottom: 1em;
      text-align: center;
    }

    /* clozes */

    .cloze {
      /* regular cloze deletion */
      font-weight: bold;
      color: #0048FF;
    }

    /* original text reveal hint */

    .fullhint a {
      color: #0048FF;
    }

    .card21 .fullhint{
      /* no need to display hint on last card */
      display:none;
    }

    /* additional fields */

    .extra{
      margin-top: 0.5em;
      margin: auto;
      max-width: 40em;
    }

    .extra-entry{
      margin-top: 0.8em;
      font-size: 0.9em;
      text-align:left;
    }

    .extra-descr{
      margin-bottom: 0.2em;
      font-weight: bold;
      font-size: 1em;
    }

    **back**
    <div class="back">
      {{#Title}}<div class="title">{{Title}}</div>{{/Title}}
      <div class="text">
        {{cloze:Text1}}
        {{cloze:Text2}}
        {{cloze:Text3}}
        {{cloze:Text4}}
        {{cloze:Text5}}
        {{cloze:Text6}}
        {{cloze:Text7}}
        {{cloze:Text8}}
        {{cloze:Text9}}
        {{cloze:Text10}}
        {{cloze:Text11}}
        {{cloze:Text12}}
        {{cloze:Text13}}
        {{cloze:Text14}}
        {{cloze:Text15}}
        {{cloze:Text16}}
        {{cloze:Text17}}
        {{cloze:Text18}}
        {{cloze:Text19}}
        {{cloze:Text20}}
        {{cloze:Full}}
        <div class="hidden">{{Original}}</div>
      </div>
      <div class="extra"><hr></div>
      <div class="text"><div class="fullhint">{{hint:Original}}</div></div>
      <div class="extra">
        {{#Remarks}}
        <div class="extra-entry">
          <div class="extra-descr">Remarks</div><div>{{Remarks}}</div>
        </div>
        {{/Remarks}}
        {{#Sources}}
        <div class="extra-entry">
          <div class="extra-descr">Sources</div><div>{{Sources}}</div>
        </div>
        {{/Sources}}
      </div>
    </div>
    <script>
      // remove cloze syntax from revealed hint
      var hint = document.querySelector('.fullhint>[id^="hint"]')
      var html = hint.innerHTML.replace(/\[\[oc(\d+)::(.*?)(::(.*?))?\]\]/mg, "$2")
      hint.innerHTML = html
      // scroll to cloze
      document.addEventListener('DOMContentLoaded', function() {
        setTimeout(function(){
          const cloze1 = document.getElementsByClassName("cloze")[0];
          const rect = cloze1.getBoundingClientRect();
          const absTop = rect.top + window.pageYOffset;
          const absBot = rect.bottom + window.pageYOffset;
          if (absBot >= window.innerHeight) {
            const height = rect.top - rect.bottom
            const middle = absTop - (window.innerHeight/2) - (height/2);
            window.scrollTo(0, middle);};
        }, 1);
      }, false);
    </script>

    Just in case I have messed up something on my cards.

  17. 77 Posted by Glutanimate on 20 Aug, 2017 06:57 PM

    Glutanimate's Avatar

    @ Laura:

    Thanks for the detailed report. I've just updated the FAQ with a few sections on cards scheduling that should help: https://github.com/glutanimate/cloze-overlapper/wiki/FAQ#card-sched...

  18. 78 Posted by Laura on 20 Aug, 2017 08:10 PM

    Laura's Avatar

    Thanks a lot :-) ...and again, I truly love your anki addon.

  19. 79 Posted by Glutanimate on 20 Aug, 2017 08:12 PM

    Glutanimate's Avatar

    Keine Ursache :). Viel Spaß damit!

  20. 80 Posted by tsashton on 06 Sep, 2017 06:06 PM

    tsashton's Avatar

    hello author

    this really helps a great deal, thanks for answering the need :)

    just wondering, is there any fairly non-tech way to adjust the fonts - i'd ideally prefer if they just match the anki standard (is that Arial, 20 i think?)

    Tom

  21. 81 Posted by Glutanimate on 06 Sep, 2017 06:22 PM

    Glutanimate's Avatar

    @Tom:

    No worries. Glad the add-on helps.

    This video does a great job of demonstrating which steps you will have to perform to customize your font settings: https://www.youtube.com/watch?v=F1j1Zx0mXME

    Cloze Overlapper uses Helvetica as its default font, by the way, but falls back to Arial if it doesn't find it on the system. These two are very similar - Arial is pretty much just Microsoft's carbon-copy of the original Helvetica font face.

  22. 82 Posted by tsashton on 07 Sep, 2017 08:43 AM

    tsashton's Avatar

    ah - perfect. nice one.

    sorted now. thanks for that, Glutanimate.

  23. 83 Posted by tsashton on 07 Sep, 2017 10:59 AM

    tsashton's Avatar

    hello, again

    sorry if i can request one other thing: I'm interested in setting up a 4-part answer to a question. Amazed how the plugin can correctly identify each of the parts and assign as a separate close. However, can i now set this up so the four clozes appear with a space between, i.e. to avoid producing a large single block of text?

    I mean where the arrows are in the attached, hope my question makes sense ..
    thanks.

    Tom

    EDIT: OK i see this was unnecessary, for some reason I'm getting better results now just by positioning spaces as needed on the card edit screen. Please disregard - Tom.

  24. 84 Posted by S Horowitz on 24 Sep, 2017 06:30 PM

    S Horowitz's Avatar

    I would like to display the entire text on the back of the card with the prompted line bolded, as is done automatically in the regular Cloze cards, as displayed in the screenshots attached. As opposed to the default settings of the add-in, the future lines cannot be hidden on the front and shown on the back. I tried playing a little with the card settings with no success.

  25. 85 Posted by Glutanimate on 26 Sep, 2017 04:34 AM

    Glutanimate's Avatar

    @seth:

    I'm not sure I fully understand what you would like to achieve. If it's about clozing multiple lines of text at once, the add-on can do that as long as you simply highlight the text in question and then use CTRL+SHIFT+C to apply cloze markers (just like with a regular cloze). The resulting field would could look like this:

    [[oc1::This is a single line of text.]]
    
    [[oc2::
    This is a multiple-line
    paragraph of
    text
    ]]
    
    [[oc3::This is another single line.]]
    

    In the example above 3 cards would be generated, each asking about oc1, oc2, and oc3, respectively.

  26. 86 Posted by S Horowitz on 26 Sep, 2017 05:09 AM

    S Horowitz's Avatar

    Sorry I wasn't clear, I just wanted to make the back of the card show the
    entire text with the promted text bolded.
    Thanks!

  27. 87 Posted by Zankastia on 27 Sep, 2017 08:02 AM

    Zankastia's Avatar

    Hello,

    I wanted to know how to change the tittle color text and the size of the police please without adding a second title.

    Thanks

  28. 88 Posted by Tanay Banerjee on 27 Sep, 2017 04:14 PM

    Tanay Banerjee's Avatar

    Hi,
    I have question regarding sequencing of information to be shown when one cloze is needed to be asked..

    Image 01: I created a note containing a list of winners of different literary awards.

    Image 02: I am just going to be tested on who was the winner of the Man Booker International Prize, but at this point I want the name of the book to be shown (but all other information of the note should remain hidden)

    Image 03: The name of the author gets shown, and I want the name of the book to remain visible

    Image 04: Now the name of the book is being asked. Here I want the name of the winner to be shown (all other information of the note should remain hidden)

    Image 05: The name of the book is shown, and I want the name of the author to remain visible

    I tried with different settings (with two clozes per card, with 1 or 2 contexts after and/or before), but could not get the desired result. So what should I do for the desired sequencing of cards and information. I hope I have been able to make my question clear.

    Regards,
    Tanay

  29. 89 Posted by Elena T on 18 Nov, 2017 11:23 AM

    Elena T's Avatar

    I download add-ons: close overlapping to memorize sequences. i am getting an error message every time I am attempting to create a card, especially when I click on odd button.
    See below the message:

    "Missing required field: 'Expression'"
    Please help to fix this issue.

  30. 90 Posted by Derek Wan on 19 Nov, 2017 01:26 PM

    Derek Wan's Avatar

    Derek

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac