As I am currently writing an implementation for ruby rendering, I wondered about the exact way white-space is supposed to be handled between runs of ruby text.<br><br>As far as I see it, <ruby> is fundamentally an inline element, and thus whitespace would normally be collapsed, but not entirely eliminated. However, for the examples given for the <ruby> element, this would result in a single whitespace between the ideographic characters:<br>
<br><font face="Courier New"><ruby></font> <i style="color: rgb(204, 0, 0);">[ws]</i><br><font face="Courier New"> 漢<rp>(</rp><rt>かん</rt><rp>)</rp></font> <i style="color: rgb(204, 0, 0);">[ws]</i><br>
<font face="Courier New"> 字<rp>(</rp><rt>じ</rt><rp>)</rp></font> <i style="color: rgb(204, 0, 0);">[ws]</i><br><font face="Courier New"></ruby></font><br><br>rendered without ruby support would become (easier for e-mail):<br>
<br><font face="Courier New">漢(かん)</font><i style="color: rgb(204, 0, 0);"> [ws]</i><font face="Courier New"> 字(じ) <br><br><span style="font-family: arial,helvetica,sans-serif;">The whitespace would also be present with proper ruby rendering above the base characters.<br>
<br>OTOH, removing those white-spaces may not be desirable if the bases are not ideographic scripts, e.g.:<br><br></span></font><font face="Courier New"><ruby></font><br><font face="Courier New"> European<rp>(</rp><rt>E</rt><rp>)</rp></font><br>
<font face="Courier New"> Union<rp>(</rp><rt>U</rt><rp>)</rp></font><br><font face="Courier New"></ruby></font><br><br>(This example has yet another drawback: the white-space before "Union" would become part of the base and thus shift the annotation "U" slightly left of the center of the word "Union".)<br>
<br>For the time being I'm using a block-based rendering approach that automatically eliminates leading and trailing white-space in the base text, but I wondered what the correct approach would be within the scope of HTML5 (aside: an XHTML-like explicit <rb> container for the ruby base side-steps this problem, but is not a real option due to need for legacy support).<br>
<br><br>- Roland<br>