Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
ruby text
Avatar
Wikijapon #1
Member since Feb 2009 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: ruby text
Hi,

I want to use ruby code in my wiki to add furigana to kanji. In other words, I want to put the phonetic reading on to of Chinese characters in Japanese text.

To have examples, see this page : http://www.w3.org/International/tutorials/ruby/en/all.html

I want to use this specific model :

<ruby>
<rb>紙芝居</rb>
<rp>(</rp>
<rt>かみしばい</rt>
<rp>)</rp>
</ruby>

I want the script to allow me to dive the value for <rb> and <rt> without all the code.

Something like <ruby 紙芝居>かみしばい</ruby> could be an option.

Right now the code is really long and it need to be coded inside <html> (so it's even longer).

Thanks
Avatar
andi (Administrator) #2
Member since May 2006 · 1621 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you post an example of the HTML you use right now to produce the wanted output? Because I assume that browsers do not support ruby notation natively, right?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
chi (Moderator) #3
Member since Jun 2006 · 1643 posts · Location: Munich Germany
Group memberships: Global Moderators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
I think what he posted earlier ist actually the example HTML. As far as I could read, ruby is included in the standard XHTML transitional 1.1 specs, and the ruby CSS selectors are part of the CSS3 specs. All he's asking for is for a plugin which makes inserting ruby text less tedious than by using HTML.
Please add [SOLVED] to the initial thread subject if you feel your question has been answered.
If my answer doesn't make sense maybe your question didn't either - just visit http://facepalm.org.
Avatar
andi (Administrator) #4
Member since May 2006 · 1621 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Ah I see.

I also read a bit further and found this about implementation status in browsers:
http://www.w3.org/International/articles/ruby/Overview.en.…

Yeah interesting. I'd love to see a plugin for that...
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
Wikijapon #5
Member since Feb 2009 · 5 posts
Group memberships: Members
Show profile · Link to this post
For Firefox, you must use the plugin "XHTML Ruby Support" (https://addons.mozilla.org/en-US/firefox/addon/1935)
For IE, it work natively.
As I know, don't work with WebKit based browser (Google chrome and Safari), but I don't know if there is any plugin.

For examples (and test in you browser) look at this page: http://www.w3.org/International/tests/sec-ruby-markup-1

The example with the parenthesis (as the <rp> value) is in the point "3 Simple ruby, short, wide-cell ruby text".

Of course, you need to be able to see Japanese characters in your computer to see it properly.

Try this code in your wiki (or dokuwiki playground)

<html><ruby>
<rb>Normal text</rb>
<rp>(</rp>
<rt>Ruby text</rt>
<rp>)</rp>
</ruby>
</html>

If your browser render the ruby, you will see "Normal text" with a small "Ruby text" over.
If it did not work you will see "Normal text (Ruby text)"
Avatar
Wikijapon #6
Member since Feb 2009 · 5 posts
Group memberships: Members
Show profile · Link to this post
For the syntax, shorter is better.
This post was edited on 2009-02-26, 02:12 by Wikijapon.
Avatar
Wikijapon #7
Member since Feb 2009 · 5 posts
Group memberships: Members
Show profile · Link to this post
I am not a programme... but... is it that hard or is it that nobody want to do it ?
Avatar
Pomax #8
Member since Aug 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
I don't know if you still need it, but I needed furigana functionality on my own wiki (grammar.nihongoresources.com) so I wrote a plugin to let me just write 漢字(ふり) and have it be changed to the full xhtml 1.1 ruby markup (so full <ruby>(<rb>,<rp>,<rt>,<rp>) markup)

http://www.dokuwiki.org/plugin:xhtmlruby

- Mike "Pomax" Kamermans
nihongoresources.com
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20090606-dev, © 2003-8 by Yves Goergen
Current time: 2010-03-21, 16:56:28 (UTC +01:00)
WikiForumIRCBugsGitXRefTranslate