xenial-black•15mo ago
How can I have the target word above the sentence without this weird formatting?
As a workaround to not being able to bold the target word, I want to have the target word on top of the sentence, but when I added {{target word}} to the Front Template it shows up like this. I'm using the Migaku Japanese template as the starting point. I'm also brand new to Anki using the newer Migaku extension, so I'm still not sure how this works. Any help is greatly appreciated. Thanks!

17 Replies
generous-apricot•15mo ago
surprise 🙂 https://discord.com/channels/752293144917180496/1216436084607549460
the thread above contains extra code to add to the card, which automatically bolds the target word in the sentence (not 100% of the time yet, but close enough)
to answer your question
replace your added line with
<div class="field" data-popup="yes" data-furigana="no" data-pitch-coloring="no" data-pitch-shapes="no">{{Target Word}}</div>
and it should render properly
@Sacrallys I hope this solves it for you 🙂
xenial-blackOP•15mo ago
this worked, thanks so much!
xenial-blackOP•15mo ago
@Michaël P (ローマ字 26) Hi Michael, I have a quick follow up question, if it's okay. With this new added line you shared, is there a way to increase the font size of it? I tried the usual "font-size: 25px;" command but it didn't work.

generous-apricot•15mo ago
probably possible by adding soemthing in the css
the font size is fixed to 22px for the front of the card
I no longer use the Target Word on top of the front...
xenial-blackOP•15mo ago
Any idea what could be added to only affect the target word?
Sorry, I'm just not familiar with code and stuff like this so I'm kind of in over my head. I've been kind of Frankenstein'ing things together and see if they work lol
generous-apricot•15mo ago
you'd probably need to change in the stylesheet
xenial-blackOP•15mo ago
Right. I did a search for "target word" in the styling but nothing came up.
generous-apricot•15mo ago
it may be unknown instead of target word
xenial-blackOP•15mo ago
This here?

generous-apricot•15mo ago
but that may only affect it on the back of the card
xenial-blackOP•15mo ago
I found this font size line but changing it doesn't seem to affect anything

generous-apricot•15mo ago
change the line to:
<div class="migaku-card-unknown migaku-indented">
<div class="field" data-popup="yes" data-furigana="yes" data-pitch-coloring="yes" data-pitch-shapes="yes">{{editable:Target Word}}</div>
</div>
now you can change the font size in the styling and it will apply back and front
alternatively, you could make a "migaku-card-unknown-front" class if you only want to change for the front
xenial-blackOP•15mo ago
That's great, thank you so much!
How would I go about making the "migaku-card-unknown-front" if I only want to change the front?
generous-apricot•15mo ago
<div class="migaku-card-unknown migaku-indented"> becomes <div class="migaku-card-unknown-front migaku-indented">
then in styling, copy the migaku-card-unknown for a new migaku-card-unknown-front class
and change the font size in the new class
for example:
.migaku-card-unknown-front {
margin-top: 10px;
font-size: 48px;
}
xenial-blackOP•15mo ago
I see! I'll try that
Thanks again for everything, much appreciated.
generous-apricot•15mo ago
I've since moved to the bold script I posted first... it works most of the time, good enough for me 😉
xenial-blackOP•15mo ago
Yeah, I'll eventually try that. All this coding is just so overwhelming.