← Torval

A note type for Torval

If you already have a note type you like, keep it. Torval works with whatever you have. This is for people who don't.

It makes a sentence card: the line you met the word in on the front, the word and what it means on the back. It works for every language Torval reads, and a card with no picture or no pitch accent simply leaves those rows out.

The field names below are the ones Torval recognises, so once the note type exists, Settings → Anki fills the mapping in by itself and you have nothing to match up by hand.

1. Make the note type

In Anki: Tools → Manage Note Types → Add → Add: Basic, and call it Torval.

2. The fields

Fields…, then add these, exactly as spelled and in this order. Delete Basic's own Front and Back once the others are in. Target Word comes first, so the browser sorts by it.

Target Word
Sentence
Definitions
Reading
Pitch
Sentence Audio
Word Audio
Images

Reading and Pitch are for Japanese. Keep them anyway: they cost nothing, and the same note type then works for every language. Torval puts the article in front of a noun itself, so no script is needed for il or la.

3. The front

Cards…, then paste this over the front template.

<div class="sentence">{{Sentence}}</div>
<div class="target-word">{{Target Word}}</div>

The word is in bold in the sentence, so you meet it in context first. The word beneath, in grey, says which one is being asked about.

4. The back

{{FrontSide}}

<hr id="answer">

<div class="audio-line">{{Word Audio}} {{Sentence Audio}}</div>

{{#Pitch}}<div class="pitch">{{Pitch}}</div>{{/Pitch}}
{{^Pitch}}{{#Reading}}<div class="reading">{{Reading}}</div>{{/Reading}}{{/Pitch}}

<div class="definition">{{Definitions}}</div>

{{#Images}}<div class="image-block">{{Images}}</div>{{/Images}}

The pitch diagram already spells out the reading, so the reading only shows when there is no diagram. Rows with nothing in them leave no gap.

5. The styling

Same screen, the Styling box.

.card {
  font-family: -apple-system, "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 26px;
  line-height: 1.6;
  text-align: center;
  padding: 0 12px;
}

.sentence {
  margin-top: 10px;
}

.target-word {
  font-size: 28px;
  color: #999;
  margin-top: 12px;
}

hr#answer {
  border: none;
  border-top: 2px solid #888;
  width: 80%;
  margin: 12px auto;
}

.audio-line {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.pitch svg {
  width: 240px !important;
  height: auto !important;
}

.reading {
  font-size: 30px;
  margin-bottom: 8px;
}

.definition {
  max-width: 700px;
  margin: 0 auto 10px;
  word-wrap: break-word;
}

.image-block img {
  width: 25%;
  min-width: 220px;
  height: auto;
  margin: 5px auto;
  display: block;
}

6. Point Torval at it

Settings → Anki, choose your deck and then Torval as the note type. The fields match themselves. Press + on a word and the card arrives filled in.

No recording for a word? Italian and Spanish pronunciations come from volunteers, and they haven't recorded everything. Adding {{tts it_IT:Target Word}} to the back template makes Anki say the word itself, with the voices already on your phone or computer. Use es_ES or ja_JP as it suits.