10BC0 Adding the possibility of negative numbers to the Chinese numbering s… · w3c/csswg-drafts@eb557df · GitHub
Skip to content

Commit eb557df

Browse files
committed
Adding the possibility of negative numbers to the Chinese numbering schemes.
Some renaming of [CJK]-formal to [CJK]-financial, so it's clearer what they're meant for.
1 parent c21a9c1 commit eb557df

1 file changed

Lines changed: 36 additions & 9 deletions

File tree

css3-lists/Overview.src.html

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -669,15 +669,20 @@ <h4 id='ethiopic-numeric'>
669669
<h4 id='chinese-counter-styles'>
670670
The Chinese counter styles</h4>
671671

672-
<p>The Chinese counter styles are defined for all non-negative numbers less
673-
than 10<sup>16</sup>. There are four Chinese counter styles which are constructed
674-
using the same algorithm, but different sets of characters (given below).
675-
The following algorithm converts decimal digits into Chinese numbers:</p>
672+
<p>The Chinese counter styles are defined for all numbers between -10<sup>16</sup>
673+
and 10<sup>16</sup>, exclusive. There are four Chinese counter styles which
674+
are constructed using the same algorithm, but different sets of characters
675+
(given below). The following algorithm converts decimal digits into Chinese
676+
numbers:</p>
676677

677678
<ol>
678-
<li>If the original number is 0, the representation is simply the character
679+
<li>If the counter value is 0, the representation is simply the character
679680
for 0 from the counter style's table, below. End this algorithm.</li>
680681

682+
<li>If the counter value is negative, set the <var>negative flag</var>
683+
and run the rest of this algorithm with the absolute value of the counter
684+
value.</li>
685+
681686
<li>Split the decimal number into groups of four digits, starting with
682687
the least significant digit.</li>
683688

@@ -690,14 +695,19 @@ <h4 id='chinese-counter-styles'>
690695
third digit, and the fourth digit marker to the fourth digit. The first
691696
digit has no marker.</li>
692697

693-
<li>For each group, drop any leading or trailing 0s. If a group has "internal"
694-
0s (like 2002), collapse them to a single 0.</li>
698+
<li>For each group, drop any trailing 0s. As well, drop any leading 0s
699+
for the largest group.</li>
695700

696701
<li>Concatenate the groups back into a single string, least significant
697702
group first (on the right).</li>
698703

704+
<li>Collapse any runs of consecutive 0s into a single 0.
705+
<span class=note>This can cross the previous group boundaries.</span></li>
706+
699707
<li>Replace each digit with the relevant character from the counter style's
700708
table, below.</li>
709+
710+
<li>If the <var>negative flag</var> is set, prepend 負 U+8D1F to the string.</li>
701711
</ol>
702712

703713
<p>The following tables define the characers used in the four Chinese counter
@@ -765,7 +775,7 @@ <h4 id='chinese-counter-styles'>
765775
</table>
766776
</dd>
767777

768-
<dt><dfn>simp-chinese-formal</dfn></dt>
778+
<dt><dfn>simp-chinese-financial</dfn></dt>
769779
<dd>
770780
<table>
771781
<thead>
@@ -825,6 +835,12 @@ <h4 id='chinese-counter-styles'>
825835
</tbody>
826836
</table>
827837
</dd>
838+
839+
<dt><dfn>trad-chinese-informal</dfn></dt>
840+
<dd class=issue>Fill this in.</dd>
841+
842+
<dt><dfn>trad-chinese-financial</dfn></dt>
843+
<dd class=issue>Fill this in.</dd>
828844
</dl>
829845

830846

@@ -927,7 +943,7 @@ <h4 id='japanese-counter-styles'>
927943
</table>
928944
</dd>
929945

930-
<dt><dfn>japanese-formal</dfn></dt>
946+
<dt><dfn>japanese-financial</dfn></dt>
931947
<dd>
932948
<table>
933949
<thead>
@@ -1000,6 +1016,17 @@ <h4 id='korean-counter-styles'>
10001016

10011017
<p class=issue>Fill in Korean here.</p>
10021018

1019+
<p>The following tables define the characters used in the two Japanese counter
1020+
styles:</p>
1021+
1022+
<dl>
1023+
<dt>korean-informal</dt>
1024+
<dd class=issue>Fill this in.</dd>
1025+
1026+
<dt>korean-financial</dt>
1027+
<dd class=issue>Fill this in.</dd>
1028+
</dl>
1029+
10031030
<!-- ====================================================================== -->
10041031

10051032
<h2 id='list-style-image-property'>

0 commit comments

Comments
 (0)