W3C home > Mailing lists > Public > public-html@w3.org > May 2008

RE: <ruby>, etc. in HTML5

From: Justin James <j_james@mindspring.com>
Date: Mon, 26 May 2008 15:57:59 -0400
To: "'Brian Smith'" <brian@briansmith.org>, "'HTML WG'" <public-html@w3.org>
Message-ID: <0b7d01c8bf6a$ccb0da40$66128ec0$@com>

It would also be good for the write up to explain:

* What "ruby" *is*
* Why someone would use it
* Where to get more information

I spent 5 minutes looking at this wondering how this applied to the Ruby programming language, and why there was not a <perl>, <c++>, or <vb.net> tag set as well. It was not until I read this message from Brian that I had any idea what this was talking about.

J.Ja

-----Original Message-----
From: public-html-request@w3.org [mailto:public-html-request@w3.org] On Behalf Of Brian Smith
Sent: Monday, May 26, 2008 3:16 PM
To: 'HTML WG'
Subject: RE: <ruby>, etc. in HTML5


Anne van Kesteren wrote:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/se
ction-text-level.html#the-ruby

This is just an incomplete subset of the long-existing Ruby Annotation recommendation. In particular, the complex ruby markup (RB, RBC, and RTC) was left out in the HTML 5 version. At least the spanning mechanism of complex ruby is needed for some common situations in Japanese. I believe the above-and-below (left and right) ruby annotations are useful for Japanese language educators as the bottom annotation can be used for romanized transliteration.

It is better to incorporate the whole Ruby Annotation recommendation [1] as-is. 

Also, the example in the HTML 5 draft is bad. In particular, it is misleading because it suggests that <rt> elements should be interleaved within the characters of the words they are annotating. The proper markup is either:

<ruby>斎<rt><rp>(</rp>さい</rt><rp>)</rp></ruby>
<ruby>藤<rt><rp>(</rp>とう</rt><rp>)</rp></ruby>
<ruby>信<rt><rp>(</rp>のぶ</rt><rp>)</rp></ruby>
<ruby>男<rt><rp>(</rp>お</rt><rp>)</rp></ruby>

Or:

<ruby><rb>斎藤信男</rb><rp>(</rp><rt>さいとうのぶお</rt><rp>)</rp></ruby>

Depending on whether you are treating the characters individually or as a word.

Let me know if you are in need of real-world Ruby examples for Japanese, as my friend is a Japanese instructor and she uses Ruby annotations on a daily basis in Microsoft Office. I can translate her MS Office examples into proper XHTML for you.

Also note that Chinese uses Ruby markup differently than Japanese, so a Chinese-language example would be a good idea as well.

Regards,
Brian
Received on Monday, 26 May 2008 19:58:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:55 UTC