W3C home > Mailing lists > Public > public-i18n-cjk@w3.org > January to March 2013

Re: Use Cases & Exploratory Approaches for Ruby Markup

From: MURAKAMI Shinyu <murakami@antenna.co.jp>
Date: Fri, 08 Mar 2013 03:08:12 +0900
To: Robin Berjon <robin@w3.org>
Cc: Richard Ishida <ishida@w3.org>, public-i18n-cjk@w3.org, www International <www-international@w3.org>
Message-Id: <20130308030810.A210.C598BCD7@antenna.co.jp>
Robin Berjon <robin@w3.org> wrote on 2013/03/08 0:30:38
> On 03/03/2013 15:09 , MURAKAMI Shinyu wrote:
> > BTW, we (Antenna House) have a ruby implementation supporting
> > jukugo ruby (HTML5 syntax, rb.rt.rb.rt, <rb> is optional)
> > and double-sided ruby (nesting and ruby-position property):
> 
> Can you please clarify what you mean by "HTML5 syntax"? I ask because HTML5 as currently standing does not have <rb>. Are you mostly talking about using an HTML parser?

Our implementation treats HTML5 syntax <ruby>東<rt>とう</rt>京<rt>きょう</rt></ruby> as Jukugo-ruby, and it accepts optional rb tags: <ruby><rb>東</rb><rt>とう</rt><rb>京</rb><rt>きょう</rt></ruby> is also possible.

Our default stylesheet defines ruby style as follows:
  ruby { display: ruby }
  rb { display: ruby-base }
  rt { display: ruby-text }
  rp { display: none }

and when rb (or other element with display:ruby-base) is omitted it generates anonymous box with 'display:ruby-base'. It does not mean generating rb elements on DOM.

> 
> > I don't have strong opinion for the grouped rb (rb.rb.rt.rt) model,
> > but if I have to support it I want to reuse the existing HTML5 model
> > formatting algorithm and first reorder the internal object sequence
> > (rb.rb.rt.rt to rb.rt.rb.rt) and then process HTML5 model way.
> 
> The proposal to support grouping with rb.rb.rt.rt is made with the goal of becoming the HTML5 model (by replacing/extending the current one — and notably adding <rb>).
> 
> I'm curious: would you alwayds reorder anyway and never make use of the grouping information for rendering?

The reordering is for rendering purpose and would be done on the rendering tree, not the DOM tree. When inline ruby style is used, i.e., display:inline for ruby elements or ruby-position:inline, such reordering is not needed of course.

In my understanding the rb.rb.rt.rt model is needed for accessing the text as "東京(とうきょう)", not as "東(とう)京(きょう)", and the rendered result as ruby (not inline ruby style) must be same as the rb.rt.rb.rt model.


Regards,

Shinyu Murakami
Antenna House
Received on Thursday, 7 March 2013 18:08:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 7 March 2013 18:08:44 GMT