[whatwg] HTML5 ruby spec: <rp>

Roland Steiner rolandsteiner at google.com
Tue May 19 18:07:20 PDT 2009

As I am currently in the process of writing an implementation for ruby, I
was wondering about the constraints put on the content of the <rp> element
in the spec:
If the rp <http://dev.w3.org/html5/spec/Overview.html#the-rp-element>element
is immediately after an
rt <http://dev.w3.org/html5/spec/Overview.html#the-rt-element> element that
is immediately preceded by another
a single character from Unicode character class Pe. Otherwise:
a single character from Unicode character class Ps.Is there a specific
reason that <rp> is constrained in this way? I imagine that someone could
want to add additional spaces before/after the parenthesis, non-parenthesis
separators, or, e.g., in a text book write:

*<ruby>*漢字*<rp> *(reading:*</rp><rt>*Kanji*</rt>**<rp>*) *</rp><ruby>

Also note that there isn't such a constraint if one would use CSS rules to
achieve a similar result (in the absence of proper ruby rendering):

rt:before { content: " (reading: "; }
rt:after { content: ") "; }


- Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090519/837ab34d/attachment-0002.htm>

More information about the whatwg mailing list