Back

Anki Template Formatting

#1
Recently I changed around the model for my Vocab deck to hopefully improve learning, retention, and easier spotting of problem cards. My model includes 5 fields (Expression, Meaning, Reading, ExampleSent, Notes). Since most of my word mining comes from what I read I'll usually enter the word and include the sentence I got it from in the Example. I include the Expression and Example on the front of the card and the rest on the back.

Recently though I realized I started relying on the sentence to figure out the word's meaning, which isn't bad per se, but its not the kind of recognition I wanted to form for words. So I started trying to think about ways to keep the Example sentence in those instances where I "sort of kind of" remember a word but need the help to jog memory.

I settled on one thing at first, but later incorporated a plugin. I had never realized the level of HTML/Javascript stuff you could do with Anki, so this was news to me.

In the beginning I was using a setup like this. I went to the "Card Template" and wrapped the field I wanted to hide (ie: %(Example)s) in a <span> tag and had the color change from white/black.
Code:
* <span onmouseover="this.style.color='black'"
onmouseout="this.style.color='white'"> %(Example)s </span>  *
(May need to add " style="color:white" " in the <span> to make it appear white when the card first loads. Make sure you keep the asterisks so you can see where the field is.)

This will basically make the text color white when you aren't mousing over it and black when you do mouse over it. If your background color is different, change the color as you need.

This was good but it still didn't let me review w/o my mouse so I ended up scrapping it and writing/modifying a plugin so I could hold down shift and make it appear (used the visibility style attribute in that case in a span tag).

--

After all this it got me wondering, What kind of formatting tricks on the template and plugins do other people use to improve their studying?
Reply