Skip to notes.The slides are typically visually-oriented graphics, but the notes contain enough information to understand the tutorial.
Slide

Complex ruby

Complex ruby markup can define more fine-grained associations between annotations and base text, and can associate two ruby texts with one base text. Let's look at this in easy steps.

Whereas the example of simple ruby markup we saw earlier associated a whole run of annotation text with a whole run of base text, complex ruby markup allows you to indicate which bit of annotation relates to which character within a single ruby element.

The example at the top of the slide shows the three characters in the base text 林和代 annotated for pronunciation with the three strings はやし, かず and . Each annotation is clearly aligned with its respective character.

To markup up the data in a way that enables us to achieve this we use two new elements, rbc (ruby base container), and rtc (ruby text container). In the simplest case (shown on the slide), each of these elements contains the same number of rb and rt elements, respectively. In this way, an rb element and its respective rt element can be effectively paired together.

This is analogous to use of td elements within tr elements in HTML tables.

The markup for the whole, as shown on the slide, is:

<ruby>
<rbc><rb>林</rb> <rb>和</rb> <rb>代</rb></rbc>
<rtc> <rt>はやし</rt><rt>かず</rt><rt>よ</rt> </rtc>
</ruby>

The rule is: simple ruby has no rbc or rtc elements; complex ruby has rtc and rtc elements.


Version: $Id: Slide0110.html,v 1.8 2006/02/02 17:48:26 rishida Exp $