- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 21 Apr 2011 23:42:05 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-lists
In directory hutz:/tmp/cvs-serv24566
Modified Files:
Overview.src.html
Log Message:
Rewrote/rearranged the cjk "spoken out" styles.
Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-lists/Overview.src.html,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- Overview.src.html 21 Apr 2011 22:43:50 -0000 1.63
+++ Overview.src.html 21 Apr 2011 23:42:03 -0000 1.64
@@ -400,7 +400,8 @@
</ol>
<p>This system is defined for all numbers greater than zero. For zero and
- negative numbers, the decimal system is used instead.</p>
+ negative numbers, instead construct the representation of the counter value
+ using the ''decimal'' style.</p>
<p>The suffix for the ethiopic-numeric numbering systems is a dot
(. U+002E FULL STOP). <span class="issue">Is there a better suffix
@@ -423,54 +424,99 @@
</div>
<h4 id='chinese-counter-styles'>
-The Chinese "spoken-out" counter styles</h4>
+The CJK "spoken-out" counter styles</h4>
- <p>The Chinese "spoken-out" counter styles define a style of numbering roughly
- similar to using "one, two, three..." in English. The "financial" variant
- is commonly used for writing out quantities of money, as it is somewhat difficult
- to modify one "financial" character into another. These styles are defined
- for all numbers between -10<sup>16</sup> and 10<sup>16</sup>, exclusive.
- There are four Chinese counter styles which are constructed using the same
- algorithm, but different sets of characters (given below). The following
- algorithm converts decimal digits into Chinese numbers:</p>
+ <p>Chinese, Japanese, and Korean all share almost identical "spoken-out"
+ counter styles, which are roughly similar to using "one, two, three..." in
+ English. The Chinese and Japanese styles are defined for all numbers between
+ -10<sup>16</sup> and 10<sup>16</sup>, exclusive; the Korean styles are
+ defined for all non-negative numbers less than 10<sup>16</sup>. All of the
+ styles are defined by almost identical algorithms (specified as a single
+ algorithm here, with the differences called out when relevant), but use
+ different sets of characters. The list following the algorithm gives the
+ name of each counter style using this algorithm, and the individual character
+ sets used by each style.</p>
+
+ <p>For legacy reasons, the counter style ''cjk-ideographic'' must be treated
+ as an alias for ''trad-chinese-informal''.</p>
<ol>
- <li>If the counter value is 0, the representation is simply the character
- for 0 from the counter style's table, below. End this algorithm.</li>
+ <li>If the counter value is 0, the representation is the character for 0
+ specified for the given counter style. Skip the rest of this algorithm.</li>
- <li>If the counter value is negative, set the <var>negative flag</var>
- and run the rest of this algorithm with the absolute value of the counter
- value.</li>
+ <li>For the Chinese and Japanese styles, if the counter value is negative,
+ set the <var>negative flag</var> to true and run the rest of this algorithm
+ with the absolute value of the counter value. <span class='note'>(The
+ Korean styles cannot represent negative numbers, and so instead use the
+ fallback style.)</span></li>
- <li>Split the decimal number into groups of four digits, starting with
- the least significant digit.</li>
+ <li>Initially represent the counter value as a decimal number. Starting
+ from the right (ones place), split the decimal number into groups of
+ four digits.</li>
- <li>Ignoring groups that have the value 0, append the second group marker
- to the second group, the third group marker to the third group, and the
- fourth group marker to the fourth group. The first group has no marker.</li>
+ <li>For each group with a non-zero value, append the appropriate group
+ marker to the group. The ones group has no marker.</li>
- <li>For each group, ignoring digits that have the value 0, append the
- second digit marker to the second digit, the third digit marker to the
- third digit, and the fourth digit marker to the fourth digit. The first
- digit has no marker.</li>
+ <li>Within each group, for each digit that is not 0, append the appropriate
+ digit marker to the digit. The ones digit of each group has no marker.</li>
- <li>For each group, drop any trailing 0s. As well, drop any leading 0s
- for the largest group.</li>
+ <li>Drop ones:
+ <ul>
+ <li>For the Chinese informal styles, for any group with a value
+ between ten and nineteen, remove the tens digit (leave the digit
+ marker).</li>
- <li>Concatenate the groups back into a single string, least significant
- group first (on the right).</li>
+ <li>For the Japanese informal and Korean informal styles, if any
+ of the digit markers are preceded by the digit 1, and that digit
+ is not the first digit of the group, remove the digit (leave the
+ digit marker).</li>
- <li>Collapse any runs of consecutive 0s into a single 0.
- <span class=note>This can cross the previous group boundaries.</span></li>
+ <li>For Korean informal styles, if the value of the ten-thousands
+ group is 1, drop the digit (leave the digit marker).</li>
+ </ul>
+ </li>
- <li>Replace each digit with the relevant character from the counter style's
- table, below.</li>
+ <li>Drop zeros:
+ <ul>
+ <li>For the Japanese and Korean styles, drop all zero digits.</li>
- <li>If the <var>negative flag</var> is set, prepend 負 U+8D1F to the string.</li>
+ <li>For the Chinese informal styles, drop all groups with the
+ value 0.</li>
+
+ <li>For all Chinese styles, drop any trailing zeros for all
+ non-zero groups and collapse (across groups) each remaining
+ consecutive group of zeros into a single zero digit.</li>
+ </ul>
+ </li>
+
+ <li>Recombine groups:
+ <ul>
+ <li>For the Chinese and Japanese styles, concatenate the groups
+ back into a single string, least significant group first (on the
+ right).</li>
+
+ <li>For the Korean styles, concatenate the groups back into a
+ single string, least significant group first (on the right), with
+ a space (' ' U+0020) inserted between each group.</li>
+ </ul>
+ </li>
+
+ <li>If the <var>negative flag</var> was set to true earlier in the
+ algorithm, prepend the appropriate negative sign for the given counter
+ style to the string.</li>
+
+ <li>Replace the digits 0-9 with the appropriate character for the given
+ counter style. Return the resultant string as the representation of the
+ counter value.</li>
</ol>
- <p>The following tables define the characers used in the four Chinese counter
- styles:</p>
+ <p>For all of these counter styles, the suffix is "、" U+3001, the prefix is
+ the empty string, the fallback style is ''decimal'', and the upper range
+ bound is 9999 9999 9999 9999 (one less than 10<sup>16</sup>). For the Chinese
+ and Japanese styles, the lower range bound is -9999 9999 9999 9999 (one more
+ than -10<sup>16</sup>); for the Korean styles the lower range bound is 0.</p>
+
+ <p>The following tables define the characters used in these styles:</p>
<dl>
<dt><dfn>simp-chinese-informal</dfn></dt>
@@ -530,11 +576,14 @@
<tr>
<td>Fourth Group Marker
<td>万亿 U+4E07 U+4EBF
+ <tr>
+ <td>Negative Sign
+ <td>負 U+8D1F
</tbody>
</table>
</dd>
- <dt><dfn>simp-chinese-financial</dfn></dt>
+ <dt><dfn>simp-chinese-formal</dfn></dt>
<dd>
<table>
<thead>
@@ -591,6 +640,9 @@
<tr>
<td>Fourth Group Marker
<td>万亿 U+4E07 U+4EBF
+ <tr>
+ <td>Negative Sign
+ <td>負 U+8D1F
</tbody>
</table>
</dd>
@@ -598,56 +650,9 @@
<dt><dfn>trad-chinese-informal</dfn></dt>
<dd class=issue>Fill this in.</dd>
- <dt><dfn>trad-chinese-financial</dfn></dt>
+ <dt><dfn>trad-chinese-formal</dfn></dt>
<dd class=issue>Fill this in.</dd>
- </dl>
-
- <p class=note>Note: Chinese, Japanese, and Korean spoken-out numbering (what
- this section defines) is actually defined up to 10<sup>72</sup>. Numbers
- higher than 10<sup>16</sup> are usually written in scientific notation,
- however, and there is some variation in the group markers used for such numbers,
- so the algorithm has been intentionally defined only to 10<sup>16</sup>.</p>
-
-
-<h4 id='japanese-counter-styles'>
-The Japanese "spoken-out" counter styles</h4>
-
- <p>The Japanese "spoken-out" counter styles are similar to the
- <i title="chinese-counter-styles">Chinese "spoken-out" counter styles</i>,
- except that they use different characters, use a slightly different algorithm,
- and are not defined for negative numbers. The following algorithm converts
- decimal digits into Japanese numbers:</p>
-
- <ol>
- <li>If the original number is 0, the representation is simply the character
- for 0 from the counter style's table, below. End this algorithm.</li>
-
- <li>Split the decimal number into groups of four digits, starting with
- the least significant digit.</li>
-
- <li>Ignoring groups that have the value 0, append the second group marker
- to the second group, the third group marker to the third group, and the
- fourth group marker to the fourth group. The first group has no marker.</li>
-
- <li>For each group, ignoring digits that have the value 0, append the
- second digit marker to the second digit, the third digit marker to the
- third digit, and the fourth digit marker to the fourth digit. The first
- digit has no marker.</li>
-
- <li>If the second, third, or fourth digit of any group was a 1, remove
- the 1 (leave the digit marker). If any digit was a 0, remove it.</li>
-
- <li>Concatenate the groups back into a single string, least significant
- group first (on the right).</li>
-
- <li>Replace each digit with the relevant character from the counter style's
- table, below.</li>
- </ol>
-
- <p>The following tables define the characters used in the two Japanese counter
- styles:</p>
- <dl>
<dt><dfn>japanese-informal</dfn></dt>
<dd>
<table>
@@ -659,7 +664,7 @@
<tbody>
<tr>
<td>Digit 0
- <td>零 U+96F6
+ <td>〇 U+3007
<tr>
<td>Digit 1
<td>一 U+4E00
@@ -705,11 +710,14 @@
<tr>
<td>Fourth Group Marker
<td>兆 U+5146
+ <tr>
+ <td>Negative Sign
+ <td>マイナス U+30DE U+30A4 U+30CA U+30B9
</tbody>
</table>
</dd>
- <dt><dfn>japanese-financial</dfn></dt>
+ <dt><dfn>japanese-formal</dfn></dt>
<dd>
<table>
<thead>
@@ -766,55 +774,14 @@
<tr>
<td>Fourth Group Marker
<td>兆 U+5146
+ <tr>
+ <td>Negative Sign
+ <td>マイナス U+30DE U+30A4 U+30CA U+30B9
</tbody>
</table>
</dd>
- </dl>
-
-
-<h4 id='korean-counter-styles'>
-The Korean "spoken-out" counter styles</h4>
-
- <p>The Korean "spoken-out" counter styles are similar to the
- <i title="chinese-counter-styles">Chinese "spoken-out" counter styles</i>,
- except that they use different characters, use a slightly different algorithm,
- and are not defined for negative numbers. The following algorithm converts
- decimal digits into Korean numbers:</p>
- <ol>
- <li>If the original number is 0, the representation is simply the character
- for 0 from the counter style's table, below. End this algorithm.</li>
-
- <li>Split the decimal number into groups of four digits, starting with
- the least significant digit.</li>
-
- <li>Ignoring groups that have the value 0, append the second group marker
- to the second group, the third group marker to the third group, and the
- fourth group marker to the fourth group. The first group has no marker.</li>
-
- <li>For each group, ignoring digits that have the value 0, append the
- second digit marker to the second digit, the third digit marker to the
- third digit, and the fourth digit marker to the fourth digit. The first
- digit has no marker.</li>
-
- <li>If the second, third, or fourth digit of any group is a 1, remove
- the 1 (leave the digit marker). If the first digit of the second group
- is a 1 and all other digits of the second group are 0, remove the 1
- (leave the group marker). If any digit was a 0, remove it.</li>
-
- <li>Concatenate the groups back into a single string, least significant
- group first (on the right), with a space (" " U+0020) inserted between
- each group.</li>
-
- <li>Replace each digit with the relevant character from the counter style's
- table, below.</li>
- </ol>
-
- <p>The following tables define the characters used in the Korean counter
- styles:</p>
-
- <dl>
- <dt><dfn>korean-hangul-financial</dfn></dt>
+ <dt><dfn>korean-hangul-formal</dfn></dt>
<dd>
<table>
<thead>
@@ -936,7 +903,7 @@
</table>
</dd>
- <dt><dfn>korean-hanja-financial</dfn></dt>
+ <dt><dfn>korean-hanja-formal</dfn></dt>
<dd>
<table>
<thead>
@@ -998,6 +965,13 @@
</dd>
</dl>
+ <p class=note>Note: Chinese, Japanese, and Korean spoken-out numbering (what
+ this section defines) is actually defined up to 10<sup>72</sup>. Numbers
+ higher than 10<sup>16</sup> are usually written in scientific notation,
+ however, and there is some variation in the group markers used for such numbers,
+ so the algorithm has been intentionally defined only to 10<sup>16</sup>.</p>
+
+
<!-- ====================================================================== -->
<h2 id='list-style-image-property'>
Received on Thursday, 21 April 2011 23:42:07 UTC