Fri, 07 Mar 2014 15:39:57 -0800
[css-ruby] Define what happens when display-outside is not inline-level.
1 <!DOCTYPE html>
2 <!--
4 Issues:
5 bidi
6 box layout/sizing
7 clean up inter-character vs. parallel layout requirements
9 Redo all examples with consistent font. (M+ 2p?)
11 -->
12 <html lang="en">
13 <head>
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
15 <title>CSS Ruby Module Level 1</title>
16 <link rel=contents href="#contents">
17 <link rel=index href="#index">
18 <link rel="stylesheet" type="text/css" href="../default.css">
19 <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
20 <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
21 </head>
23 <body class="h-entry">
25 <div class="head">
26 <!--logo-->
28 <h1 class="p-name">CSS Ruby Module Level 1</h1>
30 <h2 class="no-num no-toc">[LONGSTATUS] <time class="dt-updated" datetime="[CDATE]">[DATE]</time> <!-- for HTML4 doctype: <span class="value-title" title="[CDATE]">[DATE]</span></span> --> </h2>
31 <dl>
32 <dt>This version:
33 <dd><a class="u-url" href="[VERSION]">[VERSION]</a>
35 <dt>Latest version:
36 <dd><a href="http://www.w3.org/TR/[SHORTNAME]/">http://www.w3.org/TR/css3-ruby/</a>
38 <dt>Editor's draft:
39 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
40 (<a href="https://dvcs.w3.org/hg/csswg/log/tip/[SHORTNAME]/Overview.src.html">change log</a>)
42 <dt>Previous version:
43 <dd><a href="http://www.w3.org/TR/2011/WD-css3-ruby-20110630/">
44 http://www.w3.org/TR/2011/WD-css3-ruby-20110630/</a>
46 <dt>Issue Tracking:</dt>
47 <dd><a rel="issues" href="http://www.w3.org/Style/CSS/Tracker/products/FIXME">http://www.w3.org/Style/CSS/Tracker/products/FIXME</a>
49 <dt>Feedback:</dt>
50 <dd><a href="mailto:www-style@w3.org?subject=%5BSHORTNAME%5D%20feedback"
51 >www-style@w3.org</a>
52 with subject line “<kbd>[[SHORTNAME]]
53 <var>… message topic …</var></kbd>”
54 (<a rel="discussion" href="http://lists.w3.org/Archives/Public/www-style/"
55 >archives</a>)
57 <dt>Editors:
58 <dd class="p-author h-card vcard">
59 <a class="p-name fn u-url url" rel="author"
60 href="http://fantasai.inkedblade.net/contact">Elika J. Etemad</a>,
61 <a class="p-org org h-org" href="http://www.mozilla.org/">Mozilla</a>
62 <dd class="p-author h-card vcard">
63 <a class="p-name fn u-url url" rel="author"
64 href="mailto:koji.a.ishii@mail.rakuten.com">Koji Ishii</a>,
65 <span class="p-org org">Rakuten, Inc.</span>
66 <dd class="p-author h-card vcard">
67 <a class="p-name fn u-url url" rel="author"
68 href="mailto:ishida@w3.org">Richard Ishida</a>,
69 <span class="p-org org">W3C</span>
71 <dt>Former editors:
72 <dd>Michel Suignard, Microsoft
73 <dd>Marcin Sawicki, Microsoft
74 </dl>
76 <!--copyright-->
78 <hr title="Separator for header">
79 </div>
81 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
83 <p>
84 <span class="p-summary">
85 “Ruby” are short runs of text alongside the base text,
86 typically used in East Asian documents to indicate pronunciation
87 or to provide a short annotation.
88 This module describes the rendering model and formatting controls
89 related to displaying ruby annotations in CSS.
90 </span>
92 <a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing
93 the rendering of structured documents (such as HTML and XML) on screen, on
94 paper, in speech, etc.
96 <h2 class="no-num no-toc" id="status">Status of this document</h2>
98 <!--status-->
100 <p>The following features are at risk: …
102 <h2 class="no-num no-toc" id="contents">
103 Table of Contents</h2>
105 <!--toc-->
107 <h2 id="intro">
108 Introduction</h2>
110 <p><em>This section is not normative.</em>
112 <h3 id="placement">
113 Module interactions</h3>
115 <p>This module extends the inline box model of CSS Level 2 [[!CSS21]]
116 to support ruby.
118 <p>None of the properties in this module apply to the <code>::first-line</code> or
119 <code>::first-letter</code> pseudo-elements.
121 <h3 id="values">
122 Values</h3>
124 <p>This specification follows the
125 <a href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
126 definition conventions</a> from [[!CSS21]]. Value types not defined in
127 this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
128 Other CSS modules may expand the definitions of these value types: for
129 example [[CSS3VAL]], when combined with this module, expands the
130 definition of the <var><length></var> value type as used in this specification.</p>
132 <p>In addition to the property-specific values listed in their definitions,
133 all properties defined in this specification also accept the
134 <a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
135 keyword as their property value. For readability it has not been repeated
136 explicitly.
138 <h3 id="diagram-conventions">
139 Diagram conventions</h3>
141 <p>Many typographical conventions in East Asian typography depend
142 on whether the character rendered is wide (CJK) or narrow (non-CJK).
143 There are a number of illustrations in this document
144 for which the following legend is used:
146 <dl>
147 <dt><img alt="Symbolic wide-cell glyph representation" width="39" height="39" src="images/fullwidth.gif">
148 <dd>Wide-cell glyph (e.g. Han) that is the <var>n</var>th character in the text run.
149 They are typically sized to 50% when used as annotations.
150 <dt><img alt="Symbolic narrow-cell glyph representation" width="19" height="39" src="images/halfwidth.gif">
151 <dd>Narrow-cell glyph (e.g. Roman) which is the <var>n</var>th glyph in the text run.
152 </dl>
154 <p>The orientation which the above symbols assume in the diagrams
155 corresponds to the orientation that the glyphs they represent
156 are intended to assume when rendered by the user agent.
157 Spacing between these characters in the diagrams is incidental,
158 unless intentionally changed to make a point.
160 <h3 id="ruby-def">
161 What is ruby?</h3>
163 <p><dfn>Ruby</dfn> is the commonly-used name for a run of text
164 that appears alongside another run of text (referred to as the “base”)
165 and serves as an annotation or a pronunciation guide associated with that run of text.
167 <p>The following figures show two examples of Ruby,
168 a simple case and one with more complicated structure.
170 <div class="example">
171 <p>In this first example, a single annotation is used to annotate the base text.
172 <div class="figure">
173 <p><img src="images/licence.png"
174 alt="Example of ruby applied on top of a Japanese expression">
175 <p class="caption">Example of ruby used in Japanese (simple case)
176 </div>
177 <p>In Japanese typography, this case is sometimes called
178 <i lang="ja">taigo</i> ruby or group-ruby (per-word ruby),
179 because the annotation as a whole is associated
180 with multi-character word (as a whole).
181 </div>
183 <div class="example">
184 <p>In this second example,
185 two levels of annotations are attached to a base sequence:
186 the hiragana characters on top refer to the pronunciation of each of the base kanji characters,
187 while the words “Keio” and “University” on the bottom are annotations describing the English translation.
188 <div class="figure">
189 <p><img src="images/ruby-univ.gif"
190 alt="Example showing complex ruby with annotation text over and under the base characters">
191 <p class="caption">Complex ruby with annotation text over and under the base characters
192 </div>
193 <p>
194 <p>Notice that to allow correct association between the hiragana characters and
195 their corresponding Kanji base characters,
196 the spacing between these Kanji characters is adjusted.
197 (This happens around the fourth Kanji character in the figure above.)
198 To avoid variable spacing between the Kanji characters in the example above
199 the hiragana annotations can be styled as a <i>collapsed annotation</i>,
200 which will look more like the group-ruby example earlier.
201 However because the base-annotation pairings are recorded in the ruby structure,
202 if the text breaks across lines, the annotation characters will stay
203 correctly paired with their respective base characters.
204 </div>
206 <p><i>Ruby</i> formatting as used in Japanese is described in JIS X-4051 [[JIS4051]] (in Japanese)
207 and in Requirements for Japanese Text Layout [[JLREQ]] (in English and Japanese)].
208 In HTML, ruby structure and markup to represent it is described
209 in the Ruby Markup Extension specification.
210 This module describes the CSS rendering model
211 and formatting controls relevant to ruby layout of such markup.
213 <h2 id="ruby-model">
214 Ruby Formatting Model</h2>
216 <p>The CSS ruby model is based on
217 the <a href="http://darobin.github.io/html-ruby/">HTML Ruby Markup Extension</a>
218 and <a href="http://www.w3.org/TR/ruby/">XHTML Ruby Annotation Recommendation</a> [[RUBY]].
219 In this model, a ruby structure consists of
220 one or more <dfn>ruby base</dfn> elements representing the base (annotated) text,
221 associated with one or more levels of <dfn>ruby annotation</dfn> elements representing the annotations.
222 The structure of ruby is similar to that of a table:
223 there are “rows” (the base text level, each annotation level)
224 and “columns” (each <i>ruby base</i> and its corresponding <i>ruby annotations</i>).
226 <p>Consecutive bases and annotations are grouped together into <dfn>ruby segments</dfn>.
227 Within a <i>ruby segment</i>, a <i>ruby annotation</i> may span multiple <i>ruby bases</i>.
229 <p class="note">In HTML, a single <code><ruby></code> element may contain multiple <i>ruby segments</i>.
230 (In the XHTML Ruby model, a single <code><ruby></code> element can only contain one <i>ruby segment</i>.)
232 <h3 id="ruby-display">
233 Ruby-specific 'display' property values</h3>
235 <p>For document languages (such as XML applications) that do not have pre-defined ruby elements,
236 authors must map document language elements to ruby elements;
237 this is done with the 'display' property.
239 <table class="propdef">
240 <tr>
241 <th>Name:
242 <td>display
243 <tr>
244 <th><a href="#values">New Values</a>:
245 <td>ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container
246 </table>
248 <p>The following new 'display' values assign ruby layout roles to an arbitrary element:
250 <dl>
251 <dt>''ruby''
252 <dd>Specifies that an element generates a <dfn title="ruby container | ruby container box">ruby container box</dfn>.
253 (Corresponds to HTML/XHTML <code><ruby></code> elements.)
254 <dt>''ruby-base''
255 <dd>Specifies that an element generates a <dfn title="ruby base box | ruby base">ruby base box</dfn>.
256 (Corresponds to HTML/XHTML <code><rb></code> elements.)
257 <dt>''ruby-text''
258 <dd>Specifies that an element generates a <dfn title="ruby annotation box | ruby annotation">ruby annotation box</dfn>.
259 (Corresponds to HTML/XHTML <code><rt></code> elements.)
260 <dt>''ruby-base-container''
261 <dd>Specifies that an element generates a <dfn title="ruby base container box | ruby base container">ruby base container box</dfn>.
262 (Corresponds to XHTML <code><rbc></code> elements; always implied in HTML.)
263 <dt>''ruby-text-container''
264 <dd>Specifies that an element generates a <dfn title="ruby annotation container box | ruby annotation container">ruby annotation container box</dfn>.
265 (Corresponds to HTML/XHTML <code><ruby></code> elements.)
266 </dl>
268 <h3 id="box-fixup">
269 Anonymous Ruby Box Generation</h3>
271 <p>The CSS model does not require that the document language
272 include elements that correspond to each of these components.
273 Missing parts of the structure are implied through the anonymous box generation rules
274 <a href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes">similar to those used to normalize tables</a>. [[!CSS21]]
276 <ol>
277 <li>Any in-flow block-level boxes directly contained by a
278 <i>ruby container</i>,
279 <i>ruby base container</i>,
280 <i>ruby annotation container</i>,
281 <i>ruby base box</i>,
282 or <i>ruby annotation box</i>
283 are forced to be inline-level boxes,
284 and their 'display' value computed accordingly.
285 For example,
286 the 'display' property of an in-flow element with ''display: block''
287 parented by an element with ''display: ruby-text''
288 computes to ''inline-block''.
289 This computation occurs after any intermediary anonymous-box fixup
290 (such as that required by internal table elements).
292 <li>Any consecutive sequence of <i>ruby bases</i> not parented by a <i>ruby base container</i>
293 is wrapped in an anonymous <i>ruby base container</i>.
294 Similarly, any consecutive sequence of <i>ruby annotations</i> not parented by a <i>ruby annotation container</i>
295 is wrapped in an anonymous <i>ruby annotation container</i>.
297 <li>Within each <i>ruby base container</i>,
298 each sequence of inline-level boxes is wrapped in an anonymous <i>ruby base box</i>.
299 Similarly, within each <i>ruby annotation container</i>,
300 each sequence of inline-level boxes is wrapped in an anonymous <i>ruby annotation box</i>.
302 <li>A sequence of <i>ruby base containers</i> and/or <i>ruby annotation containers</i>
303 not parented by a <i>ruby container</i>
304 is wrapped in an anonymous <i>ruby container</i>.
305 </ol>
307 <p>At this point, all ruby layout structures are properly parented,
308 and the UA can start to associate bases with their annotations.
310 <p class="note">
311 Note that the UA is not required to create any of these anonymous boxes in its internal structures,
312 as long as pairing and layout behaves as if they existed.
314 <h4 id="block-ruby">
315 Block-level Ruby</h4>
317 <p>If an element has a computed 'display-inside' of ''ruby''
318 and a computed 'display-outside' other than ''inline-level'',
319 then it generates two boxes:
320 a principal block container box of the required 'display-outside' type,
321 and an inline-level <i>ruby container</i>.
322 All properties specified on the element apply to the principal box
323 (and if inheritable, inherit to the <i>ruby container box</i>).
324 This allows styling the element as a block,
325 while correctly maintaining the internal ruby structure.
327 <p>See the <a href="http://www.w3.org/TR/css-display/">CSS Display Module</a>
328 for more information on 'display-inside' and 'display-outside'.
330 <h3 id="pairing">
331 Ruby Pairing and Annotation Levels</h3>
333 <p>Within a ruby structure,
334 each <i>ruby base</i> is associated with <i>ruby annotations</i>
335 and vice versa.
336 A <i>ruby base</i> can be associated with at most one <i>ruby annotation</i> per annotation level.
337 If there are multiple annotation levels, it can therefore be associated with multiple <i>ruby annotations</i>.
338 A <i>ruby annotation</i> is associated with one or more <i>ruby bases</i>;
339 annotations can span multiple bases.
341 <p><dfn>Annotation pairing</dfn> is the process of associating
342 <i>ruby annotations</i> with <i>ruby bases</i>.
344 <ol>
345 <li>
346 <p>First, the ruby structure is divided into <i>ruby segments</i>,
347 each consisting of a single <i>ruby base container</i>
348 followed by one or more <i>ruby annotation containers</i>.
349 If the first child of a <i>ruby container</i> is a <i>ruby annotation container</i>,
350 an anonymous, empty <i>ruby base container</i> is assumed to exist before it.
351 Similarly, if the <i>ruby container</i> contains consecutive <i>ruby base containers</i>,
352 anonymous, empty <i>ruby annotation containers</i> are assumed to exist between them.
353 The <i>ruby base container</i> in each segment is thus associated
354 with each of the <i>ruby annotation containers</i> in that segment.
356 <p>Each <i>ruby annotation containers</i> in a <i>ruby segment</i>
357 represents one <dfn title="annotation level | level">level</dfn> of annotation:
358 the first one represents the first level of annotation,
359 the second one represents the second level of annotation,
360 and so on.
362 <li>Within each <i>ruby segment</i>,
363 each <i>ruby base box</i> in the <i>ruby base container</i>
364 is paired with one <i>ruby annotation box</i>
365 from each <i>ruby annotation container</i> in its <i>ruby segment</i>.
366 If there are not enough <i>ruby annotations</i> in a <i>ruby annotation container</i>,
367 the last one is associated with any excess <i>ruby bases</i>.
368 (If there are not any in the <i>ruby annotation container</i>, an anonymous empty one is assumed to exist.)
369 If there are not enough <i>ruby bases</i>,
370 any remaining <i>ruby annotations</i> are assumed to be associated
371 with empty, anonymous bases inserted at the end of the <i>ruby base container</i>.
373 <p>If an implementation supports ruby markup with explicit spanning
374 (e.g. XHTML Complex Ruby Annotations),
375 it must adjust the pairing rules to pair spanning annotations to multiple bases
376 appropriately.
377 </ol>
379 <p>A this point, ruby “columns” are defined,
380 each represented by a single <i>ruby base</i>
381 and associated with one <i>ruby annotation</i> (possibly an empty, anonymous one)
382 from each <i>annotation level</i>.
384 <h4 id="nested-pairing">
385 Nested Ruby</h4>
387 <p>When <i>ruby containers</i> are nested,
388 pairing begins with the deepest <i>ruby container</i>,
389 then expands out,
390 treating each <i>ruby container</i> nested within another <i>ruby container</i>
391 essentially as a single <i>ruby base</i> in the outer <i>ruby container</i>,
392 and associating each <i>ruby annotation</i>
393 paired with the nested <i>ruby container</i>
394 as being associated with (spanning) all of its <i>ruby bases</i>.
396 <p>Using nested <i>ruby containers</i> thus allows the representation
397 of complex spanning relationships.
399 <p class="issue">This has to be Level 1 because HTML5 allows it, so we have to handle it. Yay HTML5.
401 <h3 id="autohide">
402 Autohiding Annotations</h3>
404 <p>If a <i>ruby annotation</i> has the exact same text content as its base,
405 it is <dfn title="hidden ruby annotation | hidden annotation">hidden</dfn>.
406 Hiding a <i>ruby annotation</i> does not affect annotation pairing
407 or the block-axis positioning of boxes in other <i>levels</i>.
408 However the <i>hidden annotation</i> is not visible,
409 and it has no impact on layout
410 other than to separate adjacent sequences of <i>ruby annotation boxes</i> within its level,
411 as if they belonged to separate segments
412 and the <i>hidden annotation</i>’s base were not a <i>ruby base</i> but an intervening inline.
414 <div class="example">
415 <p>This is to allow correct inlined display of annotations
416 for Japanese words that are a mix of kanji and hirangana.
417 For example, the word <i>振り仮名</i> should be inlined as
418 <p class="figure">振り仮名(ふりがな)
419 <p>and therefore marked up as
420 <pre>
421 <!-- --><ruby>
422 <!-- --> <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
423 <!-- --> <rp>(</rp><rt>ふ</rt><rt>り</rt><rt>が</rt><rt>な</rt><rp>)</rp>
424 <!-- --><ruby></pre>
425 <p>However, when displayed as ruby, the “り” should be hidden
426 <div class="figure">
427 <p><img src="images/furigana-separate.png"
428 alt="Hiragana annotations for 振り仮名 appear, each above its base character.">
429 <p class="caption">Hiragana ruby for 振り仮名
430 </div>
431 </div>
433 <p class="note">
434 Future levels of CSS Ruby may add controls for this,
435 but in this level it is always forced.
437 <p>The content comparison for this auto-hiding behavior
438 takes place prior to white space collapsing
439 and ignores elements (considers only the <code>textContent</code> of the boxes).
440 <p class="issue">Is before or after white space collapsing easier? We should do whatever is easier, as it really doesn't matter much which way to go.
442 <h3 id="white-space">
443 White Space</h3>
445 <p><i>Collapsible</i> white space within a ruby structure is discarded
446 <ul>
447 <li>at the beginning and end of a <i>ruby container</i>, <i>ruby annotation container</i>, or <i>ruby base container</i>,
448 <li>at the beginning/end of a <i>ruby annotation box</i> or <i>ruby base box</i> if white space is not its only contents,
449 <li>between a <i>ruby base container</i> and its following <i>ruby annotation container</i>,
450 <li>between <i>ruby annotation containers</i>.
451 </ul>
453 <p>Between <i>ruby segments</i>, between <i>ruby bases</i>, and between <i>ruby annotations</i>, however,
454 white space is not discarded.
456 <p>Where undiscarded white space is <i>collapsible</i>, it will collapse
457 following the standard <a href="http://www.w3.org/TR/css3-text/#white-space-rules">white space processing rules</a>. [[!CSS3TEXT]]
458 For <i>collapsible</i> white space between <i>ruby segments</i>, however,
459 the contextual text for determining collapsing behavior is given by the <i>ruby bases</i> on either side,
460 not the text on either side of the white space in the source document.
462 <div class="note">
463 <p>Note that the white space processing rules
464 cause a white space sequence containing a <i>segment break</i> (such as a line feed)
465 to <a href="http://www.w3.org/TR/css3-text/#line-break-transform">collapse to nothing</a> between CJK characters.
466 This means that CJK ruby can safely use white space for indentation of the ruby markup.
467 For example, the following markup will display without any spaces:
468 <pre>
469 <!-- --><ruby>
470 <!-- --> <rb>東</rb><rb>京</rb>
471 <!-- --> <rt>とう</rt><rt>きょう</rt>
472 <!-- --></ruby></pre>
473 <p>However, white space that does not contain a <i>segment break</i> does not collapse completely away,
474 so this markup will display with a space between the first and second ruby pairs:
475 <pre>
476 <!-- --><ruby>
477 <!-- --> <rb>東</rb> <rb>京</rb>
478 <!-- --> <rt>とう</rt> <rt>きょう</rt>
479 <!-- --></ruby></pre>
480 </div>
482 <p>Any preserved white space is then wrapped in an anonymous box belonging to
483 the <i>ruby base container</i> (if between <i>ruby bases</i>),
484 <i>ruby annotation container</i> (if between <i>ruby annotations</i>),
485 or <i>ruby container</i> (if between <i>ruby segments</i>).
486 In the latter case, the text is considered part of the <i>base level</i>.
487 Such anonynmous boxes do not take part in pairing.
488 They merely ensure separation between adjacent bases/annotations.
490 <p class="issue">Specify how these anonymous white space boxes impact layout.
492 <div class="example">
493 <p>These rules allow ruby to be used with space-separated scripts such as Latin.
494 For example,
495 <pre>
496 <!-- --><ruby>
497 <!-- --> <rb>W</rb><rb>W</rb><rb>W</rb>
498 <!-- --> <rt>World</rt> <rt>Wide</rt> <rt>Web</rt>
499 <!-- --></ruby></pre>
500 <p>They also ensure that annotated white space is preserved. For example,
501 <pre>
502 <!-- --><ruby>
503 <!-- --> <rb>Aerith</rb><rb> </rb><rb>Gainsboro</rb>
504 <!-- --> <rt>エアリス</rt><rt>・</rt><rt>ゲインズブール</rt>
505 <!-- --></ruby></pre>
506 </div>
508 <h3 id="ruby-layout">
509 Ruby layout</h3>
511 <p>When a ruby structure is laid out,
512 its base level is laid out on the line,
513 aligned according to its 'vertical-align' property
514 exactly as if its <i>bases</i> were a regular sequence of <i>inline</i> boxes.
515 Each <i>ruby base container</i> is sized and positioned
516 to contain exactly the full height of its <i>ruby bases</i>.
518 <p><i>Ruby annotations</i> associated with the base level
519 are then positioned with respect to their <i>ruby base boxes</i>
520 according to the applicable 'ruby-position' values.
521 <i>Ruby annotations</i> within a level (within a single <i>ruby container</i>)
522 are aligned to each other as if they were inline boxes
523 participating in the same inline formatting context.
524 Each <i>ruby annotation container</i> is sized and positioned
525 to contain exactly the full height of its <i>ruby annotations</i>.
527 <p>A ruby container (or fragment thereof)
528 measures as wide as the content of its widest level.
529 Similarly, <i>ruby base boxes</i> and <i>ruby annotation boxes</i>
530 within a ruby “column” have the measure of the widest content in that “column”.
531 In the case of spanning <i>annotations</i>
532 (whether actually spanning or pretending to span per 'ruby-collapse'),
533 the measures of the <i>ruby annotation box</i> and
534 the sum of its associated <i>ruby base boxes</i> must match.
536 <p>How the extra space is distributed
537 when ruby content is narrower than the measure of its box
538 is specified by the 'ruby-align' property.
540 <h4 id="inter-character-layout">
541 Inter-character ruby layout</h4>
543 <p>Inter-character annotations have special layout.
544 When 'ruby-position' indicates ''inter-character'' annotations,
545 the affected <i>annotation boxes</i>
546 are spliced into and measured as part of the layout of the base level.
547 The <i>ruby base container</i> must be sized to include both the <i>base boxes</i>
548 as well as the ''inter-character'' <i>annotation boxes</i>.
549 The affected <i>ruby annotation container</i> is similarly sized
550 so that its content box coincides with that of the <i>ruby base container</i>.
552 <p>For the purpose of laying out other levels of annotations,
553 an ''inter-character'' annotation effectively becomes part of its base.
554 <span class="issue">Or should it become a quasi-base between two bases?</span>
555 A spanning ''inter-character'' annotation is placed after
556 all the bases that it spans.
558 <h3 id="box-style">
559 Styling Ruby Boxes</h3>
561 <p>In most respects, ruby boxes can be styled similar to inline boxes.
562 However, the UA is not required to support
563 any of the box properties (borders, margins, padding),
564 any of the background properties or outline properties,
565 or any other property that illustrates the bounds of the box
566 on <i>ruby base container boxes</i>, <i>ruby annotation container boxes</i>,
567 or <a href="#nested-pairing">ruby-internal <i>ruby container boxes</i></a>.
568 The UA may implement these boxes simply as abstractions for inheritance
569 and control over the layout of their contents.
571 <h3 id="line-breaks">
572 Ruby box and line breaking</h3>
574 <p>When there is not enough space for an entire <i>ruby container</i> to fit on the line,
575 the ruby may be broken wherever all levels simultaneously allow a break.
576 Ruby most often breaks between base-annotation sets,
577 but if the line-breaking rules allow it, can also break within a <i>ruby base</i>
578 (and, in parallel, its associated <i>annotation boxes</i>).
580 <p>Whenever ruby breaks across lines, <i>ruby annotations</i> must stay
581 with their respective <i>bases</i>.
582 The line <em>must not</em> break between a <i>ruby base</i> and its <i>annotations</i>,
583 even in the case of ''inter-character'' <i>annotations</i>.
585 <div class="figure">
586 <img src="images/r-break-b.gif"
587 alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
588 <p class="caption">''inter-character'' ruby line breaking opportunity
589 </div>
591 <h4 id="break-between">
592 Breaking between bases</h4>
594 <p>In typical cases, <i>ruby base boxes</i> and <i>ruby annotation boxes</i>
595 are styled to forbid internal line wrapping and do not contain forced breaks.
596 (See <a href="#default-stylesheet">Appendix A</a>.)
597 In such cases the <i>ruby container</i> can only break between adjacent <i>ruby bases</i>,
598 and only if no <i>ruby annotations</i> span those <i>ruby bases</i>.
600 <div class="figure">
601 <p><img src="images/r-break-a.gif"
602 alt="Diagram showing the line breaking opportunity in a complex ruby">
603 <p class="caption">Ruby line breaking opportunity
604 </div>
606 <p>Whether ruby can break between two adjacent <i>ruby bases</i>
607 is controlled by normal line-breaking rules for the base text,
608 exactly as if the <i>ruby bases</i> were adjacent <i>inline</i> boxes.
609 (The annotations are ignored when determining soft wrap opportunities for the base level.)
611 <div class="example">
612 <p>For example, if two adjacent ruby bases are “蝴” and “蝶”,
613 the line may break between them,
614 because lines are normally allowed to break between two Han characters.
615 However, if 'word-break' is ''keep-all'', that line break is forbidden.
616 <pre><ruby>蝴<rt>hú</rt>蝶<rt>dié</rt></pre>
617 </div>
619 <p>Inter-base white space is significant for evaluating line break opportunities between <i>ruby bases</i>.
620 As with white space between inlines, it collapses when the line breaks there.
621 Similarly, annotation white space is also trimmed at a line break.
623 <div class="example">
624 <p>For example, given the following markup:
625 <pre><ruby><rb>one</rb> <rb>two</rb> <rt>1</rt> <rt>2</rt></ruby></pre>
626 <p>Due to the space, the line may break between “one” and “two“.
627 If the line breaks there, that space—and the space between “1” and “2”—disappears,
628 in accordance with standard CSS white space processing rules. [[CSS3TEXT]]
629 </div>
631 <h4 id="break-within">
632 Breaking within bases</h4>
634 <p>For longer base texts, it is sometimes appropriate to allow breaking within a base-annotation pair.
635 For example, if an English sentence is annotated with its Japanese translation,
636 allowing the text to wrap allows for reasonable line breaking behavior in the paragraph.
638 <p class="issue">
639 Insert scanned example so people don't think this is just the ramblings of an insane spec-writer.
641 <p>Line-breaking within a <i>ruby base</i> is only allowed if the 'white-space' property
642 of the <i>ruby base</i> and all its parallel <i>annotations</i> allow it,
643 and there exists a <i>soft wrap opportunity</i> <em>within</em> (i.e. not at the start or end)
644 the content of each base/annotation box.
645 Since there is no structural correspondance between fragments of content
646 within <i>ruby bases</i> and <i>annotations</i>,
647 the UA may break at any set of opportunities;
648 but it is recommended that the UA attempt to proportionally balance
649 the amount of content inside each fragment.
651 <p>There are no line breaking opportunities within ''inter-character'' <i>annotations</i>.
653 <p>Ruby alignment takes place within each fragment, after line-breaking.
655 <h3 id="ruby-bidi">
656 Bidi Reordering</h3>
658 <p class="issue">
659 Constraints:
660 Text within a ruby base must remain contiguous,
661 and bases belonging to a single annotation must remain contiguous.
662 Still figuring out exactly to enforce these limitations in a sensible manner.
664 <!--
666 <p>The Unicode bidirectional algorithm orders logically-stored text for visual presentation
667 when characters from scripts of opposing directionalities are mixed
668 within a single paragraph.
669 (See [[CSS3-WRITING-MODES]] for a more in-depth discussion of bidirectional text in CSS.)
670 Bidi reordering of ruby-annotation pairs is controlled by the ordering of the base text, as follows:
672 <h4 id="bidi-B">Proposal A</h4>
674 <p class="note">This proposal is simpler, but will require more frequent tagging of mixed-directionality content.
676 <p>To avoid the interference of the <i>annotations</i> in the ordering of base text,
677 all annotations are ignored for the purpose of resolving neutral characters in the base level.
679 <p>To preserve the correspondance of <i>ruby annotations</i>
680 to their respective <i>ruby bases</i>,
681 a few restrictions are imposed:
682 <ul>
683 <li>The contents of a <i>ruby base</i> or <i>ruby annotation</i> must remain contiguous.
684 To this end, the contents of each <i>ruby base</i> and <i>ruby annotation</i> are treated as if within a <i>bidi isolation</i>.
685 <li>For the purpose of ordering <i>ruby bases</i> within a <i>ruby container</i>,
686 each <i>ruby base</i> is treated as a strong character of its specified 'direction'.
687 (<i>Ruby annotations</i> are positioned with respect to their <i>bases</i>,
688 so are affected by reordering, but do not themselves participate in reordering.)
689 <li>All <i>bases</i> spanned by a single <i>annotation</i> must remain contiguous.
690 To this end, the embedding level of all bases spanned by a spanning <i>annotation</i>
691 is increased by two prior to reordering.
692 </ul>
694 <h4 id="bidi-B">Proposal B</h4>
696 <p class="note">This preserves some aspects of implicit bidi.
697 For example, annotating each half of "first-second" would not cause the word to reverse itself to "second-first" within an opposite-order paragraph.
699 <p>To avoid the interference of the <i>annotations</i> in the ordering of the base text,
700 all annotations are ignored for the purpose of resolving neutral characters in the base text;
701 and the base text is resolved exactly as if each <i>ruby base</i> were
702 just a normal <i>inline box</i> embedded in the <i>ruby container</i>'s inline formatting context.
704 <p>Furthermore, to preserve the correspondance of <i>ruby annotations</i>
705 to their respective <i>ruby bases</i>,
706 a few restrictions are imposed:
707 <ul>
708 <li>The contents of a <i>ruby base</i> must remain contiguous.
709 <li>All <i>bases</i> spanned by a single <i>annotation</i> must remain contiguous.
710 </ul>
711 <p>To this end, the text of <i>ruby base</i> boxes that are not <i>bidi-isolated</i>
712 must have its embedding level increased by two;
713 and if an <i>annotation</i> spans more than one <i>ruby base</i>,
714 the spanned text's embedding level
715 (or the embedding level assigned to the isolation, if the <i>ruby base</i> is <i>bidi-isolated</i>)
716 is further increased by two.
718 -->
720 <h3 id="line-height">
721 Ruby box and line stacking</h3>
723 <p>The 'line-height' property controls spacing between lines in CSS.
724 When inline content on line is shorter than the 'line-height',
725 half-leading is added on either side of the content,
726 as specificed in <a href="http://www.w3.org/TR/CSS21/visudet.html#line-height">CSS2.1§10.8</a>. [[!CSS21]]
728 <p>In order to ensure consistent spacing of lines,
729 documents with ruby typically ensure that the 'line-height' is large enough
730 to accommodate ruby between lines of text.
731 Therefore, ordinarily, <i>ruby annotation containers</i> and <i>ruby annotation boxes</i>
732 do not contribute to the measured height of a line's inline contents;
733 any alignment (see 'vertical-align') and line-height calculations
734 are performed using only the <i>ruby base container</i>,
735 exactly as if it were a normal inline.
737 <p>However, if the 'line-height' specified on the <i>ruby container</i>
738 is less than the distance between
739 the top of the top <i>ruby annotation container</i>
740 and the bottom of the bottom <i>ruby annotation container</i>,
741 then additional leading is added
742 on the appropriate side of the <i>ruby base container</i>
743 such that if a block consisted of three lines
744 each containing ruby identical to this,
745 none of the <i>ruby containers</i> would overlap.
747 <p class="note">Note that this does not ensure that the <i>ruby annotations</i> remain within the line box.
748 It merely ensures that <em>if all lines had equal spacing</em>
749 and equivalent amounts and positioning of <i>ruby annotations</i>,
750 there would be enough room to avoid overlap.
752 <p>Authors should ensure appropriate 'line-height' and 'padding' to accommodate ruby,
753 and be particularly careful at the beginning or end of a block
754 and when a line contains inline-level content
755 (such as images, inline blocks, or elements shifted with 'vertical-align')
756 taller than the paragraph's default font size.
758 <div class="figure">
759 <p><img src="images/rlh-a.gif"
760 alt="The content of each line sits in the middle of its line height;
761 the additional space on each side is called half-leading.
762 Ruby fits between lines if it is smaller than twice the half-leading,
763 but this means that it occupies space belonging to the half-leading of the previous line.">
764 <p class="caption">Ruby annotations will often overflow the line;
765 authors should ensure content over/under a ruby-annotated line
766 is adequately spaced to leave room for the ruby.
767 </div>
769 <p class="note">More control over how ruby affects alignment and line layout
770 will be part of the CSS Line Layout Module Level 3.
771 Note, it is currently in the process of being rewritten;
772 the current drafts should not be relied upon.
774 <h2 id="ruby-props">
775 Ruby Properties</h2>
777 <p>The following properties are introduced to control ruby positioning and alignment.
779 <h3 id="rubypos">
780 Ruby positioning: the 'ruby-position' property</h3>
782 <table class="propdef">
783 <tr>
784 <th>Name:
785 <td><dfn>ruby-position</dfn>
786 <tr>
787 <th><a href="#values">Value</a>:
788 <td>[ over | under | inter-character ] && [ right | left ]
789 <tr>
790 <th>Initial:
791 <td>over right
792 <tr>
793 <th>Applies to:
794 <td>ruby annotation containers
795 <tr>
796 <th>Inherited:
797 <td>yes
798 <tr>
799 <th>Percentages:
800 <td>N/A
801 <tr>
802 <th>Media:
803 <td>visual
804 <tr>
805 <th>Computed value:
806 <td>specified value
807 <tr>
808 <th>Animatable:
809 <td>no
810 <tr>
811 <th>Canonical order:
812 <td><abbr title="follows order of property value definition">per grammar</abbr>
813 </table>
815 <p>This property controls position of the ruby text with respect to its base.
816 Values have the following meanings:
818 <p class="issue"><span class="issuehead">Issue-107: </span> Roland Steiner has requested the addition of an auto value as default. See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=ruby-position%3A+undesirable+default+value+%27before%27+for+complex+ruby&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&period_month=&period_year=&index-grp=Public__FULL&index-type=t&type-index=www-style&resultsperpage=20&sortby=date">this thread</a> and <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=Styling+of+complex+Ruby&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&period_month=&period_year=&index-grp=Public__FULL&index-type=t&type-index=public-i18n-core&resultsperpage=20&sortby=date">this one</a>.</p>
819 <dl>
820 <dt><dfn title="ruby-position:over">''over''</dfn>
821 <dd>The ruby text appears <i>over</i> the base in horizontal text.
823 <div class="figure">
824 <p><img src="images/shinkansen-top.gif"
825 alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing above the base">
826 <p class="caption">Ruby over Japanese base text in horizontal layout
827 </div>
828 </dd>
830 <dt><dfn title="ruby-position:right">''right''</dfn>
831 <dd>The ruby text appears on the right side of the base in vertical text.
832 <div class="figure">
833 <p><img src="images/shinkansen-right.gif" width="33"
834 alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the right of the base">
835 <p class="caption">Ruby to the right of Japanese base text in vertical layout
836 </div>
837 </dd>
839 <dt><dfn title="ruby-position:under">''under''</dfn>
840 <dd>The ruby text appears under the base in horizontal text.
841 This is a relatively rare setting used in ideographic East Asian writing systems,
842 most easily found in educational text.
844 <div class="figure">
845 <p><img src="images/shinkansen-bottom.gif"
846 alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing below the base">
847 <p class="caption">Ruby under Japanese base text in horizontal layout
848 </div>
849 </dd>
851 <dt><dfn title="ruby-position:left">''left''</dfn>
852 <dd>The ruby text appears on the left side of the base in vertical text.
854 <div class="figure">
855 <p><img src="images/shinkansen-left.gif"
856 alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the left of the base">
857 <p class="caption">Ruby to the left of Japanese base text in vertical layout
858 </div>
859 </dd>
861 <dt><dfn title="ruby-position:inter-character">''inter-character''</dfn></dt>
862 <dd>
863 <p>The ruby text appears on the right of the base in horizontal text.
864 This value forces the 'writing-mode' of the <i>ruby annotation</i> to be vertical.
866 <p>This value is provided for the special case of traditional Chinese
867 as used especially in Taiwan:
868 ruby (made of <a href="#g-bopomofo">bopomofo</a> glyphs) in that context
869 appears vertically along the right side of the base glyph,
870 even when the layout of the base characters is horizontal:
872 <div class="figure">
873 <p><img src="images/bopomofo.gif"
874 alt="Example of Taiwanese-style ruby">
875 <p class="caption">“Bopomofo” ruby in traditional Chinese
876 (ruby text shown in blue for clarity) in horizontal layout
877 </div>
878 <p class="note">
879 Note that the user agent is responsible for ensuring the correct relative alignment and positioning of the glyphs,
880 including those corresponding to the tone marks, when displaying.
881 Tone marks are spacing characters that occur (in memory) at the end of the ruby text for each base character.
882 They are usually displayed in a separate column to the right of the bopomofo characters,
883 and the height of the tone mark depends on the number of characters in the syllable.
884 One tone mark, however, is placed above the bopomofo, not to the right of it.
885 <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
886 </dd>
887 </dl>
889 <p>If multiple <i>ruby annotation containers</i> have the same 'ruby-position',
890 they stack along the block axis,
891 with lower levels of annotation closer to the base text.
893 <h3 id="collapsed-ruby">
894 Collapsed Ruby Annotations: the 'ruby-merge' property</h3>
896 <table class="propdef">
897 <tr>
898 <th>Name:
899 <td><dfn>ruby-merge</dfn>
900 <tr>
901 <th><a href="#values">Value</a>:
902 <td>separate | collapse | auto
903 <tr>
904 <th>Initial:
905 <td>separate
906 <tr>
907 <th>Applies to:
908 <td>ruby annotation containers
909 <tr>
910 <th>Inherited:
911 <td>yes
912 <tr>
913 <th>Percentages:
914 <td>N/A
915 <tr>
916 <th>Media:
917 <td>visual
918 <tr>
919 <th>Computed value:
920 <td>specified value
921 <tr>
922 <th>Animatable:
923 <td>no
924 <tr>
925 <th>Canonical order:
926 <td><abbr title="follows order of property value definition">per grammar</abbr>
927 </table>
929 <p>
930 This property controls how ruby annotation boxes should be rendered
931 when there are more than one in a ruby container box.
933 <p>Possible values:</p>
934 <dl>
935 <dt><dfn title="ruby-merge:separate">''separate''</dfn>
936 <dd>
937 <p>
938 Each ruby annotation box is rendered in the same column(s) as its corresponding base box(es).
939 This style is called “mono ruby” in [[JLREQ]].
941 <div class="example">
942 <p>For example, the following two markups render the same:
943 <pre><ruby>無<rt>む</ruby><ruby>常<rt>じょう</ruby></pre>
944 <p>and:
945 <pre><ruby style="ruby-merge:separate"><rb>無<rb>常<rt>む<rt>じょう</ruby></pre>
946 </div>
947 </dd>
949 <dt><dfn title="ruby-merge:collapse">''collapse''</dfn>
950 <dd>
951 <p>
952 All <i>ruby annotation boxes</i> within the same <i>ruby segment</i> on the same line are concatenated,
953 and laid out as if their contents belonged to a single <i>ruby annotation box</i>
954 spanning all their associated <i>ruby base boxes</i>.
955 This style renders similar to “group ruby” in [[JLREQ]],
956 except that <i>ruby annotations</i> are kept together with their respective <i>ruby bases</i> when breaking lines.
957 </p>
959 <div class="example">
960 <p>The following two markups render the same both characters fit on one line:
961 <pre><ruby>無常<rt>むじょう</ruby></pre>
962 <p>and:
963 <pre><ruby style="ruby-merge:collapse"><rb>無<rb>常<rt>む<rt>じょう</ruby></pre>
964 <p>However, the second one renders the same as ''ruby-position: separate''
965 when the two bases are split across lines.
966 </div>
967 </dd>
969 <dt><dfn title="ruby-merge:auto">''auto''</dfn></dt>
970 <dd>
971 <p>
972 The user agent may use any algorithm to determine how each ruby annotation box
973 is rendered to its corresponding base box,
974 with the intention that if all annotations fit over their respective bases,
975 the result is identical to “mono ruby”,
976 but if some annotations are wider than their bases
977 the space is shared in some way
978 to avoid forcing space between bases.
979 <div class="example">
980 <p>
981 One possible algorithm is described as “jukugo ruby” in [[JLREQ]].
982 <p>
983 Another, more simplified algorithm of “jukugo ruby” is
984 to render as ''separate'' if all ruby annotation boxes fit
985 within the advances of their corresponding base boxes,
986 and render as ''collapse'' otherwise.
987 </p>
988 </div>
989 </dd>
990 </dl>
992 <h3 id="ruby-align-property"><a id="rubyalign"></a>
993 Ruby Text Distribution: the 'ruby-align' property</h3>
995 <table class="propdef">
996 <tr>
997 <th>Name:
998 <td><dfn>ruby-align</dfn>
999 <tr>
1000 <th><a href="#values">Value</a>:
1001 <td>start | center | space-between | space-around
1002 <tr>
1003 <th>Initial:
1004 <td>space-around
1005 <tr>
1006 <th>Applies to:
1007 <td>ruby bases, ruby annotations, ruby base containers, ruby annotation containers
1008 <tr>
1009 <th>Inherited:
1010 <td>yes
1011 <tr>
1012 <th>Percentages:
1013 <td>N/A
1014 <tr>
1015 <th>Media:
1016 <td>visual
1017 <tr>
1018 <th>Computed value:
1019 <td>specified value (except for initial and inherit)
1020 </table>
1022 <p>This property specifies how text is distributed within the various ruby boxes
1023 when their contents do not exactly fill their respective boxes.
1024 Note that space distributed by 'ruby-align' is unrelated to, and independent of,
1025 any space distributed due to justification.
1027 <p>Values have the following meanings:
1028 <dl>
1029 <dt><dfn title="ruby-align:start">''start''</dfn></dt>
1030 <dd>The ruby content is aligned with the start edge of its box.
1031 <div class="figure">
1032 <p><img
1033 alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base"
1034 width="145" height="91" src="images/ra-l.gif" /><img
1035 width="145" height="91"
1036 alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base"
1037 src="images/ra-l-rb.gif" />
1038 <p class="caption">''start'' ruby distribution
1039 </div>
1040 </dd>
1042 <dt><dfn title="ruby-align:center">''center''</dfn></dt>
1043 <dd>The ruby content is centered within its box.
1044 <div class="figure">
1045 <p><img width="145" height="91"
1046 alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base"
1047 src="images/ra-c.gif" /><img width="145" height="91"
1048 alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base"
1049 src="images/ra-c-rb.gif" />
1050 <p class="caption">''center'' ruby distribution
1051 </div>
1052 </dd>
1054 <dt><dfn title="ruby-align:space-between">''space-between''</dfn></dt>
1055 <dd>
1056 <p>The ruby content expands as defined for normal text justification
1057 (as defined by 'text-justify'),
1058 except that if there are no <a href="http://www.w3.org/TR/css3-text/#expansion-opportunity"><i>expansion opportunities</i></a>
1059 the content is centered.
1060 <div class="figure">
1061 <p><img width="145" height="91"
1062 alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base"
1063 src="images/ra-dl.gif" /><img width="145" height="91"
1064 alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base"
1065 src="images/ra-dl-rb.gif" />
1066 <p class="caption">''space-between'' ruby distribution
1067 </div>
1068 </dd>
1070 <dt><dfn title="ruby-align:space-around">''space-around''</dfn></dt>
1071 <dd>
1072 <p>As for ''space-between''
1073 except that there exists an extra <a href="http://www.w3.org/TR/css3-text/#expansion-opportunity"><i>expansion opportunity</i></a>
1074 whose space is distributed half before and half after the ruby content.
1075 <div class="example">
1076 <p>Since a typical implementation will by default define <i>expansion opportunities</i>
1077 between every adjacent pair of CJK <i>characters</i>
1078 and not between adjacent pairs of Latin <i>characters</i>,
1079 this should result in the behavior recommended by [[JLREQ]]:
1080 for wide-cell ruby content to be distributed...
1081 <div class="figure">
1082 <p><img width="145" height="91"
1083 alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base"
1084 src="images/ra-ds.gif" /><img width="145" height="91"
1085 alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base"
1086 src="images/ra-ds-rb.gif" />
1087 <p class="caption">Wide-cell text in ''space-around'' ruby distribution is spaced apart
1088 </div>
1089 <p>... and narrow-cell glyph ruby to be centered.
1090 <div class="figure">
1091 <p><img
1092 alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base"
1093 width="145" height="91"
1094 src="images/ra-c-h.gif" /><img
1095 alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base"
1096 width="145" height="91"
1097 src="images/ra-c-rb-h.gif" />
1098 <p class="caption">Narrow-width ruby text in ''space-around'' ruby distribution is centered
1099 </div>
1100 </div>
1101 </dd>
1102 </dl>
1104 <p class="issue">Add a paragraph explaining how to distribute space in situations with spanning annotations.
1105 <!--
1106 <p>For a complex ruby with spanning elements, one additional consideration is
1107 required. If the spanning element spans multiple 'rows' (other rbc or rtc
1108 elements), and the ruby alignment requires space distribution among the
1109 'spanned' elements, a ratio must be determined among the 'columns' of spanned
1110 elements. This ratio is computed by taking into consideration the widest
1111 element within each column.</p>
1112 -->
1113 <h2 id="edge-effects">
1114 Edge Effects</h2>
1116 <h3 id="ruby-overhang">
1117 Overhanging Ruby</h3>
1119 <p>
1120 When <i>ruby annotation box</i> is longer than its corresponding <i>ruby base box</i>,
1121 the <i>ruby annotation box</i> may partially overhang adjacent boxes.
1122 </p>
1123 <p>
1124 This level of the specification does not define
1125 how much the overhang may be allowed, and under what conditions.
1126 </p>
1128 <p>If the ruby text is not allowed to overhang,
1129 then the ruby behaves like a traditional inline box,
1130 i.e. only its own contents are rendered within its boundaries
1131 and adjacent elements do not cross the box boundary:
1133 <div class="figure">
1134 <p><img src="images/ro-n.gif"
1135 alt="Diagram showing the ruby boxes interacting with adjacent text">
1136 <p class="caption">Simple ruby whose text is not allowed to overhang adjacent text
1137 </div>
1139 <p>However, if <i>ruby annotation</i> content is allowed to overhang adjacent elements
1140 and it happens to be wider than its base,
1141 then the adjacent content is partially rendered within the area of the <i>ruby container box</i>,
1142 while the <i>ruby annotation</i> may partially overlap the upper blank parts of the adjacent content:
1144 <div class="figure">
1145 <p><img src="images/ro-a.gif"
1146 alt="Diagram showing the ruby boxes interacting with adjacent text">
1147 <p class="caption">Simple ruby whose text is allowed to overhang adjacent text
1148 </div>
1150 <p>The <i>ruby annotations</i> related to a <i>ruby base</i>
1151 must never overhang another <i>ruby base</i>.
1153 <p>The alignment of the contents of the base or the ruby text
1154 is not affected by overhanging behavior.
1155 The alignment is achieved the same way regardless of the overhang behavior setting
1156 and it is computed before the space available for overlap is determined.
1157 It is controlled by the 'ruby-align' property.
1159 <p class="issue">
1160 I suspect overhanging interacts with alignment in some cases;
1161 might need to look into this later.
1163 <p>This entire logic applies the same way in vertical ideographic layout,
1164 only the dimension in which it works in such a layout is vertical,
1165 instead of horizontal.
1167 <div class="example">
1168 <p>
1169 The user agent may use [[JIS4051]] recommendation of
1170 using one ruby text character length as the maximum overhang length.
1171 Detailed rules for how ruby text can overhang adjacent characters for Japanese are described by [[JLREQ]].
1172 </p>
1173 </div>
1175 <h3 id="line-edge">
1176 Line-edge Alignment</h3>
1178 <p>
1179 When a <i>ruby annotation box</i> that is longer than its <i>ruby base</i>
1180 is at the start or end edge of a line,
1181 the user agent <em>may</em> force the side of the <i>ruby annotation</i> that touches the edge of the line
1182 to align to the corresponding edge of the base.
1183 This type of alignment is described by [[JLREQ]].
1184 </p>
1185 <p>
1186 This level of the specification does not provide a mechanism to control this behavior.
1187 </p>
1188 <div class="figure">
1189 <p><img src="images/ra-le-l.gif"
1190 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base">
1191 <img src="images/ra-le-r.gif"
1192 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base">
1193 <p class="caption">Line-edge alignment
1194 </div>
1196 <!--
1197 <h3 id="rubyover">
1198 Ruby overhanging: the 'ruby-overhang' property</h3>
1200 <table class="propdef">
1201 <tr>
1202 <th>Name:
1203 <td><dfn>ruby-overhang</dfn>
1204 <tr>
1205 <th>Value:
1206 <td>auto | start | end | none
1207 <tr>
1208 <th>Initial:
1209 <td>none
1210 <tr>
1211 <th>Applies to:
1212 <td>the parent of elements with display: ruby-text
1213 <tr>
1214 <th>Inherited:
1215 <td>yes
1216 <tr>
1217 <th>Percentages:
1218 <td>N/A
1219 <tr>
1220 <th>Media:
1221 <td>visual
1222 <tr>
1223 <th>Computed value:
1224 <td>specified value (except for initial and inherit)
1225 </table>
1227 <p>This property determines whether, and on which side, ruby text is allowed
1228 to partially overhang any adjacent text in addition to its own base, when the
1229 ruby text is wider than the ruby base. Note that ruby text is never allowed to
1230 overhang glyphs belonging to another ruby base. <span class="issue"><span class="issuehead">Issue: </span> This rule must be broken if we are to allow support for jukugo ruby.</span> Also the user agent is free to assume
1231 a maximum amount by which ruby text may overhang adjacent text. The user agent may use
1232 the [[JIS4051]] recommendation of using one ruby text character
1233 length as the maximum overhang length. Detailed rules for how ruby text can overhang adjacent characters for Japanese are described by [[JLREQ]].</p>
1235 <p>Possible values:</p>
1236 <dl>
1237 <dt><strong>auto</strong></dt>
1238 <dd>The ruby text can overhang text adjacent to the base on either side. [[JLREQ]] and [[JIS4051]] specify the categories of characters that
1239 ruby text can overhang. The user agent is free to follow those recommendations or specify its own classes of
1240 characters to overhang. This is the initial value.
1241 <div class="figure">
1242 <p><img class="example" width="177" height="91"
1243 alt="Diagram of glyph layout in overhanging ruby" src="images/ro-a.gif" /></p>
1244 <p><b>Figure 4.3.1</b>: Ruby overhanging adjacent text</p>
1245 </div>
1246 </dd>
1247 <dt><strong>start</strong></dt>
1248 <dd>The ruby text can only overhang the text that precedes it. That means, for
1249 example, that ruby cannot overhang text that is to the right of it in
1250 horizontal LTR layout, and it cannot overhang text that is below it in
1251 vertical-ideographic layout.
1252 <div class="figure">
1253 <p><img class="example" width="199" height="91"
1254 alt="Diagram of glyph layout when ruby overhangs the preceding glyphs only"
1255 src="images/ro-s.gif" /></p>
1256 <p><b>Figure 4.3.2</b>: Ruby overhanging preceding text only</p>
1257 </div>
1258 </dd>
1259 <dt><strong>end</strong></dt>
1260 <dd>The ruby text can only overhang the text that follows it. That means, for
1261 example, that ruby cannot overhang text that is to the left of it in
1262 horizontal LTR layout, and it cannot overhang text that is above it in
1263 vertical-ideographic layout.
1264 <div class="figure">
1265 <p><img class="example" width="198" height="91"
1266 alt="Diagram of glyph layout when ruby overhangs the following characters only"
1267 src="images/ro-e.gif" /></p>
1268 <p><b>Figure 4.3.3</b>: Ruby overhanging following text only</p>
1269 </div>
1270 </dd>
1271 <dt><strong>none</strong></dt>
1272 <dd>The ruby text cannot overhang any text adjacent to its base, only its
1273 own base.
1275 <div class="figure">
1276 <p><img class="example" width="220" height="91"
1277 alt="Diagram of glyph layout in non-overhanging ruby"
1278 src="images/ro-n.gif" /></p>
1279 <p><b>Figure 4.3.4</b>: Ruby not allowed to overhang adjacent text</p>
1280 </div>
1281 </dd>
1282 </dl>
1284 <h3 id="rubyspan">
1285 Ruby annotation spanning: the 'ruby-span' property</h3>
1287 <table class="propdef">
1288 <tr>
1289 <th>Name:
1290 <td><dfn>ruby-span</dfn>
1291 <tr>
1292 <th>Value:
1293 <td>attr(x) | none
1294 <tr>
1295 <th>Initial:
1296 <td>none
1297 <tr>
1298 <th>Applies to:
1299 <td>elements with display: ruby-text
1300 <tr>
1301 <th>Inherited:
1302 <td>no
1303 <tr>
1304 <th>Percentages:
1305 <td>N/A
1306 <tr>
1307 <th>Media:
1308 <td>visual
1309 <tr>
1310 <th>Computed value:
1311 <td><number>
1312 </table>
1314 <p>This property controls the spanning behavior of annotation elements. </p>
1316 <p class="note"><span class="note-label">Note:</span> A XHTML user agent may also use the <samp>rbspan</samp>
1317 attribute to get the same effect.</p>
1319 <p>Possible values:</p>
1321 <dl>
1322 <dt><strong>attr(x)</strong></dt>
1323 <dd>The value of attribute 'x' as a string value. The string value is
1324 evaluated as a <number> to determine the number of ruby base elements to be
1325 spanned by the annotation element. If the <number> is '0', it is replaced by
1326 '1'.The <number> is the computed value. </dd>
1327 <dt>none</dt>
1328 <dd>No spanning. The computed value is '1'.</dd>
1329 </dl>
1331 <p>The following example shows an XML example using the 'display' property
1332 values associated with the 'ruby structure and the 'ruby-span' property</p>
1333 <pre class="xml">myruby { display: ruby; }
1334 myrbc { display: ruby-base-container; }
1335 myrb { display: ruby-base; }
1336 myrtc.before { display: ruby-text-container; ruby-position: before}
1337 myrtc.after { display: ruby-text-container; ruby-position: after}
1338 myrt { display: ruby-text; ruby-span: attr(rbspan); }
1339 ...
1340 <myruby>
1341 <myrbc>
1342 <myrb>10</myrb>
1343 <myrb>31</myrb>
1344 <myrb>2002</myrb>
1345 </myrbc>
1346 <myrtc class="before">
1347 <myrt>Month</myrt>
1348 <myrt>Day</myrt>
1349 <myrt>Year</myrt>
1350 </myrtc>
1351 <myrtc class="after">
1352 <myrt rbspan="3">Expiration Date</myrt>
1353 </myrtc>
1354 </myruby></pre>
1355 -->
1357 <h2 id="default-stylesheet" class="no-num">
1358 Appendix A: Default Style Sheet</h2>
1360 <p><em>This section is informative.</em>
1362 <h3 id="default-ua-ruby" class="no-num">
1363 <span class="secno">A.1</span> Supporting Ruby Layout</h3>
1365 <p>The following represents a default UA style sheet
1366 for rendering HTML and XHTML ruby markup as ruby layout:
1368 <pre>
1369 <!-- -->ruby { display: ruby; }
1370 <!-- -->rb { display: ruby-base; white-space: nowrap; }
1371 <!-- -->rt { display: ruby-text; white-space: nowrap; font-size: 50%; }
1372 <!-- -->rbc { display: ruby-base-container; }
1373 <!-- -->rtc { display: ruby-text-container; }
1374 <!-- -->ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }</pre>
1376 <p>Additional rules for UAs supporting the relevant features of [[CSS3-TEXT-DECOR]] and [[CSS3-FONTS]]:
1377 <pre>rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre>
1379 <p class="note">Authors should not use the above rules;
1380 a UA that supports ruby layout should provide these by default.
1382 <h3 id="default-inline" class="no-num">
1383 <span class="secno">A.2</span> Inlining Ruby Annotations</h3>
1385 <p>The following represents a sample style sheet
1386 for rendering HTML and XHTML ruby markup as inline annotations:
1388 <pre>ruby, rb, rt, rbc, rtc, rp {
1389 <!-- --> display: inline; white-space: inherit;
1390 <!-- --> font-variant-east-asian: inherit; text-emphasis: inherit; }</pre>
1392 <h3 id="default-parens" class="no-num">
1393 <span class="secno">A.3</span> Generating Parentheses</h3>
1395 <p>Unfortunately, because Selectors cannot match against text nodes,
1396 it's not possible with CSS to express rules that will automatically and correctly
1397 add parentheses to unparenthesized ruby annotations in HTML.
1398 (This is because HTML ruby allows implying the <i>ruby base</i> from raw text, without a corresponding element.)
1399 However, these rules will handle cases where either <code><rb></code>
1400 or <code><rtc></code> is used rigorously.
1402 <pre>
1403 <!-- -->/* Parens around <rtc> */
1404 <!-- -->rtc::before { content: "("; }
1405 <!-- -->rtc::after { content: ")"; }
1407 <!-- -->/* Parens before first <rt> not inside <rtc> */
1408 <!-- -->rb + rt::before,
1409 <!-- -->rtc + rt::before { content: "("; }
1411 <!-- -->/* Parens after <rt> not inside <rtc> */
1412 <!-- -->rb ~ rt:last-child::after,
1413 <!-- -->rt + rb::before { content: ")"; }
1414 <!-- -->rt + rtc::before { content: ")("; }</pre>
1416 <h2 id="glossary">
1417 Glossary</h2>
1418 <dl>
1419 <dt><a id="g-bopomofo"><strong><span
1420 lang="zh">Bopomofo</span></strong></a></dt>
1421 <dd>37 characters and 4 tone markings used as phonetics in Chinese,
1422 especially standard Mandarin.</dd>
1423 <dt><a id="g-hanja"><strong><span
1424 lang="ko">Hanja</span></strong></a></dt>
1425 <dd>Subset of the Korean writing system that utilizes ideographic
1426 characters borrowed or adapted from the Chinese writing system. Also see
1427 <a href="#g-kanji"><span lang="ja">Kanji</span></a>.</dd>
1428 <dt><a id="g-hiragana"><strong><span
1429 lang="ja">Hiragana</span></strong></a></dt>
1430 <dd>Japanese syllabic script, or character of that script. Rounded and
1431 cursive in appearance. Subset of the Japanese writing system, used together
1432 with kanji and katakana. In recent times, mostly used to write Japanese
1433 words when kanji are not available or appropriate, and word endings and
1434 particles. Also see <a
1435 href="#g-katakana"><span lang="ja">Katakana</span></a>.</dd>
1436 <dt><a id="g-ideogram"><strong>Ideograph</strong></a></dt>
1437 <dd>A character that is used to represent an idea, word, or word component,
1438 in contrast to a character from an alphabetic or syllabic script. The most
1439 well-known ideographic script is used (with some variation) in East Asia
1440 (China, Japan, Korea,...).</dd>
1441 <dt><a id="g-kana"><strong><span lang="ja">Kana</span></strong></a></dt>
1442 <dd>Collective term for hiragana and katakana.</dd>
1443 <dt><a id="g-kanji"><strong>Kanji</strong></a></dt>
1444 <dd>Japanese term for ideographs; ideographs used in Japanese. Subset of the
1445 Japanese writing system, used together with hiragana and katakana. Also see <a
1446 href="#g-hanja"><span lang="ko">Hanja</span></a>.</dd>
1447 <dt><a id="g-katakana"><strong><span
1448 lang="ja">Katakana</span></strong></a></dt>
1449 <dd>Japanese syllabic script, or character of that script. Angular in
1450 appearance. Subset of the Japanese writing system, used together with
1451 kanji and hiragana. In recent times, mainly used to write foreign words. Also see <a
1452 href="#g-hiragana"><span lang="ja">Hiragana</span></a>.</dd>
1453 </dl>
1455 <h2 id="conformance">
1456 Conformance</h2>
1458 <h3 id="conventions">
1459 Document conventions</h3>
1461 <p>Conformance requirements are expressed with a combination of
1462 descriptive assertions and RFC 2119 terminology. The key words “MUST”,
1463 “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
1464 “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
1465 document are to be interpreted as described in RFC 2119.
1466 However, for readability, these words do not appear in all uppercase
1467 letters in this specification.
1469 <p>All of the text of this specification is normative except sections
1470 explicitly marked as non-normative, examples, and notes. [[!RFC2119]]</p>
1472 <p>Examples in this specification are introduced with the words “for example”
1473 or are set apart from the normative text with <code>class="example"</code>,
1474 like this:
1476 <div class="example">
1477 <p>This is an example of an informative example.</p>
1478 </div>
1480 <p>Informative notes begin with the word “Note” and are set apart from the
1481 normative text with <code>class="note"</code>, like this:
1483 <p class="note">Note, this is an informative note.</p>
1485 <h3 id="conformance-classes">
1486 Conformance classes</h3>
1488 <p>Conformance to CSS Ruby Module
1489 is defined for three conformance classes:
1490 <dl>
1491 <dt><dfn title="style sheet!!as conformance class">style sheet</dfn>
1492 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
1493 style sheet</a>.
1494 <dt><dfn>renderer</dfn></dt>
1495 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
1496 that interprets the semantics of a style sheet and renders
1497 documents that use them.
1498 <dt><dfn id="authoring-tool">authoring tool</dfn></dt>
1499 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
1500 that writes a style sheet.
1501 </dl>
1503 <p>A style sheet is conformant to CSS Ruby Module
1504 if all of its statements that use syntax defined in this module are valid
1505 according to the generic CSS grammar and the individual grammars of each
1506 feature defined in this module.
1508 <p>A renderer is conformant to CSS Ruby Module
1509 if, in addition to interpreting the style sheet as defined by the
1510 appropriate specifications, it supports all the features defined
1511 by CSS Ruby Module by parsing them correctly
1512 and rendering the document accordingly. However, the inability of a
1513 UA to correctly render a document due to limitations of the device
1514 does not make the UA non-conformant. (For example, a UA is not
1515 required to render color on a monochrome monitor.)
1517 <p>An authoring tool is conformant to CSS Ruby Module
1518 if it writes style sheets that are syntactically correct according to the
1519 generic CSS grammar and the individual grammars of each feature in
1520 this module, and meet all other conformance requirements of style sheets
1521 as described in this module.
1523 <h3 id="partial">
1524 Partial implementations</h3>
1526 <p>So that authors can exploit the forward-compatible parsing rules to
1527 assign fallback values, CSS renderers <strong>must</strong>
1528 treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore
1529 as appropriate</a>) any at-rules, properties, property values, keywords,
1530 and other syntactic constructs for which they have no usable level of
1531 support. In particular, user agents <strong>must not</strong> selectively
1532 ignore unsupported component values and honor supported values in a single
1533 multi-value property declaration: if any value is considered invalid
1534 (as unsupported values must be), CSS requires that the entire declaration
1535 be ignored.</p>
1537 <h3 id="experimental">
1538 Experimental implementations</h3>
1540 <p>To avoid clashes with future CSS features, the CSS2.1 specification
1541 reserves a <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
1542 syntax</a> for proprietary and experimental extensions to CSS.
1544 <p>Prior to a specification reaching the Candidate Recommendation stage
1545 in the W3C process, all implementations of a CSS feature are considered
1546 experimental. The CSS Working Group recommends that implementations
1547 use a vendor-prefixed syntax for such features, including those in
1548 W3C Working Drafts. This avoids incompatibilities with future changes
1549 in the draft.
1550 </p>
1552 <h3 id="testing">
1553 Non-experimental implementations</h3>
1555 <p>Once a specification reaches the Candidate Recommendation stage,
1556 non-experimental implementations are possible, and implementors should
1557 release an unprefixed implementation of any CR-level feature they
1558 can demonstrate to be correctly implemented according to spec.
1560 <p>To establish and maintain the interoperability of CSS across
1561 implementations, the CSS Working Group requests that non-experimental
1562 CSS renderers submit an implementation report (and, if necessary, the
1563 testcases used for that implementation report) to the W3C before
1564 releasing an unprefixed implementation of any CSS features. Testcases
1565 submitted to W3C are subject to review and correction by the CSS
1566 Working Group.
1568 <p>Further information on submitting testcases and implementation reports
1569 can be found from on the CSS Working Group's website at
1570 <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
1571 Questions should be directed to the
1572 <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
1573 mailing list.
1575 <h2 class=no-num id="acknowledgments">
1576 Acknowledgments</h2>
1578 <p>This specification would not have been possible without the help from:</p>
1580 <p>Stephen Deach, Martin Dürst, Hideki Hiura(<span lang="ja">樋浦 秀樹</span>), Masayasu Ishikawa(<span lang="ja">石川
1581 雅康</span>), Chris
1582 Pratley, Takao Suzuki(<span lang="ja">鈴木 孝雄</span>), Frank Yung-Fong Tang, Chris Thrasher, Masafumi Yabe<span lang="ja">家辺
1583 勝文</span>), Steve Zilles.</p>
1585 <h2 class="no-num" id="changes">
1586 Changes</h2>
1588 <p>The following major changes have been made since the previous Working Draft:
1589 <dl>
1590 <dt>Remove 'ruby-span' and mentions of <code>rbspan</code>.
1591 <dd>
1592 Explicit spanning is not used in HTML ruby in favor of implicit spanning.
1593 This can't handle some pathological double-sided spanning cases,
1594 but there seems to be no requirement for these at the moment.
1595 (For implementations that support full complex XHTML Ruby,
1596 they can imply spanning from the markup the same magic way
1597 that we handle cell spanning from tables. It doesn't seem
1598 necessary to include controls this in Level 1.)
1600 <dt>Defer 'ruby-overhang' and ''ruby-align: line-end'' to Level 2.
1601 <dd>
1602 It's somewhat complicated, advanced feature.
1603 Proposal is to make this behavior UA-defined
1604 and provide some examples of acceptable options.
1606 <dt>Close issue requesting 'display: rp': use ''display: none''.
1607 <dd>
1608 The Internationalization WG added an issue requesting a display value for <rp> elements.
1609 They're supposed to be hidden when <ruby> is displayed as ruby.
1610 But this is easily accomplished already with ''display: none''.
1612 <dt>Change 'ruby-position' values to match 'text-emphasis-position'.
1613 <dd>
1614 Other than ''inter-character'', which we need to keep,
1615 it makes more sense to align ruby positions with 'text-emphasis-position',
1616 which can correctly handle various combinations of horizontal/vertical preferences.
1618 <dt>Remove unused values of 'ruby-align'.
1619 <dd>
1620 ''left'', ''right'', and ''end'' are not needed.
1622 <dt>Replace ''auto'', ''distribute-letter'', and ''distribute-space'' from 'ruby-align' with ''space-between'' and ''space-around''.
1623 <dd>
1624 The ''auto'' value relied on inspecting content to determine behavior;
1625 this can be avoided by just using ''space-around'' with standard justification rules
1626 (which allow spacing between CJK but not between Latin).
1627 Replaced ''distribute-letter'' and ''distribute-space'' with
1628 ''space-between'' and ''space-around'' for consistency with distribution keywords
1629 in [[CSS3-FLEXBOX]] and [[CSS3-ALIGN]]
1630 and to avoid any links to the definition of ''text-justify: distribute''.
1632 <dt>Added 'ruby-merge' property to control jukugo rendering.
1633 <dd>
1634 This is a stylistic effect, not a structural one;
1635 the previous model assumed that it was structural and suggested handling it by changing markup. :(
1637 <dt>Remove ''inline'' from 'ruby-position'.
1638 <dd>
1639 This is do-able via ''display: inline'' on all the ruby-related elements,
1640 see <a href="#default-inline">Appendix A</a>
1642 <dt>Added <a href="#default-style">Default Style</a> rules
1643 <dd>
1644 As requested by Internationalization WG.
1646 <dt>Wrote anonymous box generation rules
1647 <dd>
1648 And defined pairing of bases and annotations.
1649 Should now handle all the crazy proposed permutations of HTML ruby markup.
1651 <dt>Defined layout of ruby
1652 <dd>
1653 Defined in detail space distribution, white space handling, line breaking, line stacking, etc.
1654 Open issue left for bidi.
1655 </dl>
1657 <h2 class=no-num id="references">
1658 References</h2>
1660 <h3 class="no-num" id="normative-references">
1661 Normative references</h3>
1662 <!--normative-->
1664 <h3 class="no-num" id="other-references">
1665 Other references</h3>
1666 <!--informative-->
1668 <h2 class="no-num" id="index">
1669 Index</h2>
1670 <!--index-->
1672 <h2 class="no-num" id="property-index">
1673 Property index</h2>
1674 <!-- properties -->
1676 </body>
1677 </html>
1678 <!-- Keep this comment at the end of the file
1679 Local variables:
1680 mode: sgml
1681 sgml-declaration:"~/SGML/HTML4.decl"
1682 sgml-default-doctype-name:"html"
1683 sgml-minimize-attributes:t
1684 sgml-nofill-elements:("pre" "style" "br")
1685 sgml-live-element-indicator:t
1686 sgml-omittag:nil
1687 sgml-shorttag:nil
1688 sgml-namecase-general:t
1689 sgml-general-insert-case:lower
1690 sgml-always-quote-attributes:t
1691 sgml-indent-step:nil
1692 sgml-indent-data:t
1693 sgml-parent-document:nil
1694 sgml-exposed-tags:nil
1695 sgml-local-catalogs:nil
1696 sgml-local-ecat-files:nil
1697 End:
1698 -->