Furigana displays at incorrect position

762 views
Skip to first unread message

Ebisumartin

unread,
Nov 24, 2012, 3:42:48 AM11/24/12
to anki-a...@googlegroups.com
Now that I have furigana working, I have encountered a new problem.

The furigana displays in the wrong place for most kanji. It is shifted over to the left. Depending on how close the kanji is to the left side determines how far off the furigana is. If the kanji happens to be at the beginning of the sentence, then the furigana will be immediately above it. However, if the kanji is further to the right, then the furigana will be offset to the left, sometimes all the way to the start of the sentence.

Since I don't always add furigana to every kanji, this sometimes means readings are placed over the wrong kanji. In any case, the furigana is almost always in the wrong place, leading to confusion.

Is this a bug, or does a method or workaround exist to make the furigana appear in the correct place?

Houssam Salem

unread,
Nov 26, 2012, 2:14:08 AM11/26/12
to anki-a...@googlegroups.com
That's interesting. What version of android are you using? Can you post a screenshot of the problem? That would be helpful here. Your template would be useful as well.

2012年11月24日土曜日 19時42分48秒 UTC+11 Ebisumartin:

Tony

unread,
Oct 9, 2013, 3:29:24 AM10/9/13
to anki-a...@googlegroups.com
Same here. I've attached a screenshot. This is on the desktop app (Version 2.0.12). I've tried with different fonts, it's also not working properly.

Here's my template:

{{#example_kana}}

<span class="japanese large">{{furigana:example_kana}}</span><br/><div id="keywords" style="display: none">{{/example_kana}}

<span class=large>{{#keyword_french}}{{keyword_french}}{{/keyword_french}}{{^keyword_french}}{{keyword_heisig}}{{/keyword_french}}</span></br>


{{#keyword_french}}<span class=normal>{{keyword_heisig}}</span>{{/keyword_french}}<br/>

{{#example_kana}}</div>

<span class="small"><a class="hintlink" href="#" onclick="document.getElementById('keywords').style.display='block';

this.style.display='none';return false;">

show other keywords</a></span>

{{/example_kana}}



It doesn't even work if I simply use {{furigana:example_kana}} as the template.


Cheers
Screen Shot 2013-10-09 at 16.23.55 .png

Houssam Salem

unread,
Oct 9, 2013, 3:59:02 AM10/9/13
to anki-a...@googlegroups.com, tro...@gmail.com
This happens when you don't put spaces in the right place, because the parser has no idea where the word starts and where it ends.

Bad:  子供[こども]のとき、よく海[うみ]で泳[およ]ぎました
Good: 子供[こども] のとき、よく海[うみ] で泳[およ] ぎました

Houssam Salem

unread,
Oct 9, 2013, 4:00:38 AM10/9/13
to anki-a...@googlegroups.com, tro...@gmail.com
Ignore that, I put the spaces on the wrong side! Try this instead:

Bad:  子供[こども]のとき、よく海[うみ]で泳[およ]ぎました
Good: 子供[こども]のとき、よく 海[うみ]で 泳[およ]ぎました

Trouni Tiet

unread,
Oct 9, 2013, 4:08:39 AM10/9/13
to Houssam Salem, anki-a...@googlegroups.com
Works great!
Just a precision though, it doesn't work with the hiragana fized-width space. You need to use the romaji space for it to work.

Thanks!

Houssam Salem

unread,
Oct 9, 2013, 4:14:04 AM10/9/13
to anki-a...@googlegroups.com, Houssam Salem, tro...@gmail.com
Good point, I forgot about that. Same with the []'s, in case anyone else comes across this.
Reply all
Reply to author
Forward
0 new messages