[css-ruby] Rewrite Ruby intro, display type sections

Tue, 18 Jun 2013 22:06:47 +0900

author
fantasai <fantasai.cvs@inkedblade.net>
date
Tue, 18 Jun 2013 22:06:47 +0900
changeset 8492
c0946931cbe8
parent 8491
c9c67edf183b
child 8493
7c1714a409cb

[css-ruby] Rewrite Ruby intro, display type sections

css-ruby/Overview.html file | annotate | diff | comparison | revisions
css-ruby/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css-ruby/Overview.html	Tue Jun 18 11:56:58 2013 +0200
     1.2 +++ b/css-ruby/Overview.html	Tue Jun 18 22:06:47 2013 +0900
     1.3 @@ -183,7 +183,7 @@
     1.4     <li><a href="#ruby-model"><span class=secno>2. </span> Ruby Formatting
     1.5      Model</a>
     1.6      <ul class=toc>
     1.7 -     <li><a href="#display"><span class=secno>2.1. </span> Ruby specific
     1.8 +     <li><a href="#ruby-display"><span class=secno>2.1. </span> Ruby-specific
     1.9        ‘<code class=property>display</code>’ property values</a>
    1.10  
    1.11       <li><a href="#box-model"><span class=secno>2.2. </span> Ruby box
    1.12 @@ -283,526 +283,497 @@
    1.13  
    1.14    <h3 id=conventions><span class=secno>1.3. </span> Document conventions</h3>
    1.15  
    1.16 -  <p>There are a number of illustrations in this document for which the
    1.17 -   following legend is used:
    1.18 -
    1.19 -  <p><img alt="Symbolic wide-cell glyph representation" class=example
    1.20 -   height=39 src="images/fullwidth.gif" width=39> - wide-cell glyph (e.g.
    1.21 -   Han) which is the <i>n</i>-th character in the text run, they may also
    1.22 -   appear as half size boxes when used as annotations.<br>
    1.23 -   <img alt="Symbolic narrow-cell glyph representation" class=example
    1.24 -   height=39 src="images/halfwidth.gif" width=19> - narrow-cell glyph (e.g.
    1.25 -   Roman) which is the <i>n</i>-th glyph in the text run.<br>
    1.26 -
    1.27 -  <p>Many typographical properties in East Asian typography depend on the
    1.28 -   fact that a character is typically rendered as either a wide or narrow
    1.29 -   character. All characters described by the Unicode Standard <a
    1.30 -   href="#UNICODE" rel=biblioentry>[UNICODE]<!--{{UNICODE}}--></a> can be
    1.31 -   categorized by a width property. This is covered by the Unicode Standard
    1.32 -   Annex <a href="#UAX11" rel=biblioentry>[UAX11]<!--{{UAX11}}--></a>.
    1.33 -
    1.34 -  <p>The orientation which the above symbols assume in the diagrams
    1.35 -   corresponds to the orientation that the glyphs they represent are intended
    1.36 -   to assume when rendered by the user agent. Spacing between these
    1.37 -   characters in the diagrams is usually symbolic, unless intentionally
    1.38 -   changed to make a point.
    1.39 -
    1.40 -  <h3 id=ruby-def><span class=secno>1.4. </span> What is ruby?</h3>
    1.41 -
    1.42 -  <p>"Ruby" is the commonly used name for a run of text that appears in the
    1.43 -   immediate vicinity of another run of text, referred to as the "base", and
    1.44 -   serves as an annotation or a pronunciation guide associated with that run
    1.45 -   of text. Ruby, as used in Japanese, is described in JIS X-4051 <a
    1.46 -   href="#JIS4051" rel=biblioentry>[JIS4051]<!--{{JIS4051}}--></a> (in
    1.47 -   Japanese) and in Requirements for Japanese Text Layout <a href="#JLREQ"
    1.48 -   rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> (in English and Japanese)].
    1.49 -   The ruby structure and the XHTML markup to represent it is described in
    1.50 -   the Ruby Annotation <a href="#RUBY"
    1.51 -   rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> specification. This section
    1.52 -   describes the CSS properties relevant to ruby. The following figures show
    1.53 -   two examples of Ruby.
    1.54 -
    1.55 -  <div class=figure>
    1.56 -   <p> <img alt="Example of ruby applied on top of a Japanese expression"
    1.57 -    class=example src="images/licence.png">
    1.58 -
    1.59 -   <p><b>Figure 2.2.1</b>: Example of ruby used in Japanese (simple case)
    1.60 -  </div>
    1.61 -
    1.62 -  <div class=figure>
    1.63 -   <p> <img
    1.64 -    alt="Example showing complex ruby with annotation text before and after  the base characters"
    1.65 -    class=example height=108 src="images/ruby-univ.gif" width=277>
    1.66 -
    1.67 -   <p><strong>Figure 2.2.2</strong>: Complex ruby with annotation text before
    1.68 -    and after the base characters
    1.69 -  </div>
    1.70 -
    1.71 -  <p>In the first example, a single annotation is used to annotate the base
    1.72 -   sequence. In Japanese typography, this simple case is sometimes called 
    1.73 -   &quot;<span lang=ja>taigo</span> ruby&quot; or group-ruby (per-word ruby).
    1.74 -
    1.75 -  <p>In the second example, multiple annotations are attached to a base
    1.76 -   sequence, the hiragana characters on top refer to the pronunciation of
    1.77 -   each of the base Kanji characters (annotated in a <a
    1.78 -   href="#g-monoruby">mono-ruby</a> fashion), while the words ‘<code
    1.79 -   class=property>Keio</code>’ and ‘<code
    1.80 -   class=property>University</code>’ on the bottom are annotations
    1.81 -   describing the English translation of respectively the first four and the
    1.82 -   last two Kanji characters of the base. To allow correct association
    1.83 -   between the hiragana characters and their corresponding Kanji base
    1.84 -   characters, the spacing between these Kanji characters may be adjusted
    1.85 -   (this happens around the fourth Kanji character in the figure 2.2.2
    1.86 -   above).
    1.87 -
    1.88 -  <p class=Note><span class=note-label>Note:</span> To avoid variable spacing
    1.89 -   between the Kanji characters in the example above the hiragana annotations
    1.90 -   can also be created as a simple annotation ruby.
    1.91 -
    1.92 -  <p>The two examples correspond respectively to two types of ruby: simple
    1.93 -   ruby using simple ruby markup and complex ruby using complex ruby markup.
    1.94 -
    1.95 -  <h2 id=ruby-model><span class=secno>2. </span> Ruby Formatting Model</h2>
    1.96 -
    1.97 -  <h3 id=display><span class=secno>2.1. </span> Ruby specific ‘<code
    1.98 -   class=property>display</code>’ property values</h3>
    1.99 -
   1.100 -  <p>The CSS ruby model is based on the W3C Ruby Annotation Recommendation <a
   1.101 -   href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a>. The Recommendation
   1.102 -   specifies the ruby structure in a way to closely parallel the visual
   1.103 -   layout of the ruby element. In this model, a ruby consists of one or more
   1.104 -   base elements associated with one or more annotation elements.
   1.105 -
   1.106 -  <p>The CSS model does not require that the document language include
   1.107 -   elements that correspond to each of these components. For document
   1.108 -   languages (such as XML applications) that do not have pre-defined ruby
   1.109 -   elements, authors must map document language elements to ruby elements;
   1.110 -   this is done with the ‘<code class=property>display</code>’ property.
   1.111 -   The following ‘<code class=property>display</code>’ values assign ruby
   1.112 -   semantics to an arbitrary element:
   1.113 +  <p>Many typographical conventions in East Asian typography depend on
   1.114 +   whether the character rendered is wide (CJK) or narrow (non-CJK). There
   1.115 +   are a number of illustrations in this document for which the following
   1.116 +   legend is used:
   1.117  
   1.118    <dl>
   1.119 -   <dt><strong>ruby</strong> (in XHTML: ruby)
   1.120 +   <dt><img alt="Symbolic wide-cell glyph representation" height=39
   1.121 +    src="images/fullwidth.gif" width=39>
   1.122  
   1.123 -   <dd>Specifies that an element defines a ruby structure.
   1.124 +   <dd>Wide-cell glyph (e.g. Han) that is the <var>n</var>th character in the
   1.125 +    text run. They are typically sized to 50% when used as annotations.
   1.126  
   1.127 -   <dt><strong>ruby-base</strong> (in XHTML: rb)
   1.128 +   <dt><img alt="Symbolic narrow-cell glyph representation" height=39
   1.129 +    src="images/halfwidth.gif" width=19>
   1.130  
   1.131 -   <dd>Specifies that an element defines a ruby base.
   1.132 +   <dd>Narrow-cell glyph (e.g. Roman) which is the <var>n</var>th glyph in
   1.133 +    the text run.
   1.134 +    <p>The orientation which the above symbols assume in the diagrams
   1.135 +     corresponds to the orientation that the glyphs they represent are
   1.136 +     intended to assume when rendered by the user agent. Spacing between
   1.137 +     these characters in the diagrams is incidental, unless intentionally
   1.138 +     changed to make a point.
   1.139  
   1.140 -   <dt><strong>ruby-text</strong> (in XHTML: rt)
   1.141 +    <h3 id=ruby-def><span class=secno>1.4. </span> What is ruby?</h3>
   1.142  
   1.143 -   <dd>Specifies that an element defines a ruby text.
   1.144 +    <p><dfn id=ruby>Ruby</dfn> is the commonly-used name for a run of text
   1.145 +     that appears alongside another run of text (referred to as the
   1.146 +     “base”) and serves as an annotation or a pronunciation guide
   1.147 +     associated with that run of text.
   1.148  
   1.149 -   <dt><strong>ruby-base-container</strong> (in XHTML: rbc)
   1.150 +    <p>The following figures show two examples of Ruby, a simple case and one
   1.151 +     with more complicated structure.
   1.152  
   1.153 -   <dd>Specifies that an element contains one or more ruby base.
   1.154 +    <div class=example>
   1.155 +     <p>In this first example, a single annotation is used to annotate the
   1.156 +      base text.
   1.157  
   1.158 -   <dt><strong>ruby-text-container</strong> (in XHTML: rtc)
   1.159 +     <div class=figure>
   1.160 +      <p><img alt="Example of ruby applied on top of a Japanese expression"
   1.161 +       src="images/licence.png">
   1.162  
   1.163 -   <dd>Specifies that an element contains one or more ruby text.
   1.164 -  </dl>
   1.165 +      <p class=caption>Example of ruby used in Japanese (simple case)
   1.166 +     </div>
   1.167  
   1.168 -  <p class=issue><span class=issuehead>Issue: </span> I18n WG proposes that
   1.169 -   there should be a display value rp also, to allow XML-based formats to
   1.170 -   associate rp behaviour with elements. See <a
   1.171 -   href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20display:+rp+value&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">thread</a>.
   1.172 -
   1.173 -  <p>The <a href="http://www.w3.org/TR/ruby/#ruby"><samp>rbspan</samp></a>
   1.174 -   attribute should also be used by XML applications to allow annotation
   1.175 -   spanning; but in addition, the ‘<code class=css><a
   1.176 -   href="#ruby-span">ruby-span</a></code>’ property must be used by those
   1.177 -   applications to indicate to the user agent the number of ruby base
   1.178 -   elements to be spanned.
   1.179 -
   1.180 -  <h3 id=box-model><span class=secno>2.2. </span> Ruby box model</h3>
   1.181 -
   1.182 -  <p class=issue><span class=issuehead>Issue: </span> The spec needs to
   1.183 -   address anonymous box generation rules (and to make them compatible with
   1.184 -   HTML5 ruby markup).
   1.185 -
   1.186 -  <p>In the following description, the elements specified by Ruby Annotation
   1.187 -   <a href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> are used to
   1.188 -   describe the box model. As mentioned earlier, a user agent can obtain the
   1.189 -   same results by using the Ruby specific ‘<code
   1.190 -   class=property>display</code>’ property values.
   1.191 -
   1.192 -  <p>For a user agent that supports the ruby markup, the ruby structure
   1.193 -   consists of three or more boxes. The outermost container is the <a
   1.194 -   href="http://www.w3.org/TR/ruby/#ruby"><samp>ruby</samp></a> element
   1.195 -   itself. In the simple case, it is a container for two non-overlapping
   1.196 -   boxes: the ruby text box (<a
   1.197 -   href="http://www.w3.org/TR/ruby/#rt"><samp>rt</samp></a> element) and the
   1.198 -   ruby base box (<a href="http://www.w3.org/TR/ruby/#rb"><samp>rb</samp></a>
   1.199 -   element). The positioning of these two boxes relative to each other is
   1.200 -   controlled by the <a href="#rubypos">‘<code
   1.201 -   class=property>ruby-position</code>’</a> property.
   1.202 -
   1.203 -  <div class=figure> <img
   1.204 -   alt="Diagram of the ruby box model    consisting of two boxes, one on top of the other, enclosed within a third box representing the ruby element"
   1.205 -   class=example height=93 src="images/r-box-t.gif" width=223>
   1.206 -   <p><b>Figure 3.2.1</b>: Ruby box model (simple case)
   1.207 -  </div>
   1.208 -
   1.209 -  <p>In the case of complex ruby, the ruby element is a container for two or
   1.210 -   three non-overlapping boxes: one ruby base collection (<a
   1.211 -   href="http://www.w3.org/TR/ruby/#rbc"><samp>rbc</samp></a> element), and
   1.212 -   one or two ruby text collections (<a
   1.213 -   href="http://www.w3.org/TR/ruby/#rtc"><samp>rtc</samp></a> element). The
   1.214 -   <samp>rbc</samp> element is itself a container for one or several ruby
   1.215 -   base box (<samp>rb</samp> element), while each <samp>rtc</samp> element is
   1.216 -   a container for one or several ruby text box (rt element). The position of
   1.217 -   the <samp>rtc</samp> element in relation to the related <samp>rbc</samp>
   1.218 -   element is controlled by the <a href="#rubypos">‘<code
   1.219 -   class=property>ruby-position</code>’</a> property. The two following
   1.220 -   figures show examples of these complex ruby.
   1.221 -
   1.222 -  <div class=figure> <img
   1.223 -   alt="Diagram of a group ruby with a full ruby    text above and partial ruby text below"
   1.224 -   height=170 src="images/r-box-g.gif" width=408>
   1.225 -   <p><b>Figure 3.2.2</b>: Ruby box model (complex ruby with an empty rt
   1.226 -    element after)
   1.227 -  </div>
   1.228 -
   1.229 -  <p>In the example above, the ruby text after (below) the ruby bases
   1.230 -   contains two <samp>rt</samp> elements with the first one being empty, the
   1.231 -   empty <samp>rt</samp> element corresponds to the first part of the ruby
   1.232 -   base collection (the first part is identified by the first <samp>rb</samp>
   1.233 -   element within the <samp> rbc</samp> element).
   1.234 -
   1.235 -  <div class=figure> <img
   1.236 -   alt="Diagram of a group ruby with a spanning    ruby text above and partial ruby text below"
   1.237 -   height=173 src="images/r-box-h.gif" width=400>
   1.238 -   <p><b>Figure 3.2.3</b>: Ruby box model (complex ruby with a spanning ruby
   1.239 -    text element)
   1.240 -  </div>
   1.241 -
   1.242 -  <p>In the example above, the ruby text before (above) the ruby bases spans
   1.243 -   the whole ruby base collection. The ruby text after (below) the ruby bases
   1.244 -   still contain two <samp>rt</samp> elements, one of which is empty. The
   1.245 -   spanning behavior of <samp>rt</samp> text elements is controlled by the <a
   1.246 -   href="http://www.w3.org/TR/ruby/#ruby"><samp>rbspan</samp></a> attribute
   1.247 -   in a way similar to the <samp>colspan</samp> attribute used for table
   1.248 -   column.
   1.249 -
   1.250 -  <p class=issue><span class=issuehead>Issue: </span> The examples above
   1.251 -   contain the term ‘<code class=css>group ruby</code>’, which is not
   1.252 -   used elsewhere in this specification. It appears to be used in a way that
   1.253 -   is different to the use of the term in JLREQ. I propose to replace it with
   1.254 -   just ‘<code class=property>ruby</code>’.
   1.255 -
   1.256 -  <p class=note><span class=note-label>Note:</span> The visual description of
   1.257 -   the ruby elements does not refer necessarily to the logical orders of the
   1.258 -   elements
   1.259 -
   1.260 -  <p>The width of the ruby box is by default determined by its widest child
   1.261 -   element, whose width in turn is determined by its content. The width of
   1.262 -   all direct children of the <samp>ruby</samp> element is the width of the
   1.263 -   widest children. In this respect, the ruby box is much like a two or three
   1.264 -   row <samp>table</samp> element, with the following exceptions:
   1.265 -
   1.266 -  <ul>
   1.267 -   <li>the ruby box is an inline element, like an image, even though it
   1.268 -    itself, like a table, is a container of other boxes
   1.269 -
   1.270 -   <li>the equivalent of the cells: the <samp>rb</samp> element and the
   1.271 -    <samp>rt</samp> text element can only contain inline-level elements.
   1.272 -
   1.273 -   <li>the content of each ‘<code class=property>cell</code>’ is always
   1.274 -    measured at its maximum width
   1.275 -
   1.276 -   <li>unlike a table, a ruby element doesn't have to fit in a line, the ruby
   1.277 -    box may be split into several boxes at line boundary, depending of the
   1.278 -    spanning of the ruby texts. This is however only possible for the complex
   1.279 -    ruby and can only happen at the boundary of non spanning elements.
   1.280 -
   1.281 -   <li>both the ruby text and the ruby base boxes may overlap with adjacent
   1.282 -    text (outside of the ruby element) if an appropriate <a
   1.283 -    href="#rubyover">‘<code class=property>ruby-overhang</code>’</a>
   1.284 -    parameter is set via CSS. Note however that the actual content of the
   1.285 -    ruby base cannot overlap with that adjacent text. The distribution of the
   1.286 -    content of the ruby base within the ruby base box is controlled by the <a
   1.287 -    href="#rubyalign">‘<code class=property>ruby-align</code>’</a>
   1.288 -    property.
   1.289 -  </ul>
   1.290 -
   1.291 -  <p>If the ruby text is not allowed to overhang, then the ruby behaves like
   1.292 -   a traditional box, i.e. only its contents are rendered within its
   1.293 -   boundaries and adjacent elements do not cross the box boundary:
   1.294 -
   1.295 -  <div class=figure>
   1.296 -   <p><img
   1.297 -    alt="Diagram showing the ruby boxes interacting with adjacent text"
   1.298 -    class=example height=91 src="images/ro-n.gif" width=220>
   1.299 -
   1.300 -   <p><b>Figure 3.2.4</b>: Simple ruby whose text is not allowed to overhang
   1.301 -    adjacent text
   1.302 -  </div>
   1.303 -
   1.304 -  <p>However, if ruby text is allowed to overhang adjacent elements and it
   1.305 -   happens to be wider than its base, then the adjacent content is partially
   1.306 -   rendered within the area of the ruby base box, while the ruby text may be
   1.307 -   partially overlapping with the upper blank parts of the adjacent content:
   1.308 -
   1.309 -  <div class=figure>
   1.310 -   <p><img
   1.311 -    alt="Diagram showing the ruby boxes interacting with adjacent text"
   1.312 -    class=example height=91 src="images/ro-a.gif" width=177>
   1.313 -
   1.314 -   <p><b>Figure 3.2.5</b>: Simple ruby whose text is allowed to overhang
   1.315 -    adjacent text
   1.316 -  </div>
   1.317 -
   1.318 -  <p>The ruby text related to a ruby base can never overhang another ruby
   1.319 -   base.
   1.320 -
   1.321 -  <p>The alignment of the contents of the base or the ruby text is not
   1.322 -   affected by the overhanging behavior. The alignment is achieved the same
   1.323 -   way regardless of the overhang behavior setting and it is computed before
   1.324 -   the space available for overlap is determined. It is controlled by the <a
   1.325 -   href="#rubyalign">‘<code class=property>ruby-align</code>’</a>
   1.326 -   property.
   1.327 -
   1.328 -  <p>The exact circumstances in which the ruby text will overhang other
   1.329 -   elements, and to what degree it will do so, will be controlled by the <a
   1.330 -   href="#rubyover">‘<code class=property>ruby-overhang</code>’</a>
   1.331 -   property.
   1.332 -
   1.333 -  <p>This entire logic applies the same way in vertical ideographic layout,
   1.334 -   only the dimension in which it works in such a layout is vertical, instead
   1.335 -   of horizontal.
   1.336 -
   1.337 -  <p class=note><span class=note-label>Note:</span> Because the purpose of
   1.338 -   the XHTML <samp>rp</samp> element <a href="#RUBY"
   1.339 -   rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> is to allow pre-existing user
   1.340 -   agents to parenthesize ruby text content, an XHTML user agent should use a
   1.341 -   styling rule for these elements that avoids rendering them such as 
   1.342 -   <samp>rp {display: none}</samp>.
   1.343 -
   1.344 -  <h3 id=ruby-line-height><span class=secno>2.3. </span> Ruby box and line
   1.345 -   stacking</h3>
   1.346 -
   1.347 -  <p>The interaction of the ruby box and line stacking is controlled by the
   1.348 -   ‘<code class=property>line-stacking-ruby</code>’ property described in
   1.349 -   the CSS3 Line Module. That property takes two values: ‘<code
   1.350 -   class=property>include-ruby</code>’ and ‘<code class=css>exclude-ruby.
   1.351 -   Depending on the property value, the ruby box is considered or excluded
   1.352 -   for line stacking. Even if the ruby box is considered for line stacking,
   1.353 -   some values of the </code>’line-stacking-strategy' property (also
   1.354 -   described in the CSS3 Line module) can still create occurrences where a
   1.355 -   the ruby box will eventually be ignored (e.g. case where the ‘<code
   1.356 -   class=property>line-stacking-strategy</code>’ value is ‘<code
   1.357 -   class=property>block-line-height</code>’).
   1.358 -
   1.359 -  <p>In the following figure, each line box is shown with leading space
   1.360 -   distributed before and after the two text segments (‘<code
   1.361 -   class=css>Previous line</code>’ and ‘<code class=css>Ruby
   1.362 -   base</code>’); the dotted lines show the line box for each line. The
   1.363 -   ‘<code class=property>line-stacking-ruby</code>’ property is set to
   1.364 -   ‘<code class=property>exclude-ruby</code>’. The achieved effect is
   1.365 -   that the ruby box does not affect the line to line spacing. It is however
   1.366 -   the responsibility of the style author to avoid ‘<code
   1.367 -   class=property>bleeding</code>’ effects between the ruby text and the
   1.368 -   surrounding text of images.
   1.369 -
   1.370 -  <div class=figure>
   1.371 -   <p> <img alt="Diagram showing the ruby text using 2 half leading"
   1.372 -    class=example height=138 src="images/rlh-a.gif" width=210>
   1.373 -
   1.374 -   <p><b>Figure 3.3.1</b>: Excluded Ruby text
   1.375 -  </div>
   1.376 -
   1.377 -  <p>In the following figure, the line boxes have no extra leading space. The
   1.378 -   ‘<code class=property>line-stacking-ruby</code>’ property is set to
   1.379 -   ‘<code class=property>include-ruby</code>’ and the ‘<code
   1.380 -   class=property>line-stacking-strategy</code>’ property is set to a value
   1.381 -   where inline boxes are considered for line stacking. In this case, the
   1.382 -   line box with the ruby text is affected and has its ‘<code
   1.383 -   class=property>stack-height</code>’ increased by the amount necessary to
   1.384 -   fit the ruby text.
   1.385 -
   1.386 -  <div class=figure>
   1.387 -   <p> <img alt="Diagram showing the ruby text expanding above base text"
   1.388 -    class=example height=111 src="images/rlh-b.gif" width=210>
   1.389 -
   1.390 -   <p><b>Figure 3.3.2</b>: Ruby text increasing line height
   1.391 -  </div>
   1.392 -
   1.393 -  <p>This mechanism allows rendering of evenly spaced lines of text within a
   1.394 -   block-level element, whether a line contains ruby or not. The authors need
   1.395 -   only to set for the block-level element a line height value larger than
   1.396 -   the computed line-height of the largest ruby element within the block.
   1.397 -
   1.398 -  <h3 id=ruby-line-breaking><span class=secno>2.4. </span> Ruby box and line
   1.399 -   breaking</h3>
   1.400 -
   1.401 -  <p>When a ruby falls at the end of a line where there is not sufficient
   1.402 -   room for the entire ruby to fit on the line, the complex ruby may be
   1.403 -   broken at locations where boxes of the ruby container align. Some examples
   1.404 -   are provided below to provide more clarity.
   1.405 -
   1.406 -  <p> <img
   1.407 -   alt="Diagram showing the line breaking opportunity in a complex ruby"
   1.408 -   class=example height=201 src="images/r-break-a.gif" width=408>
   1.409 -
   1.410 -  <p><b>Figure 3.4.1</b>: Complex ruby line breaking opportunity
   1.411 -
   1.412 -  <p> <img
   1.413 -   alt="Diagram showing the line breaking opportunity in a &#34;Bopomofo&#34; ruby"
   1.414 -   class=example height=90 src="images/r-break-b.gif" width=300>
   1.415 -
   1.416 -  <p><b>Figure 3.4.1</b>: "Bopomofo" ruby line breaking opportunity
   1.417 -
   1.418 -  <p class=issue><span class=issuehead>Issue: </span> Line breaks should
   1.419 -   only be allowed within ruby if the ruby base text can be broken at that
   1.420 -   point. E.g. if complex Ruby is used to annotate the two morphemes of
   1.421 -   &quot;butterfly&quot;, the fact that we have added ruby annotations should
   1.422 -   not cause a line breaking opportunity to be present between
   1.423 -   &quot;butter&quot; and &quot;fly&quot;
   1.424 -
   1.425 -  <h2 id=ruby-props><span class=secno>3. </span> Ruby Properties</h2>
   1.426 -
   1.427 -  <h3 id=rubypos><span class=secno>3.1. </span> Ruby positioning: the ‘<a
   1.428 -   href="#ruby-position"><code class=property>ruby-position</code></a>’
   1.429 -   property</h3>
   1.430 -
   1.431 -  <table class=propdef>
   1.432 -   <tbody>
   1.433 -    <tr>
   1.434 -     <th>Name:
   1.435 -
   1.436 -     <td><dfn id=ruby-position>ruby-position</dfn>
   1.437 -
   1.438 -    <tr>
   1.439 -     <th>Value:
   1.440 -
   1.441 -     <td>before | after | inter-character | inline
   1.442 -
   1.443 -    <tr>
   1.444 -     <th>Initial:
   1.445 -
   1.446 -     <td>before
   1.447 -
   1.448 -    <tr>
   1.449 -     <th>Applies to:
   1.450 -
   1.451 -     <td>the parent of elements with display: ruby-text.
   1.452 -
   1.453 -    <tr>
   1.454 -     <th>Inherited:
   1.455 -
   1.456 -     <td>yes
   1.457 -
   1.458 -    <tr>
   1.459 -     <th>Percentages:
   1.460 -
   1.461 -     <td>N/A
   1.462 -
   1.463 -    <tr>
   1.464 -     <th>Media:
   1.465 -
   1.466 -     <td>visual
   1.467 -
   1.468 -    <tr>
   1.469 -     <th>Computed value:
   1.470 -
   1.471 -     <td>specified value (except for initial and inherit)
   1.472 -
   1.473 -    <tr>
   1.474 -     <th>Animatable:
   1.475 -
   1.476 -     <td>no
   1.477 -
   1.478 -    <tr>
   1.479 -     <th>Canonical order:
   1.480 -
   1.481 -     <td><abbr title="follows order of property value definition">per
   1.482 -      grammar</abbr>
   1.483 -  </table>
   1.484 -
   1.485 -  <p class=issue><span class=issuehead>Issue: </span> We replaced ‘<code
   1.486 -   class=property>right</code>’ with ‘<code
   1.487 -   class=property>inter-character</code>’, since that was its original
   1.488 -   intended purpose and such removes potential ambiguity with ‘<code
   1.489 -   class=property>inline</code>’ or ‘<code
   1.490 -   class=property>before</code>’. Bopomofo ruby needs special handling by
   1.491 -   the implementation, if ruby is to always appear to the right. (Note that
   1.492 -   the user may also choose to position bopomofo ruby before the base, in
   1.493 -   which case they would use the normal ‘<code
   1.494 -   class=property>before</code>’ setting.)
   1.495 -
   1.496 -  <p>This property is used by the parent of elements with display: ruby-text
   1.497 -   to control the position of the ruby text with respect to its base. Such
   1.498 -   parents are typically either the <samp>ruby</samp> element itself (simple
   1.499 -   ruby) or the <samp>rtc</samp> element (complex ruby). This assures that
   1.500 -   all parts of a <samp>rtc</samp> element will be displayed in the same
   1.501 -   position. Possible values:
   1.502 -
   1.503 -  <p class=issue><span class=issuehead>Issue-107: </span> Roland Steiner has
   1.504 -   requested the addition of an auto value as default. See <a
   1.505 -   href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=ruby-position%3A+undesirable+default+value+%27before%27+for+complex+ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=www-style&amp;resultsperpage=20&amp;sortby=date">this
   1.506 -   thread</a> and <a
   1.507 -   href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=Styling+of+complex+Ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core&amp;resultsperpage=20&amp;sortby=date">this
   1.508 -   one</a>.
   1.509 -
   1.510 -  <dl>
   1.511 -   <dt><strong>before</strong>
   1.512 -
   1.513 -   <dd>The ruby text appears before the base. This is the most common setting
   1.514 -    used in ideographic East Asian writing systems. This is the initial
   1.515 -    value.
   1.516 -    <div class=figure>
   1.517 -     <p> <img
   1.518 -      alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing above the base"
   1.519 -      class=example height=33 src="images/shinkansen-top.gif" width=140>
   1.520 -
   1.521 -     <p><b>Figure 4.1.1</b>: Top ruby in horizontal layout applied to
   1.522 -      Japanese text
   1.523 +     <p>In Japanese typography, this case is sometimes called <i
   1.524 +      lang=ja>taigo</i> ruby or group-ruby (per-word ruby), because the
   1.525 +      annotation as a whole is associated with multi-character word (as a
   1.526 +      whole).
   1.527      </div>
   1.528  
   1.529 -    <p>If the base appears in a vertical-ideographic layout mode, the ruby
   1.530 -     appears on the right side of the base and is rendered in the same layout
   1.531 -     mode as the base (i.e. vertical-ideographic).
   1.532 +    <div class=example>
   1.533 +     <p>In this second example, two levels of annotations are attached to a
   1.534 +      base sequence: the hiragana characters on top refer to the
   1.535 +      pronunciation of each of the base kanji characters, while the words
   1.536 +      “Keio” and “University” on the bottom are annotations
   1.537 +      describing the English translation.
   1.538 +
   1.539 +     <div class=figure>
   1.540 +      <p><img
   1.541 +       alt="Example showing complex ruby with annotation text over and under the base characters"
   1.542 +       src="images/ruby-univ.gif">
   1.543 +
   1.544 +      <p class=caption>Complex ruby with annotation text over and under the
   1.545 +       base characters
   1.546 +     </div>
   1.547 +
   1.548 +     <p>
   1.549 +
   1.550 +     <p>Notice that to allow correct association between the hiragana
   1.551 +      characters and their corresponding Kanji base characters, the spacing
   1.552 +      between these Kanji characters is adjusted. (This happens around the
   1.553 +      fourth Kanji character in the figure above.) To avoid variable spacing
   1.554 +      between the Kanji characters in the example above the hiragana
   1.555 +      annotations can be styled as a <i>collapsed annotation</i>, which will
   1.556 +      look more like the group-ruby example earlier. However because the
   1.557 +      base-annotation pairings are recorded in the ruby structure, if the
   1.558 +      text breaks across lines, the annotation characters will stay correctly
   1.559 +      paired with their respective base characters.
   1.560 +    </div>
   1.561 +    <a href="#ruby"><i>Ruby</i></a> formatting as used in Japanese is
   1.562 +    described in JIS X-4051 <a href="#JIS4051"
   1.563 +    rel=biblioentry>[JIS4051]<!--{{JIS4051}}--></a> (in Japanese) and in
   1.564 +    Requirements for Japanese Text Layout <a href="#JLREQ"
   1.565 +    rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> (in English and Japanese)].
   1.566 +    In HTML, ruby structure and markup to represent it is described in the
   1.567 +    Ruby Markup Extension specification. This module describes the CSS
   1.568 +    rendering model and formatting controls relevant to ruby layout of such
   1.569 +    markup.
   1.570 +    <h2 id=ruby-model><span class=secno>2. </span> Ruby Formatting Model</h2>
   1.571 +
   1.572 +    <p>The CSS ruby model is based on the <a
   1.573 +     href="http://darobin.github.io/html-ruby/">HTML Ruby Markup
   1.574 +     Extension</a> and <a href="http://www.w3.org/TR/ruby/">XHTML Ruby
   1.575 +     Annotation Recommendation</a> <a href="#RUBY"
   1.576 +     rel=biblioentry>[RUBY]<!--{{RUBY}}--></a>. In this model, a ruby
   1.577 +     structure consists of one or more <dfn id=ruby-base>ruby base</dfn>
   1.578 +     elements representing the base (annotated) text, associated with one or
   1.579 +     more levels of <dfn id=ruby-annotation>ruby annotation</dfn> elements
   1.580 +     representing the annotations. The structure of ruby is similar to that
   1.581 +     of a table: there are “rows” (the base text level, each annotation
   1.582 +     level) and “columns” (each <a href="#ruby-base"><i>ruby base</i></a>
   1.583 +     and its corresponding <a href="#ruby-annotation"><i>ruby
   1.584 +     annotations</i></a>).
   1.585 +
   1.586 +    <p>Consecutive bases and annotations are grouped together into <dfn
   1.587 +     id=ruby-segments>ruby segments</dfn>. Within a <i>ruby segment</i>, a <a
   1.588 +     href="#ruby-annotation"><i>ruby annotation</i></a> may span multiple <a
   1.589 +     href="#ruby-base"><i>ruby bases<i>. </i></i></a>
   1.590 +
   1.591 +    <p class=note>In HTML, a single <code>&lt;ruby&gt;</code> element may
   1.592 +     contain multiple <a href="#ruby-segments"><i>ruby segments</i></a>. (In
   1.593 +     the XHTML Ruby model, a single <code>&lt;ruby&gt;</code> element can
   1.594 +     only contain one <i>ruby segment</i>.)
   1.595 +
   1.596 +    <h3 id=ruby-display><span class=secno>2.1. </span> Ruby-specific ‘<code
   1.597 +     class=property>display</code>’ property values</h3>
   1.598 +
   1.599 +    <p>For document languages (such as XML applications) that do not have
   1.600 +     pre-defined ruby elements, authors must map document language elements
   1.601 +     to ruby elements; this is done with the ‘<code
   1.602 +     class=property>display</code>’ property.
   1.603 +
   1.604 +    <table class=propdef>
   1.605 +     <tbody>
   1.606 +      <tr>
   1.607 +       <th>Name:
   1.608 +
   1.609 +       <td>display
   1.610 +
   1.611 +      <tr>
   1.612 +       <th><a href="#values">New Values</a>:
   1.613 +
   1.614 +       <td>ruby | ruby-base | ruby-text | ruby-base-container |
   1.615 +        ruby-text-container
   1.616 +    </table>
   1.617 +
   1.618 +    <p>The following new ‘<code class=property>display</code>’ values
   1.619 +     assign ruby layout roles to an arbitrary element:
   1.620 +
   1.621 +    <dl>
   1.622 +     <dt>‘<a href="#ruby"><code class=css>ruby</code></a>’
   1.623 +
   1.624 +     <dd>Specifies that an element generates a <dfn
   1.625 +      id=ruby-container-box>ruby container box</dfn>. (Corresponds to
   1.626 +      HTML/XHTML <code>&lt;ruby&gt;</code> elements.)
   1.627 +
   1.628 +     <dt>‘<code class=css>ruby-base</code>’
   1.629 +
   1.630 +     <dd>Specifies that an element generates a <dfn id=ruby-base-box>ruby
   1.631 +      base box</dfn>. (Corresponds to HTML/XHTML <code>&lt;rb&gt;</code>
   1.632 +      elements.)
   1.633 +
   1.634 +     <dt>‘<code class=css>ruby-text</code>’
   1.635 +
   1.636 +     <dd>Specifies that an element generates a <dfn
   1.637 +      id=ruby-annotation-box>ruby annotation box</dfn>. (Corresponds to
   1.638 +      HTML/XHTML <code>&lt;rt&gt;</code> elements.)
   1.639 +
   1.640 +     <dt>‘<code class=css>ruby-base-container</code>’
   1.641 +
   1.642 +     <dd>Specifies that an element generates a <dfn
   1.643 +      id=ruby-base-container-box>ruby base container box</dfn>. (Corresponds
   1.644 +      to XHTML <code>&lt;rbc&gt;</code> elements; always implied in HTML.)
   1.645 +
   1.646 +     <dt>‘<code class=css>ruby-text-container</code>’
   1.647 +
   1.648 +     <dd>Specifies that an element generates a <dfn
   1.649 +      id=ruby-annotation-container-box>ruby annotation container box</dfn>.
   1.650 +      (Corresponds to HTML/XHTML <code>&lt;ruby&gt;</code> elements.)
   1.651 +    </dl>
   1.652 +
   1.653 +    <p>The CSS model does not require that the document language include
   1.654 +     elements that correspond to each of these components. Missing parts of
   1.655 +     the structure are implied through the anonymous box generation rules.
   1.656 +
   1.657 +    <p class=issue>The spec needs to address anonymous box generation rules
   1.658 +     (and to make them compatible with HTML5 ruby markup).
   1.659 +
   1.660 +    <p class=issue>How should box generation rules deal with ruby elements
   1.661 +     that contain block-level boxes? Turn them into inline blocks? Treat them
   1.662 +     as ‘<code class=css>display: none</code>’? Force them to float?
   1.663 +     Something else?
   1.664 +
   1.665 +    <h3 id=box-model><span class=secno>2.2. </span> Ruby box model</h3>
   1.666 +
   1.667 +    <p>In the following description, the elements specified by Ruby
   1.668 +     Annotation <a href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> are
   1.669 +     used to describe the box model. As mentioned earlier, a user agent can
   1.670 +     obtain the same results by using the Ruby specific ‘<code
   1.671 +     class=property>display</code>’ property values.
   1.672 +
   1.673 +    <p>For a user agent that supports the ruby markup, the ruby structure
   1.674 +     consists of three or more boxes. The outermost container is the <a
   1.675 +     href="http://www.w3.org/TR/ruby/#ruby"><samp>ruby</samp></a> element
   1.676 +     itself. In the simple case, it is a container for two non-overlapping
   1.677 +     boxes: the ruby text box (<a
   1.678 +     href="http://www.w3.org/TR/ruby/#rt"><samp>rt</samp></a> element) and
   1.679 +     the ruby base box (<a
   1.680 +     href="http://www.w3.org/TR/ruby/#rb"><samp>rb</samp></a> element). The
   1.681 +     positioning of these two boxes relative to each other is controlled by
   1.682 +     the <a href="#rubypos">‘<code
   1.683 +     class=property>ruby-position</code>’</a> property.
   1.684 +
   1.685 +    <div class=figure> <img
   1.686 +     alt="Diagram of the ruby box model    consisting of two boxes, one on top of the other, enclosed within a third box representing the ruby element"
   1.687 +     class=example height=93 src="images/r-box-t.gif" width=223>
   1.688 +     <p><b>Figure 3.2.1</b>: Ruby box model (simple case)
   1.689 +    </div>
   1.690 +
   1.691 +    <p>In the case of complex ruby, the ruby element is a container for two
   1.692 +     or three non-overlapping boxes: one ruby base collection (<a
   1.693 +     href="http://www.w3.org/TR/ruby/#rbc"><samp>rbc</samp></a> element), and
   1.694 +     one or two ruby text collections (<a
   1.695 +     href="http://www.w3.org/TR/ruby/#rtc"><samp>rtc</samp></a> element). The
   1.696 +     <samp>rbc</samp> element is itself a container for one or several ruby
   1.697 +     base box (<samp>rb</samp> element), while each <samp>rtc</samp> element
   1.698 +     is a container for one or several ruby text box (rt element). The
   1.699 +     position of the <samp>rtc</samp> element in relation to the related
   1.700 +     <samp>rbc</samp> element is controlled by the <a
   1.701 +     href="#rubypos">‘<code class=property>ruby-position</code>’</a>
   1.702 +     property. The two following figures show examples of these complex ruby.
   1.703 +
   1.704 +    <div class=figure> <img
   1.705 +     alt="Diagram of a group ruby with a full ruby    text above and partial ruby text below"
   1.706 +     height=170 src="images/r-box-g.gif" width=408>
   1.707 +     <p><b>Figure 3.2.2</b>: Ruby box model (complex ruby with an empty rt
   1.708 +      element after)
   1.709 +    </div>
   1.710 +
   1.711 +    <p>In the example above, the ruby text after (below) the ruby bases
   1.712 +     contains two <samp>rt</samp> elements with the first one being empty,
   1.713 +     the empty <samp>rt</samp> element corresponds to the first part of the
   1.714 +     ruby base collection (the first part is identified by the first
   1.715 +     <samp>rb</samp> element within the <samp> rbc</samp> element).
   1.716 +
   1.717 +    <div class=figure> <img
   1.718 +     alt="Diagram of a group ruby with a spanning    ruby text above and partial ruby text below"
   1.719 +     height=173 src="images/r-box-h.gif" width=400>
   1.720 +     <p><b>Figure 3.2.3</b>: Ruby box model (complex ruby with a spanning
   1.721 +      ruby text element)
   1.722 +    </div>
   1.723 +
   1.724 +    <p>In the example above, the ruby text before (above) the ruby bases
   1.725 +     spans the whole ruby base collection. The ruby text after (below) the
   1.726 +     ruby bases still contain two <samp>rt</samp> elements, one of which is
   1.727 +     empty. The spanning behavior of <samp>rt</samp> text elements is
   1.728 +     controlled by the <a
   1.729 +     href="http://www.w3.org/TR/ruby/#ruby"><samp>rbspan</samp></a> attribute
   1.730 +     in a way similar to the <samp>colspan</samp> attribute used for table
   1.731 +     column.
   1.732 +
   1.733 +    <p class=issue><span class=issuehead>Issue: </span> The examples above
   1.734 +     contain the term ‘<code class=css>group ruby</code>’, which is not
   1.735 +     used elsewhere in this specification. It appears to be used in a way
   1.736 +     that is different to the use of the term in JLREQ. I propose to replace
   1.737 +     it with just ‘<a href="#ruby"><code class=property>ruby</code></a>’.
   1.738 +
   1.739 +    <p class=note><span class=note-label>Note:</span> The visual description
   1.740 +     of the ruby elements does not refer necessarily to the logical orders of
   1.741 +     the elements
   1.742 +
   1.743 +    <p>The width of the ruby box is by default determined by its widest child
   1.744 +     element, whose width in turn is determined by its content. The width of
   1.745 +     all direct children of the <a href="#ruby"><samp>ruby</samp></a> element
   1.746 +     is the width of the widest children. In this respect, the ruby box is
   1.747 +     much like a two or three row <samp>table</samp> element, with the
   1.748 +     following exceptions:
   1.749 +
   1.750 +    <ul>
   1.751 +     <li>the ruby box is an inline element, like an image, even though it
   1.752 +      itself, like a table, is a container of other boxes
   1.753 +
   1.754 +     <li>the equivalent of the cells: the <samp>rb</samp> element and the
   1.755 +      <samp>rt</samp> text element can only contain inline-level elements.
   1.756 +
   1.757 +     <li>the content of each ‘<code class=property>cell</code>’ is always
   1.758 +      measured at its maximum width
   1.759 +
   1.760 +     <li>unlike a table, a ruby element doesn't have to fit in a line, the
   1.761 +      ruby box may be split into several boxes at line boundary, depending of
   1.762 +      the spanning of the ruby texts. This is however only possible for the
   1.763 +      complex ruby and can only happen at the boundary of non spanning
   1.764 +      elements.
   1.765 +
   1.766 +     <li>both the ruby text and the ruby base boxes may overlap with adjacent
   1.767 +      text (outside of the ruby element) if an appropriate <a
   1.768 +      href="#rubyover">‘<code class=property>ruby-overhang</code>’</a>
   1.769 +      parameter is set via CSS. Note however that the actual content of the
   1.770 +      ruby base cannot overlap with that adjacent text. The distribution of
   1.771 +      the content of the ruby base within the ruby base box is controlled by
   1.772 +      the <a href="#rubyalign">‘<code
   1.773 +      class=property>ruby-align</code>’</a> property.
   1.774 +    </ul>
   1.775 +
   1.776 +    <p>If the ruby text is not allowed to overhang, then the ruby behaves
   1.777 +     like a traditional box, i.e. only its contents are rendered within its
   1.778 +     boundaries and adjacent elements do not cross the box boundary:
   1.779  
   1.780      <div class=figure>
   1.781 -     <p> <img
   1.782 -      alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the right of the base"
   1.783 -      class=example height=141 src="images/shinkansen-right.gif" width=33>
   1.784 +     <p><img
   1.785 +      alt="Diagram showing the ruby boxes interacting with adjacent text"
   1.786 +      class=example height=91 src="images/ro-n.gif" width=220>
   1.787  
   1.788 -     <p><b>Figure 4.1.2</b>: Top ruby in vertical ideographic layout applied
   1.789 -      to Japanese text
   1.790 +     <p><b>Figure 3.2.4</b>: Simple ruby whose text is not allowed to
   1.791 +      overhang adjacent text
   1.792      </div>
   1.793  
   1.794 -   <dt><strong>after</strong>
   1.795 +    <p>However, if ruby text is allowed to overhang adjacent elements and it
   1.796 +     happens to be wider than its base, then the adjacent content is
   1.797 +     partially rendered within the area of the ruby base box, while the ruby
   1.798 +     text may be partially overlapping with the upper blank parts of the
   1.799 +     adjacent content:
   1.800  
   1.801 -   <dd>The ruby text appears after the base. This is a relatively rare
   1.802 -    setting used in ideographic East Asian writing systems, most easily found
   1.803 -    in educational text.
   1.804      <div class=figure>
   1.805 -     <p> <img
   1.806 -      alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing below the base"
   1.807 -      class=example height=36 src="images/shinkansen-bottom.gif" width=142>
   1.808 +     <p><img
   1.809 +      alt="Diagram showing the ruby boxes interacting with adjacent text"
   1.810 +      class=example height=91 src="images/ro-a.gif" width=177>
   1.811  
   1.812 -     <p><b>Figure 4.1.3</b>: Bottom ruby in horizontal layout applied to
   1.813 -      Japanese text
   1.814 +     <p><b>Figure 3.2.5</b>: Simple ruby whose text is allowed to overhang
   1.815 +      adjacent text
   1.816      </div>
   1.817  
   1.818 -    <p>If the base appears in a vertical ideographic mode, the bottom ruby
   1.819 -     appears on the left side of the base and is rendered in the same layout
   1.820 -     mode as the base (i.e. vertical).
   1.821 +    <p>The ruby text related to a ruby base can never overhang another ruby
   1.822 +     base.
   1.823 +
   1.824 +    <p>The alignment of the contents of the base or the ruby text is not
   1.825 +     affected by the overhanging behavior. The alignment is achieved the same
   1.826 +     way regardless of the overhang behavior setting and it is computed
   1.827 +     before the space available for overlap is determined. It is controlled
   1.828 +     by the <a href="#rubyalign">‘<code
   1.829 +     class=property>ruby-align</code>’</a> property.
   1.830 +
   1.831 +    <p>The exact circumstances in which the ruby text will overhang other
   1.832 +     elements, and to what degree it will do so, will be controlled by the <a
   1.833 +     href="#rubyover">‘<code class=property>ruby-overhang</code>’</a>
   1.834 +     property.
   1.835 +
   1.836 +    <p>This entire logic applies the same way in vertical ideographic layout,
   1.837 +     only the dimension in which it works in such a layout is vertical,
   1.838 +     instead of horizontal.
   1.839 +
   1.840 +    <p class=note><span class=note-label>Note:</span> Because the purpose of
   1.841 +     the XHTML <samp>rp</samp> element <a href="#RUBY"
   1.842 +     rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> is to allow pre-existing user
   1.843 +     agents to parenthesize ruby text content, an XHTML user agent should use
   1.844 +     a styling rule for these elements that avoids rendering them such as 
   1.845 +     <samp>rp {display: none}</samp>.
   1.846 +
   1.847 +    <h3 id=ruby-line-height><span class=secno>2.3. </span> Ruby box and line
   1.848 +     stacking</h3>
   1.849 +
   1.850 +    <p>The interaction of the ruby box and line stacking is controlled by the
   1.851 +     ‘<code class=property>line-stacking-ruby</code>’ property described
   1.852 +     in the CSS3 Line Module. That property takes two values: ‘<code
   1.853 +     class=property>include-ruby</code>’ and ‘<code
   1.854 +     class=css>exclude-ruby. Depending on the property value, the ruby box is
   1.855 +     considered or excluded for line stacking. Even if the ruby box is
   1.856 +     considered for line stacking, some values of the
   1.857 +     </code>’line-stacking-strategy' property (also described in the CSS3
   1.858 +     Line module) can still create occurrences where a the ruby box will
   1.859 +     eventually be ignored (e.g. case where the ‘<code
   1.860 +     class=property>line-stacking-strategy</code>’ value is ‘<code
   1.861 +     class=property>block-line-height</code>’).
   1.862 +
   1.863 +    <p>In the following figure, each line box is shown with leading space
   1.864 +     distributed before and after the two text segments (‘<code
   1.865 +     class=css>Previous line</code>’ and ‘<a href="#ruby-base"><code
   1.866 +     class=css>Ruby base</code></a>’); the dotted lines show the line box
   1.867 +     for each line. The ‘<code class=property>line-stacking-ruby</code>’
   1.868 +     property is set to ‘<code class=property>exclude-ruby</code>’. The
   1.869 +     achieved effect is that the ruby box does not affect the line to line
   1.870 +     spacing. It is however the responsibility of the style author to avoid
   1.871 +     ‘<code class=property>bleeding</code>’ effects between the ruby text
   1.872 +     and the surrounding text of images.
   1.873  
   1.874      <div class=figure>
   1.875 -     <p> <img
   1.876 -      alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the left of the base"
   1.877 -      class=example height=141 src="images/shinkansen-left.gif" width=37>
   1.878 +     <p> <img alt="Diagram showing the ruby text using 2 half leading"
   1.879 +      class=example height=138 src="images/rlh-a.gif" width=210>
   1.880  
   1.881 -     <p><b>Figure 4.1.4</b>: Bottom ruby in vertical ideographic layout
   1.882 -      applied to Japanese text
   1.883 +     <p><b>Figure 3.3.1</b>: Excluded Ruby text
   1.884      </div>
   1.885  
   1.886 -   <dt><strong>inter-character</strong>
   1.887 +    <p>In the following figure, the line boxes have no extra leading space.
   1.888 +     The ‘<code class=property>line-stacking-ruby</code>’ property is set
   1.889 +     to ‘<code class=property>include-ruby</code>’ and the ‘<code
   1.890 +     class=property>line-stacking-strategy</code>’ property is set to a
   1.891 +     value where inline boxes are considered for line stacking. In this case,
   1.892 +     the line box with the ruby text is affected and has its ‘<code
   1.893 +     class=property>stack-height</code>’ increased by the amount necessary
   1.894 +     to fit the ruby text.
   1.895  
   1.896 -   <dd>
   1.897 +    <div class=figure>
   1.898 +     <p> <img alt="Diagram showing the ruby text expanding above base text"
   1.899 +      class=example height=111 src="images/rlh-b.gif" width=210>
   1.900 +
   1.901 +     <p><b>Figure 3.3.2</b>: Ruby text increasing line height
   1.902 +    </div>
   1.903 +
   1.904 +    <p>This mechanism allows rendering of evenly spaced lines of text within
   1.905 +     a block-level element, whether a line contains ruby or not. The authors
   1.906 +     need only to set for the block-level element a line height value larger
   1.907 +     than the computed line-height of the largest ruby element within the
   1.908 +     block.
   1.909 +
   1.910 +    <h3 id=ruby-line-breaking><span class=secno>2.4. </span> Ruby box and
   1.911 +     line breaking</h3>
   1.912 +
   1.913 +    <p>When a ruby falls at the end of a line where there is not sufficient
   1.914 +     room for the entire ruby to fit on the line, the complex ruby may be
   1.915 +     broken at locations where boxes of the ruby container align. Some
   1.916 +     examples are provided below to provide more clarity.
   1.917 +
   1.918 +    <p> <img
   1.919 +     alt="Diagram showing the line breaking opportunity in a complex ruby"
   1.920 +     class=example height=201 src="images/r-break-a.gif" width=408>
   1.921 +
   1.922 +    <p><b>Figure 3.4.1</b>: Complex ruby line breaking opportunity
   1.923 +
   1.924 +    <p> <img
   1.925 +     alt="Diagram showing the line breaking opportunity in a &#34;Bopomofo&#34; ruby"
   1.926 +     class=example height=90 src="images/r-break-b.gif" width=300>
   1.927 +
   1.928 +    <p><b>Figure 3.4.1</b>: "Bopomofo" ruby line breaking opportunity
   1.929 +
   1.930 +    <p class=issue><span class=issuehead>Issue: </span> Line breaks should
   1.931 +     only be allowed within ruby if the ruby base text can be broken at that
   1.932 +     point. E.g. if complex Ruby is used to annotate the two morphemes of
   1.933 +     &quot;butterfly&quot;, the fact that we have added ruby annotations
   1.934 +     should not cause a line breaking opportunity to be present between
   1.935 +     &quot;butter&quot; and &quot;fly&quot;
   1.936 +
   1.937 +    <h2 id=ruby-props><span class=secno>3. </span> Ruby Properties</h2>
   1.938 +
   1.939 +    <h3 id=rubypos><span class=secno>3.1. </span> Ruby positioning: the ‘<a
   1.940 +     href="#ruby-position"><code class=property>ruby-position</code></a>’
   1.941 +     property</h3>
   1.942 +
   1.943 +    <table class=propdef>
   1.944 +     <tbody>
   1.945 +      <tr>
   1.946 +       <th>Name:
   1.947 +
   1.948 +       <td><dfn id=ruby-position>ruby-position</dfn>
   1.949 +
   1.950 +      <tr>
   1.951 +       <th>Value:
   1.952 +
   1.953 +       <td>before | after | inter-character | inline
   1.954 +
   1.955 +      <tr>
   1.956 +       <th>Initial:
   1.957 +
   1.958 +       <td>before
   1.959 +
   1.960 +      <tr>
   1.961 +       <th>Applies to:
   1.962 +
   1.963 +       <td>the parent of elements with display: ruby-text.
   1.964 +
   1.965 +      <tr>
   1.966 +       <th>Inherited:
   1.967 +
   1.968 +       <td>yes
   1.969 +
   1.970 +      <tr>
   1.971 +       <th>Percentages:
   1.972 +
   1.973 +       <td>N/A
   1.974 +
   1.975 +      <tr>
   1.976 +       <th>Media:
   1.977 +
   1.978 +       <td>visual
   1.979 +
   1.980 +      <tr>
   1.981 +       <th>Computed value:
   1.982 +
   1.983 +       <td>specified value (except for initial and inherit)
   1.984 +
   1.985 +      <tr>
   1.986 +       <th>Animatable:
   1.987 +
   1.988 +       <td>no
   1.989 +
   1.990 +      <tr>
   1.991 +       <th>Canonical order:
   1.992 +
   1.993 +       <td><abbr title="follows order of property value definition">per
   1.994 +        grammar</abbr>
   1.995 +    </table>
   1.996 +
   1.997      <p class=issue><span class=issuehead>Issue: </span> We replaced ‘<code
   1.998       class=property>right</code>’ with ‘<code
   1.999       class=property>inter-character</code>’, since that was its original
  1.1000 @@ -812,501 +783,589 @@
  1.1001       the implementation, if ruby is to always appear to the right. (Note that
  1.1002       the user may also choose to position bopomofo ruby before the base, in
  1.1003       which case they would use the normal ‘<code
  1.1004 -     class=property>before</code>’ setting.) See <a
  1.1005 -     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20Vertical+layout+not+enough+for+bopomofo&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1006 -     thread</a> following a request from the i18n WG.
  1.1007 +     class=property>before</code>’ setting.)
  1.1008  
  1.1009 -    <p>The ruby text appears on the right of the base. Unlike ‘<code
  1.1010 -     class=property>before</code>’ and ‘<code
  1.1011 -     class=property>after</code>’, this value is visual and is not relative
  1.1012 -     to the text flow direction.
  1.1013 +    <p>This property is used by the parent of elements with display:
  1.1014 +     ruby-text to control the position of the ruby text with respect to its
  1.1015 +     base. Such parents are typically either the <a
  1.1016 +     href="#ruby"><samp>ruby</samp></a> element itself (simple ruby) or the
  1.1017 +     <samp>rtc</samp> element (complex ruby). This assures that all parts of
  1.1018 +     a <samp>rtc</samp> element will be displayed in the same position.
  1.1019 +     Possible values:
  1.1020  
  1.1021 -    <p>This value is provided for the special case of traditional Chinese as
  1.1022 -     used especially in Taiwan: ruby (made of <a href="#g-bopomofo"><span
  1.1023 -     lang=zh>bopomofo</span></a> glyphs) in that context appears vertically
  1.1024 -     along the right side of the base glyph, whether the layout of the base
  1.1025 -     characters is vertical or horizontal:
  1.1026 +    <p class=issue><span class=issuehead>Issue-107: </span> Roland Steiner
  1.1027 +     has requested the addition of an auto value as default. See <a
  1.1028 +     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=ruby-position%3A+undesirable+default+value+%27before%27+for+complex+ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=www-style&amp;resultsperpage=20&amp;sortby=date">this
  1.1029 +     thread</a> and <a
  1.1030 +     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=Styling+of+complex+Ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core&amp;resultsperpage=20&amp;sortby=date">this
  1.1031 +     one</a>.
  1.1032  
  1.1033 -    <div class=figure>
  1.1034 -     <p><img alt="Example of Taiwanese-style ruby" class=example height=42
  1.1035 -      src="images/bopomofo.gif" width=138>
  1.1036 +    <dl>
  1.1037 +     <dt><strong>before</strong>
  1.1038  
  1.1039 -     <p><b>Figure 4.1.5</b>: "<span lang=zh>Bopomofo</span>" ruby in
  1.1040 -      traditional Chinese (ruby text shown in blue for clarity) in horizontal
  1.1041 -      layout
  1.1042 -    </div>
  1.1043 +     <dd>The ruby text appears before the base. This is the most common
  1.1044 +      setting used in ideographic East Asian writing systems. This is the
  1.1045 +      initial value.
  1.1046 +      <div class=figure>
  1.1047 +       <p> <img
  1.1048 +        alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing above the base"
  1.1049 +        class=example height=33 src="images/shinkansen-top.gif" width=140>
  1.1050  
  1.1051 -    <p class=note><span class=note-label>Note:</span> The bopomofo
  1.1052 -     transcription is written in the normal way as part of the ruby text. The
  1.1053 -     user agent is responsible for ensuring the correct relative alignment
  1.1054 -     and positioning of the glyphs, including those corresponding to the tone
  1.1055 -     marks, when displaying. Tone marks are spacing characters that occur in
  1.1056 -     memory at the end of the ruby text for each base character. They are
  1.1057 -     usually displayed in a separate column to the right of the bopomofo
  1.1058 -     characters, and the height of the tone mark depends on the number of
  1.1059 -     characters in the syllable. One tone mark, however, is placed above the
  1.1060 -     bopomofo, not to the right of it.
  1.1061 +       <p><b>Figure 4.1.1</b>: Top ruby in horizontal layout applied to
  1.1062 +        Japanese text
  1.1063 +      </div>
  1.1064  
  1.1065 -    <p class=note><span class=note-label>Note:</span> To make bopomofo
  1.1066 -     annotations appear before or after the base text, like annotations for
  1.1067 -     most other East Asian writing systems, use the ‘<code
  1.1068 -     class=property>before</code>’ and ‘<code
  1.1069 -     class=property>after</code>’ values of ruby-position.
  1.1070 +      <p>If the base appears in a vertical-ideographic layout mode, the ruby
  1.1071 +       appears on the right side of the base and is rendered in the same
  1.1072 +       layout mode as the base (i.e. vertical-ideographic).
  1.1073  
  1.1074 -    <p>It is not defined how a user-agent should handle ruby text that is not
  1.1075 -     bopomofo when the value of ruby-position is set to ‘<code
  1.1076 -     class=property>right</code>’.</p>
  1.1077 -    <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
  1.1078 +      <div class=figure>
  1.1079 +       <p> <img
  1.1080 +        alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the right of the base"
  1.1081 +        class=example height=141 src="images/shinkansen-right.gif" width=33>
  1.1082  
  1.1083 -   <dt><strong>inline</strong>
  1.1084 +       <p><b>Figure 4.1.2</b>: Top ruby in vertical ideographic layout
  1.1085 +        applied to Japanese text
  1.1086 +      </div>
  1.1087  
  1.1088 -   <dd>
  1.1089 -    <p>Ruby text follows the ruby base with no special styling. The value can
  1.1090 -     be used to disable ruby text positioning.
  1.1091 +     <dt><strong>after</strong>
  1.1092  
  1.1093 -    <p>If the author has used the XHTML <samp>rp</samp> element <a
  1.1094 -     href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> they should set
  1.1095 -     the <samp>display</samp> value for that element to <samp>inline</samp>,
  1.1096 -     so that the ruby text is distinguishable from the base text. If no
  1.1097 -     <samp>rp</samp> element has been used, the author can use the
  1.1098 -     <samp>content</samp> property with the <samp>:before</samp> and
  1.1099 -     <samp>:after</samp> pseudo-elements to set off the ruby text.
  1.1100 +     <dd>The ruby text appears after the base. This is a relatively rare
  1.1101 +      setting used in ideographic East Asian writing systems, most easily
  1.1102 +      found in educational text.
  1.1103 +      <div class=figure>
  1.1104 +       <p> <img
  1.1105 +        alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing below the base"
  1.1106 +        class=example height=36 src="images/shinkansen-bottom.gif" width=142>
  1.1107  
  1.1108 -    <p class=issue><span class=issuehead>Issue: </span> Here is a <a
  1.1109 -     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20inline+value+description+missing&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">request
  1.1110 -     </a>for this section to be added, from the i18n WG..
  1.1111 -  </dl>
  1.1112 +       <p><b>Figure 4.1.3</b>: Bottom ruby in horizontal layout applied to
  1.1113 +        Japanese text
  1.1114 +      </div>
  1.1115  
  1.1116 -  <p>If two rtc elements are set with the same ruby-position value, (for
  1.1117 -   example both 'before'), the relative position of the two elements is
  1.1118 -   undefined. This setting should not be used.
  1.1119 +      <p>If the base appears in a vertical ideographic mode, the bottom ruby
  1.1120 +       appears on the left side of the base and is rendered in the same
  1.1121 +       layout mode as the base (i.e. vertical).
  1.1122  
  1.1123 -  <h3 id=rubyalign><span class=secno>3.2. </span> Ruby alignment: the ‘<a
  1.1124 -   href="#ruby-align"><code class=property>ruby-align</code></a>’ property</h3>
  1.1125 +      <div class=figure>
  1.1126 +       <p> <img
  1.1127 +        alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the left of the base"
  1.1128 +        class=example height=141 src="images/shinkansen-left.gif" width=37>
  1.1129  
  1.1130 -  <table class=propdef>
  1.1131 -   <tbody>
  1.1132 -    <tr>
  1.1133 -     <th>Name:
  1.1134 +       <p><b>Figure 4.1.4</b>: Bottom ruby in vertical ideographic layout
  1.1135 +        applied to Japanese text
  1.1136 +      </div>
  1.1137  
  1.1138 -     <td><dfn id=ruby-align>ruby-align</dfn>
  1.1139 +     <dt><strong>inter-character</strong>
  1.1140  
  1.1141 -    <tr>
  1.1142 -     <th>Value:
  1.1143 +     <dd>
  1.1144 +      <p class=issue><span class=issuehead>Issue: </span> We replaced
  1.1145 +       ‘<code class=property>right</code>’ with ‘<code
  1.1146 +       class=property>inter-character</code>’, since that was its original
  1.1147 +       intended purpose and such removes potential ambiguity with ‘<code
  1.1148 +       class=property>inline</code>’ or ‘<code
  1.1149 +       class=property>before</code>’. Bopomofo ruby needs special handling
  1.1150 +       by the implementation, if ruby is to always appear to the right. (Note
  1.1151 +       that the user may also choose to position bopomofo ruby before the
  1.1152 +       base, in which case they would use the normal ‘<code
  1.1153 +       class=property>before</code>’ setting.) See <a
  1.1154 +       href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20Vertical+layout+not+enough+for+bopomofo&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1155 +       thread</a> following a request from the i18n WG.
  1.1156  
  1.1157 -     <td>auto | start | left | center | end | right | distribute-letter |
  1.1158 -      distribute-space | line-edge
  1.1159 +      <p>The ruby text appears on the right of the base. Unlike ‘<code
  1.1160 +       class=property>before</code>’ and ‘<code
  1.1161 +       class=property>after</code>’, this value is visual and is not
  1.1162 +       relative to the text flow direction.
  1.1163  
  1.1164 -    <tr>
  1.1165 -     <th>Initial:
  1.1166 +      <p>This value is provided for the special case of traditional Chinese
  1.1167 +       as used especially in Taiwan: ruby (made of <a
  1.1168 +       href="#g-bopomofo"><span lang=zh>bopomofo</span></a> glyphs) in that
  1.1169 +       context appears vertically along the right side of the base glyph,
  1.1170 +       whether the layout of the base characters is vertical or horizontal:
  1.1171  
  1.1172 -     <td>auto
  1.1173 +      <div class=figure>
  1.1174 +       <p><img alt="Example of Taiwanese-style ruby" class=example height=42
  1.1175 +        src="images/bopomofo.gif" width=138>
  1.1176  
  1.1177 -    <tr>
  1.1178 -     <th>Applies to:
  1.1179 +       <p><b>Figure 4.1.5</b>: "<span lang=zh>Bopomofo</span>" ruby in
  1.1180 +        traditional Chinese (ruby text shown in blue for clarity) in
  1.1181 +        horizontal layout
  1.1182 +      </div>
  1.1183  
  1.1184 -     <td>all elements and generated content
  1.1185 +      <p class=note><span class=note-label>Note:</span> The bopomofo
  1.1186 +       transcription is written in the normal way as part of the ruby text.
  1.1187 +       The user agent is responsible for ensuring the correct relative
  1.1188 +       alignment and positioning of the glyphs, including those corresponding
  1.1189 +       to the tone marks, when displaying. Tone marks are spacing characters
  1.1190 +       that occur in memory at the end of the ruby text for each base
  1.1191 +       character. They are usually displayed in a separate column to the
  1.1192 +       right of the bopomofo characters, and the height of the tone mark
  1.1193 +       depends on the number of characters in the syllable. One tone mark,
  1.1194 +       however, is placed above the bopomofo, not to the right of it.
  1.1195  
  1.1196 -    <tr>
  1.1197 -     <th>Inherited:
  1.1198 +      <p class=note><span class=note-label>Note:</span> To make bopomofo
  1.1199 +       annotations appear before or after the base text, like annotations for
  1.1200 +       most other East Asian writing systems, use the ‘<code
  1.1201 +       class=property>before</code>’ and ‘<code
  1.1202 +       class=property>after</code>’ values of ruby-position.
  1.1203  
  1.1204 -     <td>yes
  1.1205 +      <p>It is not defined how a user-agent should handle ruby text that is
  1.1206 +       not bopomofo when the value of ruby-position is set to ‘<code
  1.1207 +       class=property>right</code>’.</p>
  1.1208 +      <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
  1.1209  
  1.1210 -    <tr>
  1.1211 -     <th>Percentages:
  1.1212 +     <dt><strong>inline</strong>
  1.1213  
  1.1214 -     <td>N/A
  1.1215 +     <dd>
  1.1216 +      <p>Ruby text follows the ruby base with no special styling. The value
  1.1217 +       can be used to disable ruby text positioning.
  1.1218  
  1.1219 -    <tr>
  1.1220 -     <th>Media:
  1.1221 +      <p>If the author has used the XHTML <samp>rp</samp> element <a
  1.1222 +       href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a> they should set
  1.1223 +       the <samp>display</samp> value for that element to
  1.1224 +       <samp>inline</samp>, so that the ruby text is distinguishable from the
  1.1225 +       base text. If no <samp>rp</samp> element has been used, the author can
  1.1226 +       use the <samp>content</samp> property with the <samp>:before</samp>
  1.1227 +       and <samp>:after</samp> pseudo-elements to set off the ruby text.
  1.1228  
  1.1229 -     <td>visual
  1.1230 +      <p class=issue><span class=issuehead>Issue: </span> Here is a <a
  1.1231 +       href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20inline+value+description+missing&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">request
  1.1232 +       </a>for this section to be added, from the i18n WG..
  1.1233 +    </dl>
  1.1234  
  1.1235 -    <tr>
  1.1236 -     <th>Computed value:
  1.1237 +    <p>If two rtc elements are set with the same ruby-position value, (for
  1.1238 +     example both 'before'), the relative position of the two elements is
  1.1239 +     undefined. This setting should not be used.
  1.1240  
  1.1241 -     <td>specified value (except for initial and inherit)
  1.1242 -  </table>
  1.1243 +    <h3 id=rubyalign><span class=secno>3.2. </span> Ruby alignment: the ‘<a
  1.1244 +     href="#ruby-align"><code class=property>ruby-align</code></a>’
  1.1245 +     property</h3>
  1.1246  
  1.1247 -  <p>This property can be used on any element to control the text alignment
  1.1248 -   of the ruby text and ruby base contents relative to each other. It applies
  1.1249 -   to all the rubys in the element. For simple ruby, the alignment is applied
  1.1250 -   to the ruby child element whose content is shorter: either the <a
  1.1251 -   href="http://www.w3.org/TR/ruby/#rb"><samp>rb</samp></a> element or the <a
  1.1252 -   href="http://www.w3.org/TR/ruby/#rt"><samp>rt</samp></a> element <a
  1.1253 -   href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a>. For complex ruby,
  1.1254 -   the alignment is also applied to the ruby child elements whose content is
  1.1255 -   shorter: either the <samp>rb</samp> element and/or one or two
  1.1256 -   <samp>rt</samp> elements for each related ruby text and ruby base element
  1.1257 -   within the <samp>rtc</samp> and <samp>rbc</samp> element.
  1.1258 +    <table class=propdef>
  1.1259 +     <tbody>
  1.1260 +      <tr>
  1.1261 +       <th>Name:
  1.1262  
  1.1263 -  <p>Possible values:
  1.1264 +       <td><dfn id=ruby-align>ruby-align</dfn>
  1.1265  
  1.1266 -  <p class=issue><span class=issuehead>Issue: </span> Tony Graham has <a
  1.1267 -   href="http://www.w3.org/Style/XSL/Group/FO/wiki/Ruby#Treat_CSS3_.22ruby-align.22_As_Shorthand.3F">suggested
  1.1268 -   </a>that distribute-letter and distribute-space be values of a
  1.1269 -   ruby-group-distribution property, and line-edge be moved to a
  1.1270 -   ruby-alignment-edge property, and that the rest be gathered under a
  1.1271 -   ruby-alignment property. And that ruby-align become a shorthand.
  1.1272 +      <tr>
  1.1273 +       <th>Value:
  1.1274  
  1.1275 -  <dl>
  1.1276 -   <dt><strong>auto</strong>
  1.1277 +       <td>auto | start | left | center | end | right | distribute-letter |
  1.1278 +        distribute-space | line-edge
  1.1279  
  1.1280 -   <dd>The user agent determines how the ruby contents are aligned. This is
  1.1281 -    the initial value. The behavior recommended by <a href="#JLREQ"
  1.1282 -    rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> is for wide-cell ruby to be
  1.1283 -    aligned in the ‘<code class=property>distribute-space</code>’ mode:
  1.1284 -    <div class=figure>
  1.1285 -     <p><img
  1.1286 -      alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base"
  1.1287 -      class=example height=91 src="images/ra-ds.gif" width=145><img
  1.1288 -      alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base"
  1.1289 -      class=example height=91 src="images/ra-ds-rb.gif" width=145>
  1.1290 +      <tr>
  1.1291 +       <th>Initial:
  1.1292  
  1.1293 -     <p><b>Figure 4.2.1</b>: Wide-cell text in ‘<code
  1.1294 -      class=property>auto</code>’ ruby alignment is ‘<code
  1.1295 -      class=property>distribute-space</code>’ justified
  1.1296 -    </div>
  1.1297 +       <td>auto
  1.1298  
  1.1299 -    <p>The recommended behavior for narrow-cell glyph ruby is to be aligned
  1.1300 -     in the ‘<code class=property>center</code>’ mode.
  1.1301 +      <tr>
  1.1302 +       <th>Applies to:
  1.1303  
  1.1304 -    <div class=figure>
  1.1305 -     <p><img
  1.1306 -      alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base"
  1.1307 -      class=example height=91 src="images/ra-c-h.gif" width=145><img
  1.1308 -      alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base"
  1.1309 -      class=example height=91 src="images/ra-c-rb-h.gif" width=145>
  1.1310 +       <td>all elements and generated content
  1.1311  
  1.1312 -     <p><b>Figure 4.2.2</b>: Narrow-width ruby text in ‘<code
  1.1313 -      class=property>auto</code>’ ruby alignment is centered
  1.1314 -    </div>
  1.1315 +      <tr>
  1.1316 +       <th>Inherited:
  1.1317  
  1.1318 -   <dt><strong>left</strong>
  1.1319 +       <td>yes
  1.1320  
  1.1321 -   <dd>The ruby text content is aligned with the start edge of the base.
  1.1322 -    <p class=issue><span class=issuehead>Issue: </span> The i18n WG feels
  1.1323 -     that start and left should not be synonymous, and proposed to drop left
  1.1324 -     (there is no left/right in overhang)? See <a
  1.1325 -     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1326 -     thread</a>.
  1.1327 +      <tr>
  1.1328 +       <th>Percentages:
  1.1329  
  1.1330 -    <div class=figure>
  1.1331 -     <p><img
  1.1332 -      alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base"
  1.1333 -      class=example height=91 src="images/ra-l.gif" width=145><img
  1.1334 -      alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base"
  1.1335 -      class=example height=91 src="images/ra-l-rb.gif" width=145>
  1.1336 +       <td>N/A
  1.1337  
  1.1338 -     <p><b>Figure 4.2.3</b>: Start ruby alignment
  1.1339 -    </div>
  1.1340 +      <tr>
  1.1341 +       <th>Media:
  1.1342  
  1.1343 -   <dt><strong>center</strong>
  1.1344 +       <td>visual
  1.1345  
  1.1346 -   <dd>The ruby text content is centered within the width of the base. If the
  1.1347 -    length of the base is smaller than the length of the ruby text, then the
  1.1348 -    base is centered within the width of the ruby text.
  1.1349 -    <div class=figure>
  1.1350 -     <p><img
  1.1351 -      alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base"
  1.1352 -      class=example height=91 src="images/ra-c.gif" width=145><img
  1.1353 -      alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base"
  1.1354 -      class=example height=91 src="images/ra-c-rb.gif" width=145>
  1.1355 +      <tr>
  1.1356 +       <th>Computed value:
  1.1357  
  1.1358 -     <p><b>Figure 4.2.4</b>: Center ruby alignment
  1.1359 -    </div>
  1.1360 +       <td>specified value (except for initial and inherit)
  1.1361 +    </table>
  1.1362  
  1.1363 -   <dt><strong>right</strong>
  1.1364 +    <p>This property can be used on any element to control the text alignment
  1.1365 +     of the ruby text and ruby base contents relative to each other. It
  1.1366 +     applies to all the rubys in the element. For simple ruby, the alignment
  1.1367 +     is applied to the ruby child element whose content is shorter: either
  1.1368 +     the <a href="http://www.w3.org/TR/ruby/#rb"><samp>rb</samp></a> element
  1.1369 +     or the <a href="http://www.w3.org/TR/ruby/#rt"><samp>rt</samp></a>
  1.1370 +     element <a href="#RUBY" rel=biblioentry>[RUBY]<!--{{RUBY}}--></a>. For
  1.1371 +     complex ruby, the alignment is also applied to the ruby child elements
  1.1372 +     whose content is shorter: either the <samp>rb</samp> element and/or one
  1.1373 +     or two <samp>rt</samp> elements for each related ruby text and ruby base
  1.1374 +     element within the <samp>rtc</samp> and <samp>rbc</samp> element.
  1.1375  
  1.1376 -   <dd>The ruby text content is aligned with the end edge of the base.
  1.1377 -    <p class=issue><span class=issuehead>Issue: </span> The i18n WG feels
  1.1378 -     that end and right should not be synonymous, and proposed to drop right
  1.1379 -     (there is no left/right in overhang)? See <a
  1.1380 -     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1381 -     thread</a>.
  1.1382 +    <p>Possible values:
  1.1383  
  1.1384 -    <div class=figure>
  1.1385 -     <p><img
  1.1386 -      alt="Diagram of glyph layout in right aligned ruby when ruby text is shorter than base"
  1.1387 -      class=example height=91 src="images/ra-r.gif" width=145><img
  1.1388 -      alt="Diagram of glyph layout in right aligned ruby when ruby text is longer than base"
  1.1389 -      class=example height=91 src="images/ra-r-rb.gif" width=145>
  1.1390 +    <p class=issue><span class=issuehead>Issue: </span> Tony Graham has <a
  1.1391 +     href="http://www.w3.org/Style/XSL/Group/FO/wiki/Ruby#Treat_CSS3_.22ruby-align.22_As_Shorthand.3F">suggested
  1.1392 +     </a>that distribute-letter and distribute-space be values of a
  1.1393 +     ruby-group-distribution property, and line-edge be moved to a
  1.1394 +     ruby-alignment-edge property, and that the rest be gathered under a
  1.1395 +     ruby-alignment property. And that ruby-align become a shorthand.
  1.1396  
  1.1397 -     <p><b>Figure 4.2.5</b>: End ruby alignment
  1.1398 -    </div>
  1.1399 +    <dl>
  1.1400 +     <dt><strong>auto</strong>
  1.1401  
  1.1402 -   <dt><strong>distribute-letter</strong>
  1.1403 +     <dd>The user agent determines how the ruby contents are aligned. This is
  1.1404 +      the initial value. The behavior recommended by <a href="#JLREQ"
  1.1405 +      rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> is for wide-cell ruby to be
  1.1406 +      aligned in the ‘<code class=property>distribute-space</code>’ mode:
  1.1407  
  1.1408 -   <dd>If the width of the ruby text is smaller than that of the base, then
  1.1409 -    the ruby text contents are evenly distributed across the width of the
  1.1410 -    base, with the first and last ruby text glyphs lining up with the
  1.1411 -    corresponding first and last base glyphs. If the width of the ruby text
  1.1412 -    is at least the width of the base, then the letters of the base are
  1.1413 -    evenly distributed across the width of the ruby text.
  1.1414 -    <div class=figure>
  1.1415 -     <p><img
  1.1416 -      alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base"
  1.1417 -      class=example height=91 src="images/ra-dl.gif" width=145><img
  1.1418 -      alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base"
  1.1419 -      class=example height=91 src="images/ra-dl-rb.gif" width=145>
  1.1420 +      <div class=figure>
  1.1421 +       <p><img
  1.1422 +        alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base"
  1.1423 +        class=example height=91 src="images/ra-ds.gif" width=145><img
  1.1424 +        alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base"
  1.1425 +        class=example height=91 src="images/ra-ds-rb.gif" width=145>
  1.1426  
  1.1427 -     <p><b>Figure 4.2.6</b>: Distribute-letter ruby alignment
  1.1428 -    </div>
  1.1429 +       <p><b>Figure 4.2.1</b>: Wide-cell text in ‘<code
  1.1430 +        class=property>auto</code>’ ruby alignment is ‘<code
  1.1431 +        class=property>distribute-space</code>’ justified
  1.1432 +      </div>
  1.1433  
  1.1434 -   <dt><strong>distribute-space</strong>
  1.1435 +      <p>The recommended behavior for narrow-cell glyph ruby is to be aligned
  1.1436 +       in the ‘<code class=property>center</code>’ mode.
  1.1437  
  1.1438 -   <dd>If the width of the ruby text is smaller than that of the base, then
  1.1439 -    the ruby text contents are evenly distributed across the width of the
  1.1440 -    base, with a certain amount of white space preceding the first and
  1.1441 -    following the last character in the ruby text. That amount of white space
  1.1442 -    is normally equal to half the amount of inter-character space of the ruby
  1.1443 -    text. If the width of the ruby text is at least the width of the base,
  1.1444 -    then the same type of space distribution applies to the base. In other
  1.1445 -    words, if the base is shorter than the ruby text, the base is
  1.1446 -    distribute-space aligned. This type of alignment is described by <a
  1.1447 -    href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>.
  1.1448 -    <div class=figure>
  1.1449 -     <p><img
  1.1450 -      alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is shorter than base"
  1.1451 -      class=example height=91 src="images/ra-ds.gif" width=145><img
  1.1452 -      alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is longer than base"
  1.1453 -      class=example height=91 src="images/ra-ds-rb.gif" width=145>
  1.1454 +      <div class=figure>
  1.1455 +       <p><img
  1.1456 +        alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base"
  1.1457 +        class=example height=91 src="images/ra-c-h.gif" width=145><img
  1.1458 +        alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base"
  1.1459 +        class=example height=91 src="images/ra-c-rb-h.gif" width=145>
  1.1460  
  1.1461 -     <p><b>Figure 4.2.7</b>: Distribute-space ruby alignment
  1.1462 -    </div>
  1.1463 +       <p><b>Figure 4.2.2</b>: Narrow-width ruby text in ‘<code
  1.1464 +        class=property>auto</code>’ ruby alignment is centered
  1.1465 +      </div>
  1.1466  
  1.1467 -   <dt><strong>line-edge</strong>
  1.1468 +     <dt><strong>left</strong>
  1.1469  
  1.1470 -   <dd>If the ruby text is not adjacent to a line edge, it is aligned as in
  1.1471 -    ‘<code class=property>auto</code>’. If it is adjacent to a line edge,
  1.1472 -    then it is still aligned as in auto, but the side of the ruby text that
  1.1473 -    touches the end of the line is lined up with the corresponding edge of
  1.1474 -    the base. This type of alignment is described by <a href="#JLREQ"
  1.1475 -    rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>. This type of alignment is
  1.1476 -    relevant only to the scenario where the ruby text is longer than the ruby
  1.1477 -    base. In the other scenarios, this is just ‘<code
  1.1478 -    class=property>auto</code>’.
  1.1479 -    <div class=figure>
  1.1480 -     <p><img
  1.1481 -      alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base"
  1.1482 -      class=example height=109 src="images/ra-le-l.gif" width=146><img
  1.1483 -      alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base"
  1.1484 -      class=example height=110 src="images/ra-le-r.gif" width=146>
  1.1485 +     <dd>The ruby text content is aligned with the start edge of the base.
  1.1486 +      <p class=issue><span class=issuehead>Issue: </span> The i18n WG feels
  1.1487 +       that start and left should not be synonymous, and proposed to drop
  1.1488 +       left (there is no left/right in overhang)? See <a
  1.1489 +       href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1490 +       thread</a>.
  1.1491  
  1.1492 -     <p><b>Figure 4.2.8</b>: Line edge ruby alignment
  1.1493 -    </div>
  1.1494 -  </dl>
  1.1495 +      <div class=figure>
  1.1496 +       <p><img
  1.1497 +        alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base"
  1.1498 +        class=example height=91 src="images/ra-l.gif" width=145><img
  1.1499 +        alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base"
  1.1500 +        class=example height=91 src="images/ra-l-rb.gif" width=145>
  1.1501  
  1.1502 -  <p>For a complex ruby with spanning elements, one additional consideration
  1.1503 -   is required. If the spanning element spans multiple ‘<code
  1.1504 -   class=property>rows</code>’ (other rbc or rtc elements), and the ruby
  1.1505 -   alignment requires space distribution among the ‘<code
  1.1506 -   class=property>spanned</code>’ elements, a ratio must be determined
  1.1507 -   among the ‘<code class=property>columns</code>’ of spanned elements.
  1.1508 -   This ratio is computed by taking into consideration the widest element
  1.1509 -   within each column.
  1.1510 +       <p><b>Figure 4.2.3</b>: Start ruby alignment
  1.1511 +      </div>
  1.1512  
  1.1513 -  <p>In the context of this property, the ‘<code
  1.1514 -   class=property>left</code>’ and ‘<code class=property>right</code>’
  1.1515 -   values are synonymous with the ‘<code class=property>start</code>’ and
  1.1516 -   ‘<code class=property>end</code>’ values respectively. I.e. their
  1.1517 -   meaning is relative according to the text layout flow. Most of the other
  1.1518 -   CSS properties interpret ‘<code class=property>left</code>’ and
  1.1519 -   ‘<code class=property>right</code>’ on an ‘<code
  1.1520 -   class=property>absolute</code>’ term. See Appendix A of the <a
  1.1521 -   href="#CSS3TEXT">CSS3 Text Module</a> for further details.
  1.1522 +     <dt><strong>center</strong>
  1.1523  
  1.1524 -  <h3 id=rubyover><span class=secno>3.3. </span> Ruby overhanging: the ‘<a
  1.1525 -   href="#ruby-overhang"><code class=property>ruby-overhang</code></a>’
  1.1526 -   property</h3>
  1.1527 +     <dd>The ruby text content is centered within the width of the base. If
  1.1528 +      the length of the base is smaller than the length of the ruby text,
  1.1529 +      then the base is centered within the width of the ruby text.
  1.1530 +      <div class=figure>
  1.1531 +       <p><img
  1.1532 +        alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base"
  1.1533 +        class=example height=91 src="images/ra-c.gif" width=145><img
  1.1534 +        alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base"
  1.1535 +        class=example height=91 src="images/ra-c-rb.gif" width=145>
  1.1536  
  1.1537 -  <table class=propdef>
  1.1538 -   <tbody>
  1.1539 -    <tr>
  1.1540 -     <th>Name:
  1.1541 +       <p><b>Figure 4.2.4</b>: Center ruby alignment
  1.1542 +      </div>
  1.1543  
  1.1544 -     <td><dfn id=ruby-overhang>ruby-overhang</dfn>
  1.1545 +     <dt><strong>right</strong>
  1.1546  
  1.1547 -    <tr>
  1.1548 -     <th>Value:
  1.1549 +     <dd>The ruby text content is aligned with the end edge of the base.
  1.1550 +      <p class=issue><span class=issuehead>Issue: </span> The i18n WG feels
  1.1551 +       that end and right should not be synonymous, and proposed to drop
  1.1552 +       right (there is no left/right in overhang)? See <a
  1.1553 +       href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1554 +       thread</a>.
  1.1555  
  1.1556 -     <td>auto | start | end | none
  1.1557 +      <div class=figure>
  1.1558 +       <p><img
  1.1559 +        alt="Diagram of glyph layout in right aligned ruby when ruby text is shorter than base"
  1.1560 +        class=example height=91 src="images/ra-r.gif" width=145><img
  1.1561 +        alt="Diagram of glyph layout in right aligned ruby when ruby text is longer than base"
  1.1562 +        class=example height=91 src="images/ra-r-rb.gif" width=145>
  1.1563  
  1.1564 -    <tr>
  1.1565 -     <th>Initial:
  1.1566 +       <p><b>Figure 4.2.5</b>: End ruby alignment
  1.1567 +      </div>
  1.1568  
  1.1569 -     <td>none
  1.1570 +     <dt><strong>distribute-letter</strong>
  1.1571  
  1.1572 -    <tr>
  1.1573 -     <th>Applies to:
  1.1574 +     <dd>If the width of the ruby text is smaller than that of the base, then
  1.1575 +      the ruby text contents are evenly distributed across the width of the
  1.1576 +      base, with the first and last ruby text glyphs lining up with the
  1.1577 +      corresponding first and last base glyphs. If the width of the ruby text
  1.1578 +      is at least the width of the base, then the letters of the base are
  1.1579 +      evenly distributed across the width of the ruby text.
  1.1580 +      <div class=figure>
  1.1581 +       <p><img
  1.1582 +        alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base"
  1.1583 +        class=example height=91 src="images/ra-dl.gif" width=145><img
  1.1584 +        alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base"
  1.1585 +        class=example height=91 src="images/ra-dl-rb.gif" width=145>
  1.1586  
  1.1587 -     <td>the parent of elements with display: ruby-text
  1.1588 +       <p><b>Figure 4.2.6</b>: Distribute-letter ruby alignment
  1.1589 +      </div>
  1.1590  
  1.1591 -    <tr>
  1.1592 -     <th>Inherited:
  1.1593 +     <dt><strong>distribute-space</strong>
  1.1594  
  1.1595 -     <td>yes
  1.1596 +     <dd>If the width of the ruby text is smaller than that of the base, then
  1.1597 +      the ruby text contents are evenly distributed across the width of the
  1.1598 +      base, with a certain amount of white space preceding the first and
  1.1599 +      following the last character in the ruby text. That amount of white
  1.1600 +      space is normally equal to half the amount of inter-character space of
  1.1601 +      the ruby text. If the width of the ruby text is at least the width of
  1.1602 +      the base, then the same type of space distribution applies to the base.
  1.1603 +      In other words, if the base is shorter than the ruby text, the base is
  1.1604 +      distribute-space aligned. This type of alignment is described by <a
  1.1605 +      href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>.
  1.1606 +      <div class=figure>
  1.1607 +       <p><img
  1.1608 +        alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is shorter than base"
  1.1609 +        class=example height=91 src="images/ra-ds.gif" width=145><img
  1.1610 +        alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is longer than base"
  1.1611 +        class=example height=91 src="images/ra-ds-rb.gif" width=145>
  1.1612  
  1.1613 -    <tr>
  1.1614 -     <th>Percentages:
  1.1615 +       <p><b>Figure 4.2.7</b>: Distribute-space ruby alignment
  1.1616 +      </div>
  1.1617  
  1.1618 -     <td>N/A
  1.1619 +     <dt><strong>line-edge</strong>
  1.1620  
  1.1621 -    <tr>
  1.1622 -     <th>Media:
  1.1623 +     <dd>If the ruby text is not adjacent to a line edge, it is aligned as in
  1.1624 +      ‘<code class=property>auto</code>’. If it is adjacent to a line
  1.1625 +      edge, then it is still aligned as in auto, but the side of the ruby
  1.1626 +      text that touches the end of the line is lined up with the
  1.1627 +      corresponding edge of the base. This type of alignment is described by
  1.1628 +      <a href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>. This type
  1.1629 +      of alignment is relevant only to the scenario where the ruby text is
  1.1630 +      longer than the ruby base. In the other scenarios, this is just
  1.1631 +      ‘<code class=property>auto</code>’.
  1.1632 +      <div class=figure>
  1.1633 +       <p><img
  1.1634 +        alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base"
  1.1635 +        class=example height=109 src="images/ra-le-l.gif" width=146><img
  1.1636 +        alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base"
  1.1637 +        class=example height=110 src="images/ra-le-r.gif" width=146>
  1.1638  
  1.1639 -     <td>visual
  1.1640 +       <p><b>Figure 4.2.8</b>: Line edge ruby alignment
  1.1641 +      </div>
  1.1642 +    </dl>
  1.1643  
  1.1644 -    <tr>
  1.1645 -     <th>Computed value:
  1.1646 +    <p>For a complex ruby with spanning elements, one additional
  1.1647 +     consideration is required. If the spanning element spans multiple
  1.1648 +     ‘<code class=property>rows</code>’ (other rbc or rtc elements), and
  1.1649 +     the ruby alignment requires space distribution among the ‘<code
  1.1650 +     class=property>spanned</code>’ elements, a ratio must be determined
  1.1651 +     among the ‘<code class=property>columns</code>’ of spanned elements.
  1.1652 +     This ratio is computed by taking into consideration the widest element
  1.1653 +     within each column.
  1.1654  
  1.1655 -     <td>specified value (except for initial and inherit)
  1.1656 -  </table>
  1.1657 +    <p>In the context of this property, the ‘<code
  1.1658 +     class=property>left</code>’ and ‘<code
  1.1659 +     class=property>right</code>’ values are synonymous with the ‘<code
  1.1660 +     class=property>start</code>’ and ‘<code class=property>end</code>’
  1.1661 +     values respectively. I.e. their meaning is relative according to the
  1.1662 +     text layout flow. Most of the other CSS properties interpret ‘<code
  1.1663 +     class=property>left</code>’ and ‘<code
  1.1664 +     class=property>right</code>’ on an ‘<code
  1.1665 +     class=property>absolute</code>’ term. See Appendix A of the <a
  1.1666 +     href="#CSS3TEXT">CSS3 Text Module</a> for further details.
  1.1667  
  1.1668 -  <p>This property determines whether, and on which side, ruby text is
  1.1669 -   allowed to partially overhang any adjacent text in addition to its own
  1.1670 -   base, when the ruby text is wider than the ruby base. Note that ruby text
  1.1671 -   is never allowed to overhang glyphs belonging to another ruby base. <span
  1.1672 -   class=issue><span class=issuehead>Issue: </span> This rule must be broken
  1.1673 -   if we are to allow support for jukugo ruby.</span> Also the user agent is
  1.1674 -   free to assume a maximum amount by which ruby text may overhang adjacent
  1.1675 -   text. The user agent may use the <a href="#JIS4051"
  1.1676 -   rel=biblioentry>[JIS4051]<!--{{JIS4051}}--></a> recommendation of using
  1.1677 -   one ruby text character length as the maximum overhang length. Detailed
  1.1678 -   rules for how ruby text can overhang adjacent characters for Japanese are
  1.1679 -   described by <a href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>.
  1.1680 +    <h3 id=rubyover><span class=secno>3.3. </span> Ruby overhanging: the
  1.1681 +     ‘<a href="#ruby-overhang"><code
  1.1682 +     class=property>ruby-overhang</code></a>’ property</h3>
  1.1683  
  1.1684 -  <p>Possible values:
  1.1685 +    <table class=propdef>
  1.1686 +     <tbody>
  1.1687 +      <tr>
  1.1688 +       <th>Name:
  1.1689  
  1.1690 -  <dl>
  1.1691 -   <dt><strong>auto</strong>
  1.1692 +       <td><dfn id=ruby-overhang>ruby-overhang</dfn>
  1.1693  
  1.1694 -   <dd>The ruby text can overhang text adjacent to the base on either side.
  1.1695 -    <a href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> and <a
  1.1696 -    href="#JIS4051" rel=biblioentry>[JIS4051]<!--{{JIS4051}}--></a> specify
  1.1697 -    the categories of characters that ruby text can overhang. The user agent
  1.1698 -    is free to follow those recommendations or specify its own classes of
  1.1699 -    characters to overhang. This is the initial value.
  1.1700 -    <div class=figure>
  1.1701 -     <p><img alt="Diagram of glyph layout in overhanging ruby" class=example
  1.1702 -      height=91 src="images/ro-a.gif" width=177>
  1.1703 +      <tr>
  1.1704 +       <th>Value:
  1.1705  
  1.1706 -     <p><b>Figure 4.3.1</b>: Ruby overhanging adjacent text
  1.1707 -    </div>
  1.1708 +       <td>auto | start | end | none
  1.1709  
  1.1710 -   <dt><strong>start</strong>
  1.1711 +      <tr>
  1.1712 +       <th>Initial:
  1.1713  
  1.1714 -   <dd>The ruby text can only overhang the text that precedes it. That means,
  1.1715 -    for example, that ruby cannot overhang text that is to the right of it in
  1.1716 -    horizontal LTR layout, and it cannot overhang text that is below it in
  1.1717 -    vertical-ideographic layout.
  1.1718 -    <div class=figure>
  1.1719 -     <p><img
  1.1720 -      alt="Diagram of glyph layout when ruby overhangs the preceding glyphs only"
  1.1721 -      class=example height=91 src="images/ro-s.gif" width=199>
  1.1722 +       <td>none
  1.1723  
  1.1724 -     <p><b>Figure 4.3.2</b>: Ruby overhanging preceding text only
  1.1725 -    </div>
  1.1726 +      <tr>
  1.1727 +       <th>Applies to:
  1.1728  
  1.1729 -   <dt><strong>end</strong>
  1.1730 +       <td>the parent of elements with display: ruby-text
  1.1731  
  1.1732 -   <dd>The ruby text can only overhang the text that follows it. That means,
  1.1733 -    for example, that ruby cannot overhang text that is to the left of it in
  1.1734 -    horizontal LTR layout, and it cannot overhang text that is above it in
  1.1735 -    vertical-ideographic layout.
  1.1736 -    <div class=figure>
  1.1737 -     <p><img
  1.1738 -      alt="Diagram of glyph layout when ruby overhangs the following characters only"
  1.1739 -      class=example height=91 src="images/ro-e.gif" width=198>
  1.1740 +      <tr>
  1.1741 +       <th>Inherited:
  1.1742  
  1.1743 -     <p><b>Figure 4.3.3</b>: Ruby overhanging following text only
  1.1744 -    </div>
  1.1745 +       <td>yes
  1.1746  
  1.1747 -   <dt><strong>none</strong>
  1.1748 +      <tr>
  1.1749 +       <th>Percentages:
  1.1750  
  1.1751 -   <dd>The ruby text cannot overhang any text adjacent to its base, only its
  1.1752 -    own base.
  1.1753 -    <div class=figure>
  1.1754 -     <p><img alt="Diagram of glyph layout in non-overhanging ruby"
  1.1755 -      class=example height=91 src="images/ro-n.gif" width=220>
  1.1756 +       <td>N/A
  1.1757  
  1.1758 -     <p><b>Figure 4.3.4</b>: Ruby not allowed to overhang adjacent text
  1.1759 -    </div>
  1.1760 -  </dl>
  1.1761 +      <tr>
  1.1762 +       <th>Media:
  1.1763  
  1.1764 -  <h3 id=rubyspan><span class=secno>3.4. </span> Ruby annotation spanning:
  1.1765 -   the ‘<a href="#ruby-span"><code class=property>ruby-span</code></a>’
  1.1766 -   property</h3>
  1.1767 +       <td>visual
  1.1768  
  1.1769 -  <table class=propdef>
  1.1770 -   <tbody>
  1.1771 -    <tr>
  1.1772 -     <th>Name:
  1.1773 +      <tr>
  1.1774 +       <th>Computed value:
  1.1775  
  1.1776 -     <td><dfn id=ruby-span>ruby-span</dfn>
  1.1777 +       <td>specified value (except for initial and inherit)
  1.1778 +    </table>
  1.1779  
  1.1780 -    <tr>
  1.1781 -     <th>Value:
  1.1782 +    <p>This property determines whether, and on which side, ruby text is
  1.1783 +     allowed to partially overhang any adjacent text in addition to its own
  1.1784 +     base, when the ruby text is wider than the ruby base. Note that ruby
  1.1785 +     text is never allowed to overhang glyphs belonging to another ruby base.
  1.1786 +     <span class=issue><span class=issuehead>Issue: </span> This rule must
  1.1787 +     be broken if we are to allow support for jukugo ruby.</span> Also the
  1.1788 +     user agent is free to assume a maximum amount by which ruby text may
  1.1789 +     overhang adjacent text. The user agent may use the <a href="#JIS4051"
  1.1790 +     rel=biblioentry>[JIS4051]<!--{{JIS4051}}--></a> recommendation of using
  1.1791 +     one ruby text character length as the maximum overhang length. Detailed
  1.1792 +     rules for how ruby text can overhang adjacent characters for Japanese
  1.1793 +     are described by <a href="#JLREQ"
  1.1794 +     rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>.
  1.1795  
  1.1796 -     <td>attr(x) | none
  1.1797 +    <p>Possible values:
  1.1798  
  1.1799 -    <tr>
  1.1800 -     <th>Initial:
  1.1801 +    <dl>
  1.1802 +     <dt><strong>auto</strong>
  1.1803  
  1.1804 -     <td>none
  1.1805 +     <dd>The ruby text can overhang text adjacent to the base on either side.
  1.1806 +      <a href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> and <a
  1.1807 +      href="#JIS4051" rel=biblioentry>[JIS4051]<!--{{JIS4051}}--></a> specify
  1.1808 +      the categories of characters that ruby text can overhang. The user
  1.1809 +      agent is free to follow those recommendations or specify its own
  1.1810 +      classes of characters to overhang. This is the initial value.
  1.1811 +      <div class=figure>
  1.1812 +       <p><img alt="Diagram of glyph layout in overhanging ruby"
  1.1813 +        class=example height=91 src="images/ro-a.gif" width=177>
  1.1814  
  1.1815 -    <tr>
  1.1816 -     <th>Applies to:
  1.1817 +       <p><b>Figure 4.3.1</b>: Ruby overhanging adjacent text
  1.1818 +      </div>
  1.1819  
  1.1820 -     <td>elements with display: ruby-text
  1.1821 +     <dt><strong>start</strong>
  1.1822  
  1.1823 -    <tr>
  1.1824 -     <th>Inherited:
  1.1825 +     <dd>The ruby text can only overhang the text that precedes it. That
  1.1826 +      means, for example, that ruby cannot overhang text that is to the right
  1.1827 +      of it in horizontal LTR layout, and it cannot overhang text that is
  1.1828 +      below it in vertical-ideographic layout.
  1.1829 +      <div class=figure>
  1.1830 +       <p><img
  1.1831 +        alt="Diagram of glyph layout when ruby overhangs the preceding glyphs only"
  1.1832 +        class=example height=91 src="images/ro-s.gif" width=199>
  1.1833  
  1.1834 -     <td>no
  1.1835 +       <p><b>Figure 4.3.2</b>: Ruby overhanging preceding text only
  1.1836 +      </div>
  1.1837  
  1.1838 -    <tr>
  1.1839 -     <th>Percentages:
  1.1840 +     <dt><strong>end</strong>
  1.1841  
  1.1842 -     <td>N/A
  1.1843 +     <dd>The ruby text can only overhang the text that follows it. That
  1.1844 +      means, for example, that ruby cannot overhang text that is to the left
  1.1845 +      of it in horizontal LTR layout, and it cannot overhang text that is
  1.1846 +      above it in vertical-ideographic layout.
  1.1847 +      <div class=figure>
  1.1848 +       <p><img
  1.1849 +        alt="Diagram of glyph layout when ruby overhangs the following characters only"
  1.1850 +        class=example height=91 src="images/ro-e.gif" width=198>
  1.1851  
  1.1852 -    <tr>
  1.1853 -     <th>Media:
  1.1854 +       <p><b>Figure 4.3.3</b>: Ruby overhanging following text only
  1.1855 +      </div>
  1.1856  
  1.1857 -     <td>visual
  1.1858 +     <dt><strong>none</strong>
  1.1859  
  1.1860 -    <tr>
  1.1861 -     <th>Computed value:
  1.1862 +     <dd>The ruby text cannot overhang any text adjacent to its base, only
  1.1863 +      its own base.
  1.1864 +      <div class=figure>
  1.1865 +       <p><img alt="Diagram of glyph layout in non-overhanging ruby"
  1.1866 +        class=example height=91 src="images/ro-n.gif" width=220>
  1.1867  
  1.1868 -     <td>&lt;number&gt;
  1.1869 -  </table>
  1.1870 +       <p><b>Figure 4.3.4</b>: Ruby not allowed to overhang adjacent text
  1.1871 +      </div>
  1.1872 +    </dl>
  1.1873  
  1.1874 -  <p>This property controls the spanning behavior of annotation elements.
  1.1875 +    <h3 id=rubyspan><span class=secno>3.4. </span> Ruby annotation spanning:
  1.1876 +     the ‘<a href="#ruby-span"><code class=property>ruby-span</code></a>’
  1.1877 +     property</h3>
  1.1878  
  1.1879 -  <p class=note><span class=note-label>Note:</span> A XHTML user agent may
  1.1880 -   also use the <samp>rbspan</samp> attribute to get the same effect.
  1.1881 +    <table class=propdef>
  1.1882 +     <tbody>
  1.1883 +      <tr>
  1.1884 +       <th>Name:
  1.1885  
  1.1886 -  <p>Possible values:
  1.1887 +       <td><dfn id=ruby-span>ruby-span</dfn>
  1.1888  
  1.1889 -  <dl>
  1.1890 -   <dt><strong>attr(x)</strong>
  1.1891 +      <tr>
  1.1892 +       <th>Value:
  1.1893  
  1.1894 -   <dd>The value of attribute ‘<code class=property>x</code>’ as a string
  1.1895 -    value. The string value is evaluated as a &lt;number&gt; to determine the
  1.1896 -    number of ruby base elements to be spanned by the annotation element. If
  1.1897 -    the &lt;number&gt; is '0', it is replaced by '1'.The &lt;number&gt; is
  1.1898 -    the computed value.
  1.1899 +       <td>attr(x) | none
  1.1900  
  1.1901 -   <dt>none
  1.1902 +      <tr>
  1.1903 +       <th>Initial:
  1.1904  
  1.1905 -   <dd>No spanning. The computed value is '1'.
  1.1906 -  </dl>
  1.1907 +       <td>none
  1.1908  
  1.1909 -  <p>The following example shows an XML example using the ‘<code
  1.1910 -   class=property>display</code>’ property values associated with the
  1.1911 -   ‘<code class=css>ruby structure and the </code>’ruby-span' property
  1.1912 +      <tr>
  1.1913 +       <th>Applies to:
  1.1914  
  1.1915 -  <pre class=xml>myruby       { display: ruby; }
  1.1916 +       <td>elements with display: ruby-text
  1.1917 +
  1.1918 +      <tr>
  1.1919 +       <th>Inherited:
  1.1920 +
  1.1921 +       <td>no
  1.1922 +
  1.1923 +      <tr>
  1.1924 +       <th>Percentages:
  1.1925 +
  1.1926 +       <td>N/A
  1.1927 +
  1.1928 +      <tr>
  1.1929 +       <th>Media:
  1.1930 +
  1.1931 +       <td>visual
  1.1932 +
  1.1933 +      <tr>
  1.1934 +       <th>Computed value:
  1.1935 +
  1.1936 +       <td>&lt;number&gt;
  1.1937 +    </table>
  1.1938 +
  1.1939 +    <p>This property controls the spanning behavior of annotation elements.
  1.1940 +
  1.1941 +    <p class=note><span class=note-label>Note:</span> A XHTML user agent may
  1.1942 +     also use the <samp>rbspan</samp> attribute to get the same effect.
  1.1943 +
  1.1944 +    <p>Possible values:
  1.1945 +
  1.1946 +    <dl>
  1.1947 +     <dt><strong>attr(x)</strong>
  1.1948 +
  1.1949 +     <dd>The value of attribute ‘<code class=property>x</code>’ as a
  1.1950 +      string value. The string value is evaluated as a &lt;number&gt; to
  1.1951 +      determine the number of ruby base elements to be spanned by the
  1.1952 +      annotation element. If the &lt;number&gt; is '0', it is replaced by
  1.1953 +      '1'.The &lt;number&gt; is the computed value.
  1.1954 +
  1.1955 +     <dt>none
  1.1956 +
  1.1957 +     <dd>No spanning. The computed value is '1'.
  1.1958 +    </dl>
  1.1959 +
  1.1960 +    <p>The following example shows an XML example using the ‘<code
  1.1961 +     class=property>display</code>’ property values associated with the
  1.1962 +     ‘<code class=css>ruby structure and the </code>’ruby-span' property
  1.1963 +
  1.1964 +    <pre class=xml>myruby       { display: ruby; }
  1.1965  myrbc        { display: ruby-base-container; }
  1.1966  myrb         { display: ruby-base; }
  1.1967  myrtc.before { display: ruby-text-container; ruby-position: before}
  1.1968 @@ -1329,434 +1388,442 @@
  1.1969    &lt;/myrtc&gt;
  1.1970  &lt;/myruby&gt;</pre>
  1.1971  
  1.1972 -  <p class=issue><span class=issuehead>Issue: </span> The i18n WG has
  1.1973 -   requested the addition of a sample user agent default style sheet, as
  1.1974 -   promised by Ruby Annotation section 3.4. See <a
  1.1975 -   href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20Default+stylesheet&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1976 -   thread</a>.
  1.1977 +    <p class=issue><span class=issuehead>Issue: </span> The i18n WG has
  1.1978 +     requested the addition of a sample user agent default style sheet, as
  1.1979 +     promised by Ruby Annotation section 3.4. See <a
  1.1980 +     href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20Default+stylesheet&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this
  1.1981 +     thread</a>.
  1.1982  
  1.1983 -  <h2 id=profiles><span class=secno>4. </span> Profiles</h2>
  1.1984 +    <h2 id=profiles><span class=secno>4. </span> Profiles</h2>
  1.1985  
  1.1986 -  <p>There are two modules defined by this module:
  1.1987 +    <p>There are two modules defined by this module:
  1.1988  
  1.1989 -  <p>CSS3 Simple Ruby model
  1.1990 +    <p>CSS3 Simple Ruby model
  1.1991  
  1.1992 -  <p>CSS3 Complex Ruby model.
  1.1993 +    <p>CSS3 Complex Ruby model.
  1.1994  
  1.1995 -  <p>They both contain all the properties specified by this CSS chapter, i.e.
  1.1996 -   <a href="#rubyalign">‘<code class=property>ruby-align</code>’</a>, <a
  1.1997 -   href="#rubyover">‘<code class=property>ruby-overhang</code>’</a>, <a
  1.1998 -   href="#rubypos">‘<code class=property>ruby-position</code>’</a> and <a
  1.1999 -   href="#rubyspan">‘<code class=property>ruby-span</code>’</a>. They
  1.2000 -   differ by the required ‘<code class=property>display</code>’ property
  1.2001 -   values. The Simple Ruby model requires the values: ‘<code
  1.2002 -   class=property>ruby</code>’, ‘<code class=property>ruby-base</code>’
  1.2003 -   and ‘<code class=property>ruby-text</code>’. The Complex Ruby model
  1.2004 -   requires in addition the values: ‘<code
  1.2005 -   class=property>ruby-base-container</code>’ and ‘<code
  1.2006 -   class=property>ruby-text-container</code>’.
  1.2007 +    <p>They both contain all the properties specified by this CSS chapter,
  1.2008 +     i.e. <a href="#rubyalign">‘<code
  1.2009 +     class=property>ruby-align</code>’</a>, <a href="#rubyover">‘<code
  1.2010 +     class=property>ruby-overhang</code>’</a>, <a href="#rubypos">‘<code
  1.2011 +     class=property>ruby-position</code>’</a> and <a
  1.2012 +     href="#rubyspan">‘<code class=property>ruby-span</code>’</a>. They
  1.2013 +     differ by the required ‘<code class=property>display</code>’
  1.2014 +     property values. The Simple Ruby model requires the values: ‘<a
  1.2015 +     href="#ruby"><code class=property>ruby</code></a>’, ‘<code
  1.2016 +     class=property>ruby-base</code>’ and ‘<code
  1.2017 +     class=property>ruby-text</code>’. The Complex Ruby model requires in
  1.2018 +     addition the values: ‘<code
  1.2019 +     class=property>ruby-base-container</code>’ and ‘<code
  1.2020 +     class=property>ruby-text-container</code>’.
  1.2021  
  1.2022 -  <h2 id=glossary><span class=secno>5. </span> Glossary</h2>
  1.2023 +    <h2 id=glossary><span class=secno>5. </span> Glossary</h2>
  1.2024  
  1.2025 -  <dl>
  1.2026 -   <dt><a id=g-bopomofo><strong><span lang=zh>Bopomofo</span></strong></a>
  1.2027 +    <dl>
  1.2028 +     <dt><a id=g-bopomofo><strong><span lang=zh>Bopomofo</span></strong></a>
  1.2029  
  1.2030 -   <dd>37 characters and 4 tone markings used as phonetics in Chinese,
  1.2031 -    especially standard Mandarin.
  1.2032 +     <dd>37 characters and 4 tone markings used as phonetics in Chinese,
  1.2033 +      especially standard Mandarin.
  1.2034  
  1.2035 -   <dt><a id=g-hanja><strong><span lang=ko>Hanja</span></strong></a>
  1.2036 +     <dt><a id=g-hanja><strong><span lang=ko>Hanja</span></strong></a>
  1.2037  
  1.2038 -   <dd>Subset of the Korean writing system that utilizes ideographic
  1.2039 -    characters borrowed or adapted from the Chinese writing system. Also see
  1.2040 -    <a href="#g-kanji"><span lang=ja>Kanji</span></a>.
  1.2041 +     <dd>Subset of the Korean writing system that utilizes ideographic
  1.2042 +      characters borrowed or adapted from the Chinese writing system. Also
  1.2043 +      see <a href="#g-kanji"><span lang=ja>Kanji</span></a>.
  1.2044  
  1.2045 -   <dt><a id=g-hiragana><strong><span lang=ja>Hiragana</span></strong></a>
  1.2046 +     <dt><a id=g-hiragana><strong><span lang=ja>Hiragana</span></strong></a>
  1.2047  
  1.2048 -   <dd>Japanese syllabic script, or character of that script. Rounded and
  1.2049 -    cursive in appearance. Subset of the Japanese writing system, used
  1.2050 -    together with kanji and katakana. In recent times, mostly used to write
  1.2051 -    Japanese words when kanji are not available or appropriate, and word
  1.2052 -    endings and particles. Also see <a href="#g-katakana"><span
  1.2053 -    lang=ja>Katakana</span></a>.
  1.2054 +     <dd>Japanese syllabic script, or character of that script. Rounded and
  1.2055 +      cursive in appearance. Subset of the Japanese writing system, used
  1.2056 +      together with kanji and katakana. In recent times, mostly used to write
  1.2057 +      Japanese words when kanji are not available or appropriate, and word
  1.2058 +      endings and particles. Also see <a href="#g-katakana"><span
  1.2059 +      lang=ja>Katakana</span></a>.
  1.2060  
  1.2061 -   <dt><a id=g-ideogram><strong>Ideograph</strong></a>
  1.2062 +     <dt><a id=g-ideogram><strong>Ideograph</strong></a>
  1.2063  
  1.2064 -   <dd>A character that is used to represent an idea, word, or word
  1.2065 -    component, in contrast to a character from an alphabetic or syllabic
  1.2066 -    script. The most well-known ideographic script is used (with some
  1.2067 -    variation) in East Asia (China, Japan, Korea,...).
  1.2068 +     <dd>A character that is used to represent an idea, word, or word
  1.2069 +      component, in contrast to a character from an alphabetic or syllabic
  1.2070 +      script. The most well-known ideographic script is used (with some
  1.2071 +      variation) in East Asia (China, Japan, Korea,...).
  1.2072  
  1.2073 -   <dt><a id=g-kana><strong><span lang=ja>Kana</span></strong></a>
  1.2074 +     <dt><a id=g-kana><strong><span lang=ja>Kana</span></strong></a>
  1.2075  
  1.2076 -   <dd>Collective term for hiragana and katakana.
  1.2077 +     <dd>Collective term for hiragana and katakana.
  1.2078  
  1.2079 -   <dt><a id=g-kanji><strong>Kanji</strong></a>
  1.2080 +     <dt><a id=g-kanji><strong>Kanji</strong></a>
  1.2081  
  1.2082 -   <dd>Japanese term for ideographs; ideographs used in Japanese. Subset of
  1.2083 -    the Japanese writing system, used together with hiragana and katakana.
  1.2084 -    Also see <a href="#g-hanja"><span lang=ko>Hanja</span></a>.
  1.2085 +     <dd>Japanese term for ideographs; ideographs used in Japanese. Subset of
  1.2086 +      the Japanese writing system, used together with hiragana and katakana.
  1.2087 +      Also see <a href="#g-hanja"><span lang=ko>Hanja</span></a>.
  1.2088  
  1.2089 -   <dt><a id=g-katakana><strong><span lang=ja>Katakana</span></strong></a>
  1.2090 +     <dt><a id=g-katakana><strong><span lang=ja>Katakana</span></strong></a>
  1.2091  
  1.2092 -   <dd>Japanese syllabic script, or character of that script. Angular in
  1.2093 -    appearance. Subset of the Japanese writing system,  used together with
  1.2094 -    kanji and hiragana. In recent times, mainly used to write foreign words.
  1.2095 -    Also see <a href="#g-hiragana"><span lang=ja>Hiragana</span></a>.
  1.2096 +     <dd>Japanese syllabic script, or character of that script. Angular in
  1.2097 +      appearance. Subset of the Japanese writing system,  used together with
  1.2098 +      kanji and hiragana. In recent times, mainly used to write foreign
  1.2099 +      words. Also see <a href="#g-hiragana"><span
  1.2100 +      lang=ja>Hiragana</span></a>.
  1.2101  
  1.2102 -   <dt><a id=g-monoruby name=g-monoruby><strong>Mono-ruby</strong></a>
  1.2103 +     <dt><a id=g-monoruby name=g-monoruby><strong>Mono-ruby</strong></a>
  1.2104  
  1.2105 -   <dd>In Japanese typography: Ruby associated with a single character of the
  1.2106 -    base text.
  1.2107 +     <dd>In Japanese typography: Ruby associated with a single character of
  1.2108 +      the base text.
  1.2109  
  1.2110 -   <dt><a id=g-ruby><strong>Ruby</strong></a>
  1.2111 +     <dt><a id=g-ruby><strong>Ruby</strong></a>
  1.2112  
  1.2113 -   <dd>A run of text that appears in the vicinity of another run of text and
  1.2114 -    serves as an annotation or a pronunciation guide for that text.
  1.2115 +     <dd>A run of text that appears in the vicinity of another run of text
  1.2116 +      and serves as an annotation or a pronunciation guide for that text.
  1.2117 +    </dl>
  1.2118 +
  1.2119 +    <h2 id=conformance><span class=secno>6. </span> Conformance</h2>
  1.2120 +
  1.2121 +    <h3 id=conventions><span class=secno>6.1. </span> Document conventions</h3>
  1.2122 +
  1.2123 +    <p>Conformance requirements are expressed with a combination of
  1.2124 +     descriptive assertions and RFC 2119 terminology. The key words
  1.2125 +     “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
  1.2126 +     NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”,
  1.2127 +     and “OPTIONAL” in the normative parts of this document are to be
  1.2128 +     interpreted as described in RFC 2119. However, for readability, these
  1.2129 +     words do not appear in all uppercase letters in this specification.
  1.2130 +
  1.2131 +    <p>All of the text of this specification is normative except sections
  1.2132 +     explicitly marked as non-normative, examples, and notes. <a
  1.2133 +     href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  1.2134 +
  1.2135 +    <p>Examples in this specification are introduced with the words “for
  1.2136 +     example” or are set apart from the normative text with
  1.2137 +     <code>class="example"</code>, like this:
  1.2138 +
  1.2139 +    <div class=example>
  1.2140 +     <p>This is an example of an informative example.
  1.2141 +    </div>
  1.2142 +
  1.2143 +    <p>Informative notes begin with the word “Note” and are set apart
  1.2144 +     from the normative text with <code>class="note"</code>, like this:
  1.2145 +
  1.2146 +    <p class=note>Note, this is an informative note.
  1.2147 +
  1.2148 +    <h3 id=conformance-classes><span class=secno>6.2. </span> Conformance
  1.2149 +     classes</h3>
  1.2150 +
  1.2151 +    <p>Conformance to CSS Ruby Module is defined for three conformance
  1.2152 +     classes:
  1.2153 +
  1.2154 +    <dl>
  1.2155 +     <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  1.2156 +      sheet</dfn>
  1.2157 +
  1.2158 +     <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  1.2159 +      style sheet</a>.
  1.2160 +
  1.2161 +     <dt><dfn id=renderer>renderer</dfn>
  1.2162 +
  1.2163 +     <dd>A <a
  1.2164 +      href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that
  1.2165 +      interprets the semantics of a style sheet and renders documents that
  1.2166 +      use them.
  1.2167 +
  1.2168 +     <dt><dfn id=authoring-tool>authoring tool</dfn>
  1.2169 +
  1.2170 +     <dd>A <a
  1.2171 +      href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that
  1.2172 +      writes a style sheet.
  1.2173 +    </dl>
  1.2174 +
  1.2175 +    <p>A style sheet is conformant to CSS Ruby Module if all of its
  1.2176 +     statements that use syntax defined in this module are valid according to
  1.2177 +     the generic CSS grammar and the individual grammars of each feature
  1.2178 +     defined in this module.
  1.2179 +
  1.2180 +    <p>A renderer is conformant to CSS Ruby Module if, in addition to
  1.2181 +     interpreting the style sheet as defined by the appropriate
  1.2182 +     specifications, it supports all the features defined by CSS Ruby Module
  1.2183 +     by parsing them correctly and rendering the document accordingly.
  1.2184 +     However, the inability of a UA to correctly render a document due to
  1.2185 +     limitations of the device does not make the UA non-conformant. (For
  1.2186 +     example, a UA is not required to render color on a monochrome monitor.)
  1.2187 +
  1.2188 +    <p>An authoring tool is conformant to CSS Ruby Module if it writes style
  1.2189 +     sheets that are syntactically correct according to the generic CSS
  1.2190 +     grammar and the individual grammars of each feature in this module, and
  1.2191 +     meet all other conformance requirements of style sheets as described in
  1.2192 +     this module.
  1.2193 +
  1.2194 +    <h3 id=partial><span class=secno>6.3. </span> Partial implementations</h3>
  1.2195 +
  1.2196 +    <p>So that authors can exploit the forward-compatible parsing rules to
  1.2197 +     assign fallback values, CSS renderers <strong>must</strong> treat as
  1.2198 +     invalid (and <a
  1.2199 +     href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  1.2200 +     appropriate</a>) any at-rules, properties, property values, keywords,
  1.2201 +     and other syntactic constructs for which they have no usable level of
  1.2202 +     support. In particular, user agents <strong>must not</strong>
  1.2203 +     selectively ignore unsupported component values and honor supported
  1.2204 +     values in a single multi-value property declaration: if any value is
  1.2205 +     considered invalid (as unsupported values must be), CSS requires that
  1.2206 +     the entire declaration be ignored.
  1.2207 +
  1.2208 +    <h3 id=experimental><span class=secno>6.4. </span> Experimental
  1.2209 +     implementations</h3>
  1.2210 +
  1.2211 +    <p>To avoid clashes with future CSS features, the CSS2.1 specification
  1.2212 +     reserves a <a
  1.2213 +     href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  1.2214 +     syntax</a> for proprietary and experimental extensions to CSS.
  1.2215 +
  1.2216 +    <p>Prior to a specification reaching the Candidate Recommendation stage
  1.2217 +     in the W3C process, all implementations of a CSS feature are considered
  1.2218 +     experimental. The CSS Working Group recommends that implementations use
  1.2219 +     a vendor-prefixed syntax for such features, including those in W3C
  1.2220 +     Working Drafts. This avoids incompatibilities with future changes in the
  1.2221 +     draft.
  1.2222 +
  1.2223 +    <h3 id=testing><span class=secno>6.5. </span> Non-experimental
  1.2224 +     implementations</h3>
  1.2225 +
  1.2226 +    <p>Once a specification reaches the Candidate Recommendation stage,
  1.2227 +     non-experimental implementations are possible, and implementors should
  1.2228 +     release an unprefixed implementation of any CR-level feature they can
  1.2229 +     demonstrate to be correctly implemented according to spec.
  1.2230 +
  1.2231 +    <p>To establish and maintain the interoperability of CSS across
  1.2232 +     implementations, the CSS Working Group requests that non-experimental
  1.2233 +     CSS renderers submit an implementation report (and, if necessary, the
  1.2234 +     testcases used for that implementation report) to the W3C before
  1.2235 +     releasing an unprefixed implementation of any CSS features. Testcases
  1.2236 +     submitted to W3C are subject to review and correction by the CSS Working
  1.2237 +     Group.
  1.2238 +
  1.2239 +    <p>Further information on submitting testcases and implementation reports
  1.2240 +     can be found from on the CSS Working Group's website at <a
  1.2241 +     href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  1.2242 +     Questions should be directed to the <a
  1.2243 +     href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  1.2244 +     mailing list.
  1.2245 +
  1.2246 +    <h2 class=no-num id=acknowledgments> Acknowledgments</h2>
  1.2247 +
  1.2248 +    <p>This specification would not have been possible without the help from:
  1.2249 +
  1.2250 +    <p>Stephen Deach, Martin Dürst,  Hideki Hiura(<span lang=ja>樋浦
  1.2251 +     秀樹</span>), Masayasu Ishikawa(<span lang=ja>石川 雅康</span>),
  1.2252 +     Chris Pratley, Takao Suzuki(<span lang=ja>鈴木 孝雄</span>), Frank
  1.2253 +     Yung-Fong Tang, Chris Thrasher, Masafumi Yabe<span lang=ja>家辺
  1.2254 +     勝文</span>), Steve Zilles.
  1.2255 +
  1.2256 +    <h2 class=no-num id=references> References</h2>
  1.2257 +
  1.2258 +    <h3 class=no-num id=normative-references> Normative references</h3>
  1.2259 +    <!--begin-normative--> <!-- Sorted by label -->
  1.2260 +    <dl class=bibliography>
  1.2261 +     <dd
  1.2262 +      style="display: none"><!-- keeps the doc valid if the DL is empty -->
  1.2263 +      <!---->
  1.2264 +
  1.2265 +     <dt id=CSS21>[CSS21]
  1.2266 +
  1.2267 +     <dd>Bert Bos; et al. <a
  1.2268 +      href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading
  1.2269 +      Style Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7
  1.2270 +      June 2011. W3C Recommendation. URL: <a
  1.2271 +      href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  1.2272 +     </dd>
  1.2273 +     <!---->
  1.2274 +
  1.2275 +     <dt id=RFC2119>[RFC2119]
  1.2276 +
  1.2277 +     <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  1.2278 +      words for use in RFCs to Indicate Requirement Levels.</cite></a>
  1.2279 +      Internet RFC 2119. URL: <a
  1.2280 +      href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  1.2281 +     </dd>
  1.2282 +     <!---->
  1.2283 +    </dl>
  1.2284 +    <!--end-normative-->
  1.2285 +    <h3 class=no-num id=other-references> Other references</h3>
  1.2286 +    <!--begin-informative--> <!-- Sorted by label -->
  1.2287 +    <dl class=bibliography>
  1.2288 +     <dd
  1.2289 +      style="display: none"><!-- keeps the doc valid if the DL is empty -->
  1.2290 +      <!---->
  1.2291 +
  1.2292 +     <dt id=CSS3VAL>[CSS3VAL]
  1.2293 +
  1.2294 +     <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  1.2295 +      href="http://www.w3.org/TR/2013/CR-css3-values-20130404/"><cite>CSS
  1.2296 +      Values and Units Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  1.2297 +      Recommendation. (Work in progress.) URL: <a
  1.2298 +      href="http://www.w3.org/TR/2013/CR-css3-values-20130404/">http://www.w3.org/TR/2013/CR-css3-values-20130404/</a>
  1.2299 +     </dd>
  1.2300 +     <!---->
  1.2301 +
  1.2302 +     <dt id=JIS4051>[JIS4051]
  1.2303 +
  1.2304 +     <dd><cite>Formatting rules for Japanese documents
  1.2305 +      (『日本語文書の組版方法』).</cite> Japanese Standards
  1.2306 +      Association. 2004. JIS X 4051:2004. In Japanese</dd>
  1.2307 +     <!---->
  1.2308 +
  1.2309 +     <dt id=JLREQ>[JLREQ]
  1.2310 +
  1.2311 +     <dd>Yasuhiro Anan; et al. <a
  1.2312 +      href="http://www.w3.org/TR/2012/NOTE-jlreq-20120403/"><cite>Requirements
  1.2313 +      for Japanese Text Layout.</cite></a> 3 April 2012. W3C Working Group
  1.2314 +      Note. URL: <a
  1.2315 +      href="http://www.w3.org/TR/2012/NOTE-jlreq-20120403/">http://www.w3.org/TR/2012/NOTE-jlreq-20120403/</a>
  1.2316 +     </dd>
  1.2317 +     <!---->
  1.2318 +
  1.2319 +     <dt id=RUBY>[RUBY]
  1.2320 +
  1.2321 +     <dd>Masayasu Ishikawa; et al. <a
  1.2322 +      href="http://www.w3.org/TR/2001/REC-ruby-20010531"><cite>Ruby
  1.2323 +      Annotation.</cite></a> 31 May 2001. W3C Recommendation. URL: <a
  1.2324 +      href="http://www.w3.org/TR/2001/REC-ruby-20010531">http://www.w3.org/TR/2001/REC-ruby-20010531</a>
  1.2325 +     </dd>
  1.2326 +     <!---->
  1.2327 +    </dl>
  1.2328 +    <!--end-informative-->
  1.2329 +    <h2 class=no-num id=index> Index</h2>
  1.2330 +    <!--begin-index-->
  1.2331 +    <ul class=indexlist>
  1.2332 +     <li>authoring tool, <a href="#authoring-tool"
  1.2333 +      title="section 6.2."><strong>6.2.</strong></a>
  1.2334 +
  1.2335 +     <li>renderer, <a href="#renderer"
  1.2336 +      title="section 6.2."><strong>6.2.</strong></a>
  1.2337 +
  1.2338 +     <li>Ruby, <a href="#ruby" title="section 1.4."><strong>1.4.</strong></a>
  1.2339 +
  1.2340 +     <li>ruby-align, <a href="#ruby-align"
  1.2341 +      title="section 3.2."><strong>3.2.</strong></a>
  1.2342 +
  1.2343 +     <li>ruby annotation, <a href="#ruby-annotation"
  1.2344 +      title="section 2."><strong>2.</strong></a>
  1.2345 +
  1.2346 +     <li>ruby annotation box, <a href="#ruby-annotation-box"
  1.2347 +      title="section 2.1."><strong>2.1.</strong></a>
  1.2348 +
  1.2349 +     <li>ruby annotation container box, <a
  1.2350 +      href="#ruby-annotation-container-box"
  1.2351 +      title="section 2.1."><strong>2.1.</strong></a>
  1.2352 +
  1.2353 +     <li>ruby base, <a href="#ruby-base"
  1.2354 +      title="section 2."><strong>2.</strong></a>
  1.2355 +
  1.2356 +     <li>ruby base box, <a href="#ruby-base-box"
  1.2357 +      title="section 2.1."><strong>2.1.</strong></a>
  1.2358 +
  1.2359 +     <li>ruby base container box, <a href="#ruby-base-container-box"
  1.2360 +      title="section 2.1."><strong>2.1.</strong></a>
  1.2361 +
  1.2362 +     <li>ruby container box, <a href="#ruby-container-box"
  1.2363 +      title="section 2.1."><strong>2.1.</strong></a>
  1.2364 +
  1.2365 +     <li>ruby-overhang, <a href="#ruby-overhang"
  1.2366 +      title="section 3.3."><strong>3.3.</strong></a>
  1.2367 +
  1.2368 +     <li>ruby-position, <a href="#ruby-position"
  1.2369 +      title="section 3.1."><strong>3.1.</strong></a>
  1.2370 +
  1.2371 +     <li>ruby segments, <a href="#ruby-segments"
  1.2372 +      title="section 2."><strong>2.</strong></a>
  1.2373 +
  1.2374 +     <li>ruby-span, <a href="#ruby-span"
  1.2375 +      title="section 3.4."><strong>3.4.</strong></a>
  1.2376 +
  1.2377 +     <li>style sheet
  1.2378 +      <ul>
  1.2379 +       <li>as conformance class, <a href="#style-sheet"
  1.2380 +        title="section 6.2."><strong>6.2.</strong></a>
  1.2381 +      </ul>
  1.2382 +    </ul>
  1.2383 +    <!--end-index-->
  1.2384 +    <h2 class=no-num id=property-index> Property index</h2>
  1.2385 +    <!--begin-properties-->
  1.2386 +    <table class=proptable>
  1.2387 +     <thead>
  1.2388 +      <tr>
  1.2389 +       <th>Property
  1.2390 +
  1.2391 +       <th>Values
  1.2392 +
  1.2393 +       <th>Initial
  1.2394 +
  1.2395 +       <th>Applies to
  1.2396 +
  1.2397 +       <th>Inh.
  1.2398 +
  1.2399 +       <th>Percentages
  1.2400 +
  1.2401 +       <th>Media
  1.2402 +
  1.2403 +     <tbody>
  1.2404 +      <tr>
  1.2405 +       <th><a class=property href="#ruby-align">ruby-align</a>
  1.2406 +
  1.2407 +       <td>auto | start | left | center | end | right | distribute-letter |
  1.2408 +        distribute-space | line-edge
  1.2409 +
  1.2410 +       <td>auto
  1.2411 +
  1.2412 +       <td>all elements and generated content
  1.2413 +
  1.2414 +       <td>yes
  1.2415 +
  1.2416 +       <td>N/A
  1.2417 +
  1.2418 +       <td>visual
  1.2419 +
  1.2420 +      <tr>
  1.2421 +       <th><a class=property href="#ruby-overhang">ruby-overhang</a>
  1.2422 +
  1.2423 +       <td>auto | start | end | none
  1.2424 +
  1.2425 +       <td>none
  1.2426 +
  1.2427 +       <td>the parent of elements with display: ruby-text
  1.2428 +
  1.2429 +       <td>yes
  1.2430 +
  1.2431 +       <td>N/A
  1.2432 +
  1.2433 +       <td>visual
  1.2434 +
  1.2435 +      <tr>
  1.2436 +       <th><a class=property href="#ruby-position">ruby-position</a>
  1.2437 +
  1.2438 +       <td>before | after | inter-character | inline
  1.2439 +
  1.2440 +       <td>before
  1.2441 +
  1.2442 +       <td>the parent of elements with display: ruby-text.
  1.2443 +
  1.2444 +       <td>yes
  1.2445 +
  1.2446 +       <td>N/A
  1.2447 +
  1.2448 +       <td>visual
  1.2449 +
  1.2450 +      <tr>
  1.2451 +       <th><a class=property href="#ruby-span">ruby-span</a>
  1.2452 +
  1.2453 +       <td>attr(x) | none
  1.2454 +
  1.2455 +       <td>none
  1.2456 +
  1.2457 +       <td>elements with display: ruby-text
  1.2458 +
  1.2459 +       <td>no
  1.2460 +
  1.2461 +       <td>N/A
  1.2462 +
  1.2463 +       <td>visual
  1.2464 +    </table>
  1.2465 +    <!--end-properties-->
  1.2466    </dl>
  1.2467 -
  1.2468 -  <h2 id=conformance><span class=secno>6. </span> Conformance</h2>
  1.2469 -
  1.2470 -  <h3 id=conventions><span class=secno>6.1. </span> Document conventions</h3>
  1.2471 -
  1.2472 -  <p>Conformance requirements are expressed with a combination of descriptive
  1.2473 -   assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  1.2474 -   NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  1.2475 -   “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  1.2476 -   normative parts of this document are to be interpreted as described in RFC
  1.2477 -   2119. However, for readability, these words do not appear in all uppercase
  1.2478 -   letters in this specification.
  1.2479 -
  1.2480 -  <p>All of the text of this specification is normative except sections
  1.2481 -   explicitly marked as non-normative, examples, and notes. <a
  1.2482 -   href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  1.2483 -
  1.2484 -  <p>Examples in this specification are introduced with the words “for
  1.2485 -   example” or are set apart from the normative text with
  1.2486 -   <code>class="example"</code>, like this:
  1.2487 -
  1.2488 -  <div class=example>
  1.2489 -   <p>This is an example of an informative example.
  1.2490 -  </div>
  1.2491 -
  1.2492 -  <p>Informative notes begin with the word “Note” and are set apart from
  1.2493 -   the normative text with <code>class="note"</code>, like this:
  1.2494 -
  1.2495 -  <p class=note>Note, this is an informative note.
  1.2496 -
  1.2497 -  <h3 id=conformance-classes><span class=secno>6.2. </span> Conformance
  1.2498 -   classes</h3>
  1.2499 -
  1.2500 -  <p>Conformance to CSS Ruby Module is defined for three conformance classes:
  1.2501 -
  1.2502 -  <dl>
  1.2503 -   <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  1.2504 -    sheet</dfn>
  1.2505 -
  1.2506 -   <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  1.2507 -    style sheet</a>.
  1.2508 -
  1.2509 -   <dt><dfn id=renderer>renderer</dfn>
  1.2510 -
  1.2511 -   <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  1.2512 -    that interprets the semantics of a style sheet and renders documents that
  1.2513 -    use them.
  1.2514 -
  1.2515 -   <dt><dfn id=authoring-tool>authoring tool</dfn>
  1.2516 -
  1.2517 -   <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  1.2518 -    that writes a style sheet.
  1.2519 -  </dl>
  1.2520 -
  1.2521 -  <p>A style sheet is conformant to CSS Ruby Module if all of its statements
  1.2522 -   that use syntax defined in this module are valid according to the generic
  1.2523 -   CSS grammar and the individual grammars of each feature defined in this
  1.2524 -   module.
  1.2525 -
  1.2526 -  <p>A renderer is conformant to CSS Ruby Module if, in addition to
  1.2527 -   interpreting the style sheet as defined by the appropriate specifications,
  1.2528 -   it supports all the features defined by CSS Ruby Module by parsing them
  1.2529 -   correctly and rendering the document accordingly. However, the inability
  1.2530 -   of a UA to correctly render a document due to limitations of the device
  1.2531 -   does not make the UA non-conformant. (For example, a UA is not required to
  1.2532 -   render color on a monochrome monitor.)
  1.2533 -
  1.2534 -  <p>An authoring tool is conformant to CSS Ruby Module if it writes style
  1.2535 -   sheets that are syntactically correct according to the generic CSS grammar
  1.2536 -   and the individual grammars of each feature in this module, and meet all
  1.2537 -   other conformance requirements of style sheets as described in this
  1.2538 -   module.
  1.2539 -
  1.2540 -  <h3 id=partial><span class=secno>6.3. </span> Partial implementations</h3>
  1.2541 -
  1.2542 -  <p>So that authors can exploit the forward-compatible parsing rules to
  1.2543 -   assign fallback values, CSS renderers <strong>must</strong> treat as
  1.2544 -   invalid (and <a
  1.2545 -   href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  1.2546 -   appropriate</a>) any at-rules, properties, property values, keywords, and
  1.2547 -   other syntactic constructs for which they have no usable level of support.
  1.2548 -   In particular, user agents <strong>must not</strong> selectively ignore
  1.2549 -   unsupported component values and honor supported values in a single
  1.2550 -   multi-value property declaration: if any value is considered invalid (as
  1.2551 -   unsupported values must be), CSS requires that the entire declaration be
  1.2552 -   ignored.
  1.2553 -
  1.2554 -  <h3 id=experimental><span class=secno>6.4. </span> Experimental
  1.2555 -   implementations</h3>
  1.2556 -
  1.2557 -  <p>To avoid clashes with future CSS features, the CSS2.1 specification
  1.2558 -   reserves a <a
  1.2559 -   href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  1.2560 -   syntax</a> for proprietary and experimental extensions to CSS.
  1.2561 -
  1.2562 -  <p>Prior to a specification reaching the Candidate Recommendation stage in
  1.2563 -   the W3C process, all implementations of a CSS feature are considered
  1.2564 -   experimental. The CSS Working Group recommends that implementations use a
  1.2565 -   vendor-prefixed syntax for such features, including those in W3C Working
  1.2566 -   Drafts. This avoids incompatibilities with future changes in the draft.
  1.2567 -
  1.2568 -  <h3 id=testing><span class=secno>6.5. </span> Non-experimental
  1.2569 -   implementations</h3>
  1.2570 -
  1.2571 -  <p>Once a specification reaches the Candidate Recommendation stage,
  1.2572 -   non-experimental implementations are possible, and implementors should
  1.2573 -   release an unprefixed implementation of any CR-level feature they can
  1.2574 -   demonstrate to be correctly implemented according to spec.
  1.2575 -
  1.2576 -  <p>To establish and maintain the interoperability of CSS across
  1.2577 -   implementations, the CSS Working Group requests that non-experimental CSS
  1.2578 -   renderers submit an implementation report (and, if necessary, the
  1.2579 -   testcases used for that implementation report) to the W3C before releasing
  1.2580 -   an unprefixed implementation of any CSS features. Testcases submitted to
  1.2581 -   W3C are subject to review and correction by the CSS Working Group.
  1.2582 -
  1.2583 -  <p>Further information on submitting testcases and implementation reports
  1.2584 -   can be found from on the CSS Working Group's website at <a
  1.2585 -   href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  1.2586 -   Questions should be directed to the <a
  1.2587 -   href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  1.2588 -   mailing list.
  1.2589 -
  1.2590 -  <h2 class=no-num id=acknowledgments> Acknowledgments</h2>
  1.2591 -
  1.2592 -  <p>This specification would not have been possible without the help from:
  1.2593 -
  1.2594 -  <p>Stephen Deach, Martin Dürst,  Hideki Hiura(<span lang=ja>樋浦
  1.2595 -   秀樹</span>), Masayasu Ishikawa(<span lang=ja>石川 雅康</span>),
  1.2596 -   Chris Pratley, Takao Suzuki(<span lang=ja>鈴木 孝雄</span>), Frank
  1.2597 -   Yung-Fong Tang, Chris Thrasher, Masafumi Yabe<span lang=ja>家辺
  1.2598 -   勝文</span>), Steve Zilles.
  1.2599 -
  1.2600 -  <h2 class=no-num id=references> References</h2>
  1.2601 -
  1.2602 -  <h3 class=no-num id=normative-references> Normative references</h3>
  1.2603 -  <!--begin-normative-->
  1.2604 -  <!-- Sorted by label -->
  1.2605 -
  1.2606 -  <dl class=bibliography>
  1.2607 -   <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  1.2608 -    <!---->
  1.2609 -
  1.2610 -   <dt id=CSS21>[CSS21]
  1.2611 -
  1.2612 -   <dd>Bert Bos; et al. <a
  1.2613 -    href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  1.2614 -    Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  1.2615 -    2011. W3C Recommendation. URL: <a
  1.2616 -    href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  1.2617 -   </dd>
  1.2618 -   <!---->
  1.2619 -
  1.2620 -   <dt id=RFC2119>[RFC2119]
  1.2621 -
  1.2622 -   <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  1.2623 -    words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  1.2624 -    RFC 2119. URL: <a
  1.2625 -    href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  1.2626 -   </dd>
  1.2627 -   <!---->
  1.2628 -  </dl>
  1.2629 -  <!--end-normative-->
  1.2630 -
  1.2631 -  <h3 class=no-num id=other-references> Other references</h3>
  1.2632 -  <!--begin-informative-->
  1.2633 -  <!-- Sorted by label -->
  1.2634 -
  1.2635 -  <dl class=bibliography>
  1.2636 -   <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  1.2637 -    <!---->
  1.2638 -
  1.2639 -   <dt id=CSS3VAL>[CSS3VAL]
  1.2640 -
  1.2641 -   <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  1.2642 -    href="http://www.w3.org/TR/2013/CR-css3-values-20130404/"><cite>CSS
  1.2643 -    Values and Units Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  1.2644 -    Recommendation. (Work in progress.) URL: <a
  1.2645 -    href="http://www.w3.org/TR/2013/CR-css3-values-20130404/">http://www.w3.org/TR/2013/CR-css3-values-20130404/</a>
  1.2646 -   </dd>
  1.2647 -   <!---->
  1.2648 -
  1.2649 -   <dt id=JIS4051>[JIS4051]
  1.2650 -
  1.2651 -   <dd><cite>Formatting rules for Japanese documents
  1.2652 -    (『日本語文書の組版方法』).</cite> Japanese Standards
  1.2653 -    Association. 2004. JIS X 4051:2004. In Japanese</dd>
  1.2654 -   <!---->
  1.2655 -
  1.2656 -   <dt id=JLREQ>[JLREQ]
  1.2657 -
  1.2658 -   <dd>Yasuhiro Anan; et al. <a
  1.2659 -    href="http://www.w3.org/TR/2012/NOTE-jlreq-20120403/"><cite>Requirements
  1.2660 -    for Japanese Text Layout.</cite></a> 3 April 2012. W3C Working Group
  1.2661 -    Note. URL: <a
  1.2662 -    href="http://www.w3.org/TR/2012/NOTE-jlreq-20120403/">http://www.w3.org/TR/2012/NOTE-jlreq-20120403/</a>
  1.2663 -   </dd>
  1.2664 -   <!---->
  1.2665 -
  1.2666 -   <dt id=RUBY>[RUBY]
  1.2667 -
  1.2668 -   <dd>Masayasu Ishikawa; et al. <a
  1.2669 -    href="http://www.w3.org/TR/2001/REC-ruby-20010531"><cite>Ruby
  1.2670 -    Annotation.</cite></a> 31 May 2001. W3C Recommendation. URL: <a
  1.2671 -    href="http://www.w3.org/TR/2001/REC-ruby-20010531">http://www.w3.org/TR/2001/REC-ruby-20010531</a>
  1.2672 -   </dd>
  1.2673 -   <!---->
  1.2674 -
  1.2675 -   <dt id=UAX11>[UAX11]
  1.2676 -
  1.2677 -   <dd>Asmus Freytag. <a
  1.2678 -    href="http://www.unicode.org/reports/tr11/"><cite>East Asian
  1.2679 -    Width.</cite></a> 17 January 2012. Unicode Standard Annex #11. URL: <a
  1.2680 -    href="http://www.unicode.org/reports/tr11/">http://www.unicode.org/reports/tr11/</a>
  1.2681 -   </dd>
  1.2682 -   <!---->
  1.2683 -
  1.2684 -   <dt id=UNICODE>[UNICODE]
  1.2685 -
  1.2686 -   <dd>The Unicode Consortium. <a
  1.2687 -    href="http://www.unicode.org/standard/versions/enumeratedversions.html"><cite>The
  1.2688 -    Unicode Standard.</cite></a> 2012. Defined by: The Unicode Standard,
  1.2689 -    Version 6.2.0 (Mountain View, CA: The Unicode Consortium, 2012. ISBN
  1.2690 -    978-1-936213-07-8), as updated from time to time by the publication of
  1.2691 -    new versions URL: <a
  1.2692 -    href="http://www.unicode.org/standard/versions/enumeratedversions.html">http://www.unicode.org/standard/versions/enumeratedversions.html</a>
  1.2693 -   </dd>
  1.2694 -   <!---->
  1.2695 -  </dl>
  1.2696 -  <!--end-informative-->
  1.2697 -
  1.2698 -  <h2 class=no-num id=index> Index</h2>
  1.2699 -  <!--begin-index-->
  1.2700 -
  1.2701 -  <ul class=indexlist>
  1.2702 -   <li>authoring tool, <a href="#authoring-tool"
  1.2703 -    title="section 6.2."><strong>6.2.</strong></a>
  1.2704 -
  1.2705 -   <li>renderer, <a href="#renderer"
  1.2706 -    title="section 6.2."><strong>6.2.</strong></a>
  1.2707 -
  1.2708 -   <li>ruby-align, <a href="#ruby-align"
  1.2709 -    title="section 3.2."><strong>3.2.</strong></a>
  1.2710 -
  1.2711 -   <li>ruby-overhang, <a href="#ruby-overhang"
  1.2712 -    title="section 3.3."><strong>3.3.</strong></a>
  1.2713 -
  1.2714 -   <li>ruby-position, <a href="#ruby-position"
  1.2715 -    title="section 3.1."><strong>3.1.</strong></a>
  1.2716 -
  1.2717 -   <li>ruby-span, <a href="#ruby-span"
  1.2718 -    title="section 3.4."><strong>3.4.</strong></a>
  1.2719 -
  1.2720 -   <li>style sheet
  1.2721 -    <ul>
  1.2722 -     <li>as conformance class, <a href="#style-sheet"
  1.2723 -      title="section 6.2."><strong>6.2.</strong></a>
  1.2724 -    </ul>
  1.2725 -  </ul>
  1.2726 -  <!--end-index-->
  1.2727 -
  1.2728 -  <h2 class=no-num id=property-index> Property index</h2>
  1.2729 -  <!--begin-properties-->
  1.2730 -
  1.2731 -  <table class=proptable>
  1.2732 -   <thead>
  1.2733 -    <tr>
  1.2734 -     <th>Property
  1.2735 -
  1.2736 -     <th>Values
  1.2737 -
  1.2738 -     <th>Initial
  1.2739 -
  1.2740 -     <th>Applies to
  1.2741 -
  1.2742 -     <th>Inh.
  1.2743 -
  1.2744 -     <th>Percentages
  1.2745 -
  1.2746 -     <th>Media
  1.2747 -
  1.2748 -   <tbody>
  1.2749 -    <tr>
  1.2750 -     <th><a class=property href="#ruby-align">ruby-align</a>
  1.2751 -
  1.2752 -     <td>auto | start | left | center | end | right | distribute-letter |
  1.2753 -      distribute-space | line-edge
  1.2754 -
  1.2755 -     <td>auto
  1.2756 -
  1.2757 -     <td>all elements and generated content
  1.2758 -
  1.2759 -     <td>yes
  1.2760 -
  1.2761 -     <td>N/A
  1.2762 -
  1.2763 -     <td>visual
  1.2764 -
  1.2765 -    <tr>
  1.2766 -     <th><a class=property href="#ruby-overhang">ruby-overhang</a>
  1.2767 -
  1.2768 -     <td>auto | start | end | none
  1.2769 -
  1.2770 -     <td>none
  1.2771 -
  1.2772 -     <td>the parent of elements with display: ruby-text
  1.2773 -
  1.2774 -     <td>yes
  1.2775 -
  1.2776 -     <td>N/A
  1.2777 -
  1.2778 -     <td>visual
  1.2779 -
  1.2780 -    <tr>
  1.2781 -     <th><a class=property href="#ruby-position">ruby-position</a>
  1.2782 -
  1.2783 -     <td>before | after | inter-character | inline
  1.2784 -
  1.2785 -     <td>before
  1.2786 -
  1.2787 -     <td>the parent of elements with display: ruby-text.
  1.2788 -
  1.2789 -     <td>yes
  1.2790 -
  1.2791 -     <td>N/A
  1.2792 -
  1.2793 -     <td>visual
  1.2794 -
  1.2795 -    <tr>
  1.2796 -     <th><a class=property href="#ruby-span">ruby-span</a>
  1.2797 -
  1.2798 -     <td>attr(x) | none
  1.2799 -
  1.2800 -     <td>none
  1.2801 -
  1.2802 -     <td>elements with display: ruby-text
  1.2803 -
  1.2804 -     <td>no
  1.2805 -
  1.2806 -     <td>N/A
  1.2807 -
  1.2808 -     <td>visual
  1.2809 -  </table>
  1.2810 -  <!--end-properties-->
  1.2811  </html>
  1.2812  <!-- Keep this comment at the end of the file
  1.2813  Local variables:
     2.1 --- a/css-ruby/Overview.src.html	Tue Jun 18 11:56:58 2013 +0200
     2.2 +++ b/css-ruby/Overview.src.html	Tue Jun 18 22:06:47 2013 +0900
     2.3 @@ -128,122 +128,143 @@
     2.4  <h3 id="conventions">
     2.5  Document conventions</h3>
     2.6  
     2.7 -<p>There are a number of illustrations in this document for which the following
     2.8 -legend is used:</p>
     2.9 +	<p>Many typographical conventions in East Asian typography depend
    2.10 +	on whether the character rendered is wide (CJK) or narrow (non-CJK).
    2.11 +	There are a number of illustrations in this document
    2.12 +	for which the following legend is used:
    2.13  
    2.14 -<p><img alt="Symbolic wide-cell glyph representation" class="example"
    2.15 -width="39" height="39" src="images/fullwidth.gif" />  - wide-cell glyph (e.g. Han)
    2.16 -which is the <i>n</i>-th character in the text run, they may also appear as
    2.17 -half size boxes when used as annotations.<br />
    2.18 -<img alt="Symbolic narrow-cell glyph representation" class="example"
    2.19 -width="19" height="39" src="images/halfwidth.gif" /> - narrow-cell glyph (e.g. Roman)
    2.20 -which is the <i>n</i>-th glyph in the text run.<br />
    2.21 -</p>
    2.22 +	<dl>
    2.23 +		<dt><img alt="Symbolic wide-cell glyph representation" width="39" height="39" src="images/fullwidth.gif">
    2.24 +		<dd>Wide-cell glyph (e.g. Han) that is the <var>n</var>th character in the text run.
    2.25 +		They are typically sized to 50% when used as annotations.
    2.26 +		<dt><img alt="Symbolic narrow-cell glyph representation" width="19" height="39" src="images/halfwidth.gif">
    2.27 +		<dd>Narrow-cell glyph (e.g. Roman) which is the <var>n</var>th glyph in the text run.
    2.28  
    2.29 -<p>Many typographical properties in East Asian typography depend on the fact 
    2.30 -that a character is typically rendered as either a wide or narrow character. All 
    2.31 -characters described by the Unicode Standard [[UNICODE]] can be categorized by a
    2.32 -width property. This is covered by the Unicode Standard Annex 
    2.33 -[[UAX11]]</a>. </p>
    2.34 -
    2.35 -<p>The orientation which the above symbols assume in the diagrams corresponds
    2.36 -to the orientation that the glyphs they represent are intended to assume when
    2.37 -rendered by the user agent. Spacing between these characters in the diagrams is
    2.38 -usually symbolic, unless intentionally changed to make a point.</p>
    2.39 +	<p>The orientation which the above symbols assume in the diagrams
    2.40 +	corresponds to the orientation that the glyphs they represent
    2.41 +	are intended to assume when rendered by the user agent.
    2.42 +	Spacing between these characters in the diagrams is incidental,
    2.43 +	unless intentionally changed to make a point.
    2.44  
    2.45  <h3 id="ruby-def">
    2.46  What is ruby?</h3>
    2.47  
    2.48 -<p>"Ruby" is the commonly used name for a run of text that appears in the
    2.49 -immediate vicinity of another run of text, referred to as the "base", and
    2.50 -serves as an annotation or a pronunciation guide associated with that run of
    2.51 -text. Ruby, as used in Japanese, is described in JIS X-4051 [[JIS4051]] (in Japanese) and  in Requirements for Japanese Text Layout [[JLREQ]] (in English and Japanese)]. The ruby structure and the XHTML markup to represent it
    2.52 -is described in the Ruby Annotation [[RUBY]] specification. This
    2.53 -section describes the CSS properties relevant to ruby. The following figures
    2.54 -show two examples of Ruby.</p>
    2.55 +	<p><dfn>Ruby</dfn> is the commonly-used name for a run of text
    2.56 +	that appears alongside another run of text (referred to as the “base”)
    2.57 +	and serves as an annotation or a pronunciation guide associated with that run of text.
    2.58  
    2.59 -<div class="figure">
    2.60 -<p>
    2.61 -<img alt="Example of ruby applied on top of a Japanese expression"
    2.62 -class="example" src="images/licence.png" /></p>
    2.63 +	<p>The following figures show two examples of Ruby,
    2.64 +	a simple case and one with more complicated structure.
    2.65  
    2.66 -<p><b>Figure 2.2.1</b>: Example of ruby used in Japanese (simple case)</p>
    2.67 -</div>
    2.68 +	<div class="example">
    2.69 +		<p>In this first example, a single annotation is used to annotate the base text.
    2.70 +		<div class="figure">
    2.71 +			<p><img src="images/licence.png"
    2.72 +			        alt="Example of ruby applied on top of a Japanese expression">
    2.73 +			<p class="caption">Example of ruby used in Japanese (simple case)
    2.74 +		</div>
    2.75 +		<p>In Japanese typography, this case is sometimes called
    2.76 +		<i lang="ja">taigo</i> ruby or group-ruby (per-word ruby),
    2.77 +		because the annotation as a whole is associated
    2.78 +		with multi-character word (as a whole).
    2.79 +	</div>
    2.80  
    2.81 -<div class="figure">
    2.82 -<p>
    2.83 -<img
    2.84 -alt="Example showing complex ruby with annotation text before and after 
    2.85 -the base characters"
    2.86 -class="example" src="images/ruby-univ.gif" width="277" height="108" /></p>
    2.87 +	<div class="example">
    2.88 +		<p>In this second example,
    2.89 +		two levels of annotations are attached to a base sequence:
    2.90 +		the hiragana characters on top refer to the pronunciation of each of the base kanji characters,
    2.91 +		while the words “Keio” and “University” on the bottom are annotations describing the English translation.
    2.92 +		<div class="figure">
    2.93 +			<p><img src="images/ruby-univ.gif"
    2.94 +			        alt="Example showing complex ruby with annotation text over and under the base characters">
    2.95 +			<p class="caption">Complex ruby with annotation text over and under the base characters
    2.96 +		</div>
    2.97 +		<p>
    2.98 +		<p>Notice that to allow correct association between the hiragana characters and 
    2.99 +		their corresponding Kanji base characters,
   2.100 +		the spacing between these Kanji characters is adjusted.
   2.101 +		(This happens around the fourth Kanji character in the figure above.)
   2.102 +		To avoid variable spacing between the Kanji characters in the example above
   2.103 +		the hiragana annotations can be styled as a <i>collapsed annotation</i>,
   2.104 +		which will look more like the group-ruby example earlier.
   2.105 +		However because the base-annotation pairings are recorded in the ruby structure,
   2.106 +		if the text breaks across lines, the annotation characters will stay
   2.107 +		correctly paired with their respective base characters.
   2.108 +	</div>
   2.109  
   2.110 -<p><strong>Figure 2.2.2</strong>: Complex ruby with annotation text before and after 
   2.111 -the base characters</p>
   2.112 -</div>
   2.113 -
   2.114 -<p>In the first example, a single annotation is used to annotate the base 
   2.115 -sequence. In Japanese typography, this simple case is sometimes called&nbsp; &quot;<span lang="ja">taigo</span> ruby&quot; or group-ruby  (per-word ruby).</p>
   2.116 -
   2.117 -<p>In the second example, multiple annotations are attached to a base
   2.118 -sequence, the hiragana characters on top refer to the pronunciation of each of the
   2.119 -base Kanji characters (annotated in a <a href="#g-monoruby">mono-ruby</a> fashion), while the words 'Keio' 
   2.120 -and 'University' on the bottom are
   2.121 -annotations describing the English translation of respectively the first four 
   2.122 -and the last two Kanji characters
   2.123 -of the base. To allow correct association between the hiragana characters and 
   2.124 -their corresponding Kanji base characters, the spacing between these Kanji 
   2.125 -characters may be adjusted (this happens around the fourth Kanji character in the 
   2.126 -figure 2.2.2 above).</p>
   2.127 -
   2.128 -<p class="Note"><span class="note-label">Note:</span> To avoid variable spacing between the Kanji 
   2.129 -characters in the example above the hiragana annotations can also be created as 
   2.130 -a simple annotation ruby.</p>
   2.131 -
   2.132 -<p>The two examples correspond respectively to two types of ruby: simple ruby using  simple ruby markup and complex ruby using  complex ruby
   2.133 -markup.</p>
   2.134 +	<i>Ruby</i> formatting as used in Japanese is described in JIS X-4051 [[JIS4051]] (in Japanese)
   2.135 +	and in Requirements for Japanese Text Layout [[JLREQ]] (in English and Japanese)].
   2.136 +	In HTML, ruby structure and markup to represent it is described
   2.137 +	in the Ruby Markup Extension specification.
   2.138 +	This module describes the CSS rendering model
   2.139 +	and formatting controls relevant to ruby layout of such markup.
   2.140  
   2.141  <h2 id="ruby-model">
   2.142  Ruby Formatting Model</h2>
   2.143  
   2.144 -<h3 id="display">
   2.145 -Ruby specific 'display' property values</h3>
   2.146 +	<p>The CSS ruby model is based on
   2.147 +	the <a href="http://darobin.github.io/html-ruby/">HTML Ruby Markup Extension</a>
   2.148 +	and <a href="http://www.w3.org/TR/ruby/">XHTML Ruby Annotation Recommendation</a> [[RUBY]].
   2.149 +	In this model, a ruby structure consists of
   2.150 +	one or more <dfn>ruby base</dfn> elements representing the base (annotated) text,
   2.151 +	associated with one or more levels of <dfn>ruby annotation</dfn> elements representing the annotations.
   2.152 +	The structure of ruby is similar to that of a table:
   2.153 +	there are “rows” (the base text level, each annotation level)
   2.154 +	and “columns” (each <i>ruby base</i> and its corresponding <i>ruby annotations</i>).
   2.155  
   2.156 -<p>The CSS ruby model is based on the W3C Ruby Annotation Recommendation [[RUBY]].
   2.157 -The Recommendation specifies the ruby structure in a way to closely parallel
   2.158 -the visual layout of the ruby element. In this model, a ruby consists of one
   2.159 -or more base elements associated with one or more annotation elements.</p>
   2.160 +	<p>Consecutive bases and annotations are grouped together into <dfn>ruby segments</dfn>.
   2.161 +	Within a <i>ruby segment</i>, a <i>ruby annotation</i> may span multiple <i>ruby bases<i>.
   2.162  
   2.163 -<p>The CSS model does not require that the document language include elements
   2.164 -that correspond to each of these components. For document languages (such as
   2.165 -XML applications) that do not have pre-defined ruby elements, authors must map
   2.166 -document language elements to ruby elements; this is done with the 'display'
   2.167 -property. The following 'display' values assign ruby semantics to an arbitrary
   2.168 -element:</p>
   2.169 -<dl>
   2.170 -  <dt><strong>ruby</strong> (in XHTML: ruby)</dt>
   2.171 -    <dd>Specifies that an element defines a ruby structure.</dd>
   2.172 -  <dt><strong>ruby-base</strong> (in  XHTML: rb)</dt>
   2.173 -    <dd>Specifies that an element defines a ruby base.</dd>
   2.174 -  <dt><strong>ruby-text</strong> (in XHTML: rt)</dt>
   2.175 -    <dd>Specifies that an element defines a ruby text.</dd>
   2.176 -  <dt><strong>ruby-base-container</strong> (in XHTML: rbc)</dt>
   2.177 -    <dd>Specifies that an element contains one or more ruby base.</dd>
   2.178 -  <dt><strong>ruby-text-container</strong> (in XHTML: rtc)</dt>
   2.179 -    <dd>Specifies that an element contains one or more ruby text.</dd>
   2.180 -</dl>
   2.181 +	<p class="note">In HTML, a single <code>&lt;ruby&gt;</code> element may contain multiple <i>ruby segments</i>.
   2.182 +	(In the XHTML Ruby model, a single <code>&lt;ruby&gt;</code> element can only contain one <i>ruby segment</i>.)
   2.183  
   2.184 -<p class="issue"><span class="issuehead">Issue:&nbsp;</span> I18n WG proposes that there should be a display value rp also, to allow XML-based formats to associate rp behaviour with elements. See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20display:+rp+value&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">thread</a>.</p>
   2.185 +<h3 id="ruby-display">
   2.186 +Ruby-specific 'display' property values</h3>
   2.187  
   2.188 -<p>The <a
   2.189 -href="http://www.w3.org/TR/ruby/#ruby"><samp>rbspan</samp></a> attribute should 
   2.190 -also be used by XML applications to allow annotation spanning; but in addition, the 
   2.191 -'<a href="#ruby-span">ruby-span</a>' property must be used by those applications to indicate to the user agent the number of 
   2.192 -ruby base elements to be spanned.</p>
   2.193 +	<p>For document languages (such as XML applications) that do not have pre-defined ruby elements,
   2.194 +	authors must map document language elements to ruby elements;
   2.195 +	this is done with the 'display' property.
   2.196 +
   2.197 +	<table class="propdef">
   2.198 +		<tr>
   2.199 +			<th>Name:
   2.200 +			<td>display
   2.201 +		<tr>
   2.202 +			<th><a href="#values">New Values</a>:
   2.203 +			<td>ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container
   2.204 +	</table>
   2.205 +
   2.206 +	<p>The following new 'display' values assign ruby layout roles to an arbitrary element:
   2.207 +
   2.208 +	<dl>
   2.209 +		<dt>''ruby''
   2.210 +			<dd>Specifies that an element generates a <dfn>ruby container box</dfn>.
   2.211 +			(Corresponds to HTML/XHTML <code>&lt;ruby&gt;</code> elements.)
   2.212 +		<dt>''ruby-base''
   2.213 +			<dd>Specifies that an element generates a <dfn>ruby base box</dfn>.
   2.214 +			(Corresponds to HTML/XHTML <code>&lt;rb&gt;</code> elements.)
   2.215 +		<dt>''ruby-text''
   2.216 +			<dd>Specifies that an element generates a <dfn>ruby annotation box</dfn>.
   2.217 +			(Corresponds to HTML/XHTML <code>&lt;rt&gt;</code> elements.)
   2.218 +		<dt>''ruby-base-container''
   2.219 +			<dd>Specifies that an element generates a <dfn>ruby base container box</dfn>.
   2.220 +			(Corresponds to XHTML <code>&lt;rbc&gt;</code> elements; always implied in HTML.)
   2.221 +		<dt>''ruby-text-container''
   2.222 +			<dd>Specifies that an element generates a <dfn>ruby annotation container box</dfn>.
   2.223 +			(Corresponds to HTML/XHTML <code>&lt;ruby&gt;</code> elements.)
   2.224 +	</dl>
   2.225 +
   2.226 +	<p>The CSS model does not require that the document language
   2.227 +	include elements that correspond to each of these components.
   2.228 +	Missing parts of the structure are implied through the anonymous box generation rules.
   2.229 +
   2.230 +	<p class="issue">The spec needs to address anonymous box generation rules (and to make them compatible with HTML5 ruby markup).
   2.231 +	<p class="issue">How should box generation rules deal with ruby elements that contain block-level boxes?
   2.232 +	Turn them into inline blocks? Treat them as 'display: none'? Force them to float? Something else?
   2.233  
   2.234  <h3 id="box-model">
   2.235  Ruby box model</h3>
   2.236  
   2.237 -<p class="issue"><span class="issuehead">Issue:&nbsp;</span> The spec needs to address anonymous box generation rules (and to make them compatible with HTML5 ruby markup).</p>
   2.238  <p>In the following description, the elements specified by   Ruby 
   2.239  Annotation [[RUBY]] are used to describe the box model. As mentioned
   2.240  earlier, a user agent can obtain the same results by using the Ruby specific 'display' 

mercurial