Reworked the CJK section again with feedback from fantasai and others. · w3c/csswg-drafts@20a3d9c (original) (raw)
`@@ -24,12 +24,12 @@
`
24
24
``
25
25
`
CSS Lists and Counters Module Level 3
`
26
26
``
27
``
`-
Editor's Draft 22 April 2011
`
``
27
`+
Editor's Draft 23 April 2011
`
28
28
``
29
29
`
- This version:
-
`
``
32
`+
-
`
33
33
`<a
`
34
34
`
35
35
``
`@@ -171,7 +171,7 @@
Table of contents
`
171
171
` style
`
172
172
``
173
173
`
- 4.3.2. The
`
174
``
`-
CJK "spoken-out" counter styles
`
``
174
`+
CJK longhand counter styles
`
175
175
`
`
176
176
`
`
177
177
``
`@@ -707,24 +707,73 @@
4.3.1. The ‘<code
`
707
707
` U+137B U+137A U+136A.
`
708
708
`
`
709
709
``
710
``
`-
4.3.2. The CJK
`
711
``
`-
"spoken-out" counter styles
`
712
``
-
713
``
`-
Chinese, Japanese, and Korean all share almost identical "spoken-out"
`
714
``
`-
counter styles, which are roughly similar to using "one, two, three..." in
`
715
``
`-
English. The Chinese and Japanese styles are defined for all numbers
`
716
``
`-
between -1016 and 1016, exclusive; the Korean styles
`
717
``
`-
are defined for all non-negative numbers less than 1016. All of
`
718
``
`-
the styles are defined by almost identical algorithms (specified as a
`
719
``
`-
single algorithm here, with the differences called out when relevant), but
`
720
``
`-
use different sets of characters. The list following the algorithm gives
`
721
``
`-
the name of each counter style using this algorithm, and the individual
`
722
``
`-
character sets used by each style.
`
723
``
-
724
``
`-
For legacy reasons, the counter style ‘
`
725
``
`-
class=css>cjk-ideographic’ must be treated as an alias for
`
726
``
`-
`
727
``
`-
class=css>trad-chinese-informal’.
`
``
710
`+
4.3.2. The CJK longhand
`
``
711
`+
counter styles
`
``
712
+
``
713
`+
Chinese, Japanese, and Korean have longhand counter styles, which have a
`
``
714
`+
structure similar to "one hundred thirteen thousand and twenty-three" in
`
``
715
`+
English. Each has both formal and informal variants. The
`
``
716
`+
formal styles are typically used in financial and legal documents, as
`
``
717
`+
their characters are more difficult to alter.
`
``
718
+
``
719
`+
The following counter styles are defined in this section:
`
``
720
+
``
721
`+
- simp-chinese-informal
`
``
723
+
``
724
`+
- The simplified Chinese informal style.
`
``
725
+
``
726
`+
- simp-chinese-formal
`
``
727
+
``
728
`+
- The simplified Chinese formal style
`
``
729
+
``
730
`+
- trad-chinese-informal
`
``
731
+
``
732
`+
- The traditional Chinese informal style
`
``
733
+
``
734
`+
- trad-chinese-formal
`
``
735
+
``
736
`+
- The traditional Chinese formal style
`
``
737
+
``
738
`+
- japanese-informal
`
``
739
+
``
740
`+
- The Japanese informal style
`
``
741
+
``
742
`+
- japanese-formal
`
``
743
+
``
744
`+
- The Japanese formal style
`
``
745
+
``
746
`+
- korean-hangul-formal
`
``
747
+
``
748
`+
- The Korean hangul-characters formal style
`
``
749
+
``
750
`+
- korean-hanja-informal
`
``
751
+
``
752
`+
- The Korean hanja-characters informal style
`
``
753
+
``
754
`+
- korean-hanja-formal
`
``
755
+
``
756
`+
- The Korean hanja-characters formal style
`
``
757
+
``
758
`+
- cjk-ideographic
`
``
759
+
``
760
`+
- For legacy reasons, this counter-style must be treated as an alias for
`
``
761
`+
`
``
762
`+
class=css>trad-chinese-informal’.
`
``
763
`+
`
``
722
`+
`
``
764
+
``
765
`+
Add an example to each of the above types.
`
``
766
+
``
767
`+
The Chinese and Japanese styles are defined for all numbers between
`
``
768
`+
-1016 and 1016, exclusive; the Korean styles are
`
``
769
`+
defined for all non-negative numbers less than 1016. For
`
``
770
`+
numbers outside this range, the ‘<code
`
``
771
`+
class=css>cjk-decimal’ style is used. All of the styles are
`
``
772
`+
defined by almost identical algorithms (specified as a single algorithm
`
``
773
`+
here, with the differences called out when relevant), but use different
`
``
774
`+
sets of characters. The list following the algorithm gives the name of
`
``
775
`+
each counter style using this algorithm, and the individual character sets
`
``
776
`+
used by each style.
`
728
777
``
729
778
`
- If the counter value is 0, the representation is the character for 0
- For the Japanese and Korean styles, drop all zero digits.
- For the Chinese informal styles, drop all groups with the value 0.
`
768
``
-
769
``
`-
- For all Chinese styles, drop any trailing zeros for all non-zero
`
``
816
`+
- For the Chinese styles, drop any trailing zeros for all non-zero
`
770
817
` groups and collapse (across groups) each remaining consecutive group of
`
771
818
` zeros into a single zero digit.
`
772
819
`
- Recombine groups:
`
775
``
`-
- For the Chinese and Japanese styles, concatenate the groups back
`
777
``
`-
into a single string, least significant group first (on the right).
`
778
``
-
779
``
`-
- For the Korean styles, concatenate the groups back into a single
`
780
``
`-
string, least significant group first (on the right), with a space
`
781
``
`-
(‘
`
782
``
`-
group.
`
783
``
`-
`
776
``
`-
`
``
821
`+
- For the Chinese and Japanese styles, concatenate the groups back
- For the Korean styles, insert a space (" " U+0020) between each group.
`
784
822
``
785
823
`
- If the negative flag was set to true earlier in the
- simp-chinese-formal
- trad-chinese-formal
- japanese-informal
`
730
779
`
`
`@@ -764,23 +813,12 @@
4.3.2. The CJK
`
764
813
`
`
765
814
`
`
766
815
``
767
``
`-
`
773
820
``
774
``
`-
`
786
824
` algorithm, prepend the appropriate negative sign for the given counter
`
`@@ -895,7 +933,7 @@
4.3.2. The CJK
`
895
933
`
`
896
934
`
Negative Sign `
897
935
``
898
``
`-
負 U+8D1F `
``
936
`+
负 U+8D1F `
899
937
`
`
900
938
``
901
939
`
`
`@@ -1009,7 +1047,7 @@
4.3.2. The CJK
`
1009
1047
`
`
1010
1048
`
Digit 0 `
1011
1049
``
1012
``
`-
〇 U+3007 `
``
1050
`+
零 U+96F6 `
1013
1051
``
1014
1052
`
`
1015
1053
`
Digit 1 `
`@@ -1089,7 +1127,7 @@
4.3.2. The CJK
`
1089
1127
`
`
1090
1128
`
Negative Sign `
1091
1129
``
1092
``
`-
Fill this in `
``
1130
`+
負 U+8CA0 `
1093
1131
`
`
1094
1132
``
1095
1133
`
`
`@@ -1186,7 +1224,7 @@
4.3.2. The CJK
`
1186
1224
`
`
1187
1225
`
Negative Sign `
1188
1226
``
1189
``
`-
Fill this in `
``
1227
`+
負 U+8CA0 `
1190
1228
`
`
1191
1229
``
1192
1230
`
`
`
30
30
`
`
31
31
``
32
``
`-