Display RUBY

Example: WWWWord Wide Web

The code for the above notation is :

<ruby>

  <rb>WWW</rb>

  <rt>Word Wide Web</rt>

</ruby>


This function is only available on MS IE > 5.0,
Netscape does NOT support this DIRECTLY, but it CAN BE SOLVED SIMPLY by modifying your stylesheet, so continue reading...

Fallback example: WWW(Word Wide Web)
Use this fallback instead, the ruby text will be displayed between parentheses after the ruby base if the browser does not support ruby.:
<ruby>

  <rb>WWW</rb>

   <<rp>(</rp>

    <rt>World Wide Web</rt>

   <<rp>)</rp>

</ruby>


Workaround:
If one add this code to the stylesheet of the document, Netscape can display ruby tags.

/* Rules for Ruby annotation */
ruby {
display:inline-table;
text-align:center;
white-space:nowrap;
text-indent:0;
margin:0 -0.2em;
vertical-align:-20%;
}

/* ruby base */
ruby>rb,ruby>rbc {
display:table-row-group;
line-height:90%;
}

/* ruby text before */
ruby>rt,ruby>rbc+rtc {
display:table-header-group;
font-size:60%;
line-height:40%;
letter-spacing:0;
}

/* ruby text after */
ruby>rbc+rtc+rtc {
display:table-footer-group;
font-size:60%;
line-height:40%;
letter-spacing:0;
}

/* complex ruby text */
rbc>rb,rtc>rt {
display:table-cell;
letter-spacing:0;
}

rtc>rt[rbspan] {
display:table-caption;
}

/* ruby parentheses */
rp {
display:none;
}

(thanks to Kitamura Akatsuki, original source)

More information, see Ruby Annotation (W3C) and CSS3 module: Ruby (W3C)


   
Search >


Local links are in blue, links to other websites are in red, commands are in green.

You need unicode fonts, a 4+ browser and acrobat reader to fully explore and enjoy this webpage. (if necessary you can download asian fontpacks for acrobat reader)

Currently translating my thesis to English : more info

© Seba - contact at seba at ulyssis dot org
users online: 5