Sorry for taking a while with the updates and leaving several comments unanswered, everyone. Life happened, and I got preoccupied with other matters for the past few months. Fortunately, I have some more time to put into working on the template again. There are quite a few new features implemented, so hopefully, it all worth the wait.
Improved Android support
- The bug with missing spaces found by @mthierst is fixed.
Details
It turned out to be a purely visual bug, caused by differences between default css in desktop and Android versions of Anki, which could be observed only under very specific conditions: an incorrect answer containing white space should be submitted to a question with a correct answer that also contains a white space between two different letters. On top of that, it requires the input text to be centered vertically, as in this Memrise card template, and otherwise does not manifest itself in any way (which is why it can’t be seen in the default Anki cards, for example).
In any case, new version of the cards should be working fine on both desktop and Android. I also submitted an issue to the AnkiDroid GitHub, and it got patched. So even old cards should start working in the future releases of AnkiDroid.
- The bug with an empty answer being accepted as correct, reported by @khong and @g0thi is also fixed.
Details
Despite looking very simple, it turned out to be quite an elaborate one. My current theory is that it is caused by some bug in LaTeX preprocessor of AnkiDroid, which gets triggered by escaped brackets in a regular expression in the card’s script (because in LaTeX same combinations of symbols mark beginning and end of an equation block). As a result, the source JS code gets messed up before it is executed. We may still get more info on it from this bug report.
For this reason, the new version of cards uses a different RegEx notation in order to avoid this issue altogether. So it should be working regardless of whether the related AnkiDroid bug gets fixed or not.
- Margins on the cards got adjusted to better fit narrow screens.
- Correct answers now get auto-accepted as they do on desktop Anki.
Also note, that the Memrise-styled text input box can be enabled on cards instead of the default Android one. To do so, go to the Advanced
section in the AnkiDroid settings and turn on the Type answer into the card
option:
Audio cards
Fully functioning audio cards are here:
Note, that there are two different Note types in the provided deck now:
-
Memrise Template (Lτ) v2.81
is the new version of the same core template, which is meant to be customized to fit everyone’s individual needs. By default, it looks almost the same as the previous version, but it has all new styles and scripts built in. If, for example, a card containing audio in the question field is created, as described in this post, it is now automatically formatted with all the appropriate Memrise-style buttons and animations on both the front and the back.This post contains some additional details on the ways of customizing the template. On top of that, there are several “hidden” styling options, such as making a font for a specific field larger, modifying the shape of an audio button, or making combined audio-and-text type questions, in case someone finds a use for that:
I plan to write a tutorial post, describing all of that in more detail in the future, but in the meantime feel free to ask me any questions about customization (I would really appreciate that, as they will also help me to better understand what the planned tutorial should focus on). -
Memrise Preset [Translation+Listening] (Lτ) v2.81
is a preset that is meant to serve as a specific example of the template customization and as a premade option for people who don’t want to get involved with customization themselves, only looking for a ready-to-use solution which provides both text and audio cards.This Note type is created from the template in basically the same way as described in the posts linked above. It is set up to produce two cards for each note (an entry in Anki database): one card for translating a word from a known language to a learned one, and another card for typing the learned word based on its audio.
Also, buttons are created with vector shapes, instead of PNGs, so they do not have rasterization artifacts:
Spelling corrections
I thought about it a little more and decided, that it would be appropriate to revive the style from an older version of Memrise, which used to have this feature, even if the new Memrise no longer has it. So in the new version of the card template, the corrections to the typed answer are shown right below the expected correct one:
For comparison, older Memrise style:
The current version of the card template (v2.81) is available on the GitHub page (I don’t want to update the Ankiweb page right away since each edit takes it down for a day, and I still plan to upload more changes to the template and the aforementioned tutorial in the immediate future).