Skip to content

Commit

Permalink
Use unicode ranges (start char, end char) when that reduce sizes.
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-wang committed May 8, 2020
1 parent c85338e commit c5fd3d2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tables/operator-dictionary-compact.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!-- This file was automatically generated from generate-math-variant-tables.py. Do not edit. -->
<figure id="operator-dictionary-compact-special-tables"><table><tr><th>Special Table</th><th>Unicode strings/characters</th></tr><tr><td><code>Operators_multichar</code></td><td>49 null-terminated strings: <code>{U+0021,U+0021,U+0000} {U+0021,U+003D,U+0000} {U+0026,U+0026,U+0000} {U+002A,U+003D,U+0000} {U+002B,U+002B,U+0000} {U+002B,U+003D,U+0000} {U+002D,U+002D,U+0000} {U+002D,U+003D,U+0000} {U+002D,U+003E,U+0000} {U+002E,U+002E,U+0000} {U+002E,U+002E,U+002E,U+0000} {U+002F,U+003D,U+0000} {U+003A,U+003D,U+0000} {U+003C,U+003D,U+0000} {U+003D,U+003D,U+0000} {U+003E,U+003D,U+0000} {U+007C,U+007C,U+0000} {U+007C,U+007C,U+0000} {U+007C,U+007C,U+0000} {U+007C,U+007C,U+0000} {U+007C,U+007C,U+0000} {U+007C,U+007C,U+0000} {U+007C,U+007C,U+007C,U+0000} {U+007C,U+007C,U+007C,U+0000} {U+007C,U+007C,U+007C,U+0000} {U+007C,U+007C,U+007C,U+0000} {U+007C,U+007C,U+007C,U+0000} {U+007C,U+007C,U+007C,U+0000} {U+223D,U+0331,U+0000} {U+2242,U+0338,U+0000} {U+224E,U+0338,U+0000} {U+224F,U+0338,U+0000} {U+2266,U+0338,U+0000} {U+226A,U+0338,U+0000} {U+226B,U+0338,U+0000} {U+227F,U+0338,U+0000} {U+2282,U+20D2,U+0000} {U+2283,U+20D2,U+0000} {U+228F,U+0338,U+0000} {U+2290,U+0338,U+0000} {U+29CF,U+0338,U+0000} {U+29D0,U+0338,U+0000} {U+2A7D,U+0338,U+0000} {U+2A7E,U+0338,U+0000} {U+2AA1,U+0338,U+0000} {U+2AA2,U+0338,U+0000} {U+2AAF,U+0338,U+0000} {U+2AB0,U+0338,U+0000} {U+2ADD,U+0338,U+0000} </code></td></tr><tr><td><code>Operators_fence</code></td><td>61 characters: <code>U+0028 U+0029 U+005B U+005D U+007B U+007C U+007C U+007C U+007D U+2016 U+2016 U+2018 U+2019 U+201C U+201D U+2308 U+2309 U+230A U+230B U+2329 U+232A U+2772 U+2773 U+27E6 U+27E7 U+27E8 U+27E9 U+27EA U+27EB U+27EC U+27ED U+27EE U+27EF U+2980 U+2980 U+2983 U+2984 U+2985 U+2986 U+2987 U+2988 U+2989 U+298A U+298B U+298C U+298D U+298E U+298F U+2990 U+2991 U+2992 U+2993 U+2994 U+2995 U+2996 U+2997 U+2998 U+29FC U+29FD U+E010 U+E016 </code></td></tr><tr><td><code>Operators_separator</code></td><td>3 characters: <code>U+002C U+003B U+2063 </code></td></tr></table><figcaption>Special tables for the operator dictionary.</figcaption></figure><figure id="operator-dictionary-category-table"><table><tr><th>(Content, Form) keys</th><th>Category</th></tr><tr><td>138 characters in <strong>infix</strong> form: <code>U+2190 U+2191 U+2192 U+2193 U+2194 U+2195 U+2196 U+2197 U+2198 U+2199 U+219C U+219D U+219E U+219F U+21A0 U+21A1 U+21A2 U+21A3 U+21A4 U+21A5 U+21A6 U+21A7 U+21A8 U+21A9 U+21AA U+21AB U+21AC U+21AD U+21AF U+21B0 U+21B1 U+21B2 U+21B3 U+21B4 U+21B5 U+21B9 U+21BC U+21BD U+21BE U+21BF U+21C0 U+21C1 U+21C2 U+21C3 U+21C4 U+21C5 U+21C6 U+21C7 U+21C8 U+21C9 U+21CA U+21CB U+21CC U+21D0 U+21D1 U+21D2 U+21D3 U+21D4 U+21D5 U+21D6 U+21D7 U+21D8 U+21D9 U+21DA U+21DB U+21DC U+21DD U+21E0 U+21E1 U+21E2 U+21E3 U+21E4 U+21E5 U+21E6 U+21E7 U+21E8 U+21E9 U+21EA U+21EB U+21EC U+21ED U+21EE U+21EF U+21F0 U+21F3 U+21F5 U+21F6 U+21FD U+21FE U+21FF U+27F0 U+27F1 U+27F5 U+27F6 U+27F7 U+27F8 U+27F9 U+27FA U+27FB U+27FC U+27FD U+27FE U+27FF U+290A U+290B U+290C U+290D U+290E U+290F U+2910 U+2912 U+2913 U+2921 U+2922 U+294E U+294F U+2950 U+2951 U+2952 U+2953 U+2954 U+2955 U+2956 U+2957 U+2958 U+2959 U+295A U+295B U+295C U+295D U+295E U+295F U+2960 U+2961 U+296E U+296F U+2B45 U+2B46 </code></td><td>0</td></tr><tr><td>103 characters in <strong>infix</strong> form: <code>U+002B U+002D U+002F U+00B1 U+00F7 U+2212 U+2213 U+2214 U+2216 U+2218 U+2224 U+2227 U+2228 U+2229 U+222A U+2236 U+2238 U+228C U+228D U+228E U+228F U+2293 U+2294 U+2295 U+2296 U+2298 U+229D U+229E U+229F U+22BB U+22BC U+22BD U+22C4 U+22C6 U+22CE U+22CF U+22D2 U+22D3 U+2795 U+2796 U+2797 U+27F4 U+29BC U+29F6 U+2A22 U+2A23 U+2A24 U+2A25 U+2A26 U+2A27 U+2A28 U+2A29 U+2A2A U+2A2B U+2A2C U+2A2D U+2A2E U+2A38 U+2A39 U+2A3A U+2A40 U+2A41 U+2A42 U+2A43 U+2A44 U+2A45 U+2A46 U+2A47 U+2A48 U+2A49 U+2A4A U+2A4B U+2A4C U+2A4D U+2A4E U+2A4F U+2A51 U+2A52 U+2A53 U+2A54 U+2A55 U+2A56 U+2A57 U+2A58 U+2A59 U+2A5A U+2A5B U+2A5C U+2A5D U+2A5E U+2A5F U+2A60 U+2A61 U+2A62 U+2A63 U+2ADA U+2ADB U+2AFB U+2AFD U+2B32 U+E002 U+E005 U+E007 </code></td><td>1</td></tr><tr><td>89 characters in <strong>infix</strong> form: <code>U+0025 U+002A U+002E U+0040 U+00B7 U+00D7 U+2022 U+2043 U+2206 U+220E U+2217 U+223F U+2240 U+2297 U+2299 U+22A0 U+22A1 U+22C5 U+22C7 U+22C9 U+22CA U+22CB U+22CC U+2305 U+2306 U+25A0 U+25A1 U+25AA U+25AB U+25AD U+25AE U+25AF U+25B0 U+25B1 U+2981 U+2982 U+2999 U+299A U+29B5 U+29C2 U+29C3 U+29C9 U+29CA U+29CB U+29CC U+29CD U+29D8 U+29D9 U+29DB U+29DF U+29E0 U+29E2 U+29E7 U+29E8 U+29E9 U+29EA U+29EB U+29EC U+29ED U+29F8 U+29F9 U+29FA U+29FB U+2A1D U+2A1E U+2A1F U+2A20 U+2A21 U+2A2F U+2A30 U+2A31 U+2A32 U+2A33 U+2A34 U+2A35 U+2A36 U+2A37 U+2A3B U+2A3C U+2A3D U+2A3F U+2A50 U+2ADC U+2ADD U+2AFE U+E010 U+E016 U+E01C U+E030 </code></td><td>2</td></tr><tr><td>53 characters in <strong>prefix</strong> form: <code>U+0021 U+002B U+002D U+00AC U+00B1 U+2018 U+201C U+2200 U+2201 U+2203 U+2204 U+2207 U+2212 U+2213 U+221B U+221C U+221F U+2220 U+2221 U+2222 U+223C U+22BE U+22BF U+2310 U+2319 U+2795 U+2796 U+27C0 U+299B U+299C U+299D U+299E U+299F U+29A0 U+29A1 U+29A2 U+29A3 U+29A4 U+29A5 U+29A6 U+29A7 U+29A8 U+29A9 U+29AA U+29AB U+29AC U+29AD U+29AE U+29AF U+2AEC U+2AED U+E010 U+E016 </code></td><td>3</td></tr><tr><td>42 characters in <strong>postfix</strong> form: <code>U+0021 U+0022 U+0026 U+0027 U+0060 U+00A8 U+00B0 U+00B2 U+00B3 U+00B4 U+00B8 U+00B9 U+02CA U+02CB U+02D8 U+02D9 U+02DA U+02DD U+0311 U+2019 U+201A U+201B U+201D U+201E U+201F U+2032 U+2033 U+2034 U+2035 U+2036 U+2037 U+2057 U+20DB U+20DC U+23CD U+E000 U+E004 U+E006 U+E009 U+E00A U+E010 U+E016 </code></td><td>4</td></tr><tr><td>26 characters in <strong>postfix</strong> form: <code>U+005E U+005F U+007E U+00AF U+02C6 U+02C7 U+02C9 U+02CD U+02DC U+02F7 U+0302 U+2016 U+203E U+2322 U+2323 U+23B4 U+23B5 U+23DC U+23DD U+23DE U+23DF U+23E0 U+23E1 U+2980 U+1EEF0 U+1EEF1 </code></td><td>5</td></tr><tr><td>25 characters in <strong>prefix</strong> form: <code>U+0028 U+005B U+007B U+007C U+2308 U+230A U+2329 U+2772 U+27E6 U+27E8 U+27EA U+27EC U+27EE U+2983 U+2985 U+2987 U+2989 U+298B U+298D U+298F U+2991 U+2993 U+2995 U+2997 U+29FC </code></td><td>6</td></tr><tr><td>25 characters in <strong>postfix</strong> form: <code>U+0029 U+005D U+007C U+007D U+2309 U+230B U+232A U+2773 U+27E7 U+27E9 U+27EB U+27ED U+27EF U+2984 U+2986 U+2988 U+298A U+298C U+298E U+2990 U+2992 U+2994 U+2996 U+2998 U+29FD </code></td><td>7</td></tr><tr><td>22 characters in <strong>prefix</strong> form: <code>U+222B U+222C U+222D U+222E U+222F U+2230 U+2231 U+2232 U+2233 U+2A0B U+2A0C U+2A0D U+2A0E U+2A0F U+2A15 U+2A16 U+2A17 U+2A18 U+2A19 U+2A1A U+2A1B U+2A1C </code></td><td>8</td></tr><tr><td>18 characters in <strong>prefix</strong> form: <code>U+220F U+2210 U+22C0 U+22C1 U+22C2 U+22C3 U+2A00 U+2A01 U+2A02 U+2A03 U+2A04 U+2A05 U+2A06 U+2A07 U+2A08 U+2A09 U+2AFC U+2AFF </code></td><td>9</td></tr><tr><td>7 characters in <strong>prefix</strong> form: <code>U+2211 U+2A0A U+2A10 U+2A11 U+2A12 U+2A13 U+2A14 </code></td><td>10</td></tr><tr><td>6 characters in <strong>infix</strong> form: <code>U+005C U+2061 U+2062 U+2063 U+2064 U+2396 </code></td><td>11</td></tr><tr><td>3 characters in <strong>infix</strong> form: <code>U+002C U+003A U+003B </code></td><td>12</td></tr><tr><td>3 characters in <strong>prefix</strong> form: <code>U+2145 U+2146 U+2202 </code></td><td>13</td></tr></table><figcaption>Mapping from operator (Content, Form) to a category.</figcaption></figure><figure id="operator-dictionary-categories-values"><table><tr><th>Category</th><th>rspace</th><th>lspace</th><th>properties</th></tr><tr><td>0</td><td><code>0.2777777777777778em</code></td><td><code>0.2777777777777778em</code></td><td>stretchy </td></tr><tr><td>1</td><td><code>0.2222222222222222em</code></td><td><code>0.2222222222222222em</code></td><td>N/A</td></tr><tr><td>2</td><td><code>0.16666666666666666em</code></td><td><code>0.16666666666666666em</code></td><td>N/A</td></tr><tr><td>3</td><td><code>0</code></td><td><code>0</code></td><td>N/A</td></tr><tr><td>4</td><td><code>0</code></td><td><code>0</code></td><td>N/A</td></tr><tr><td>5</td><td><code>0</code></td><td><code>0</code></td><td>stretchy </td></tr><tr><td>6</td><td><code>0</code></td><td><code>0</code></td><td>stretchy symmetric </td></tr><tr><td>7</td><td><code>0</code></td><td><code>0</code></td><td>stretchy symmetric </td></tr><tr><td>8</td><td><code>0.16666666666666666em</code></td><td><code>0.16666666666666666em</code></td><td>symmetric largeop </td></tr><tr><td>9</td><td><code>0.05555555555555555em</code></td><td><code>0.1111111111111111em</code></td><td>symmetric largeop movablelimits </td></tr><tr><td>10</td><td><code>0.16666666666666666em</code></td><td><code>0.16666666666666666em</code></td><td>symmetric largeop movablelimits </td></tr><tr><td>11</td><td><code>0</code></td><td><code>0</code></td><td>N/A</td></tr><tr><td>12</td><td><code>0</code></td><td><code>0.16666666666666666em</code></td><td>N/A</td></tr><tr><td>13</td><td><code>0.16666666666666666em</code></td><td><code>0</code></td><td>N/A</td></tr></table><figcaption>Operators values for each category.</figcaption></figure>
<figure id="operator-dictionary-compact-special-tables"><table><tr><th>Special Table</th><th>Unicode strings/characters</th></tr><tr><td><code>Operators_multichar</code></td><td>49 null-terminated strings: <code>{U+0021,U+0021,U+0000}, {U+0021,U+003D,U+0000}, {U+0026,U+0026,U+0000}, {U+002A,U+003D,U+0000}, {U+002B,U+002B,U+0000}, {U+002B,U+003D,U+0000}, {U+002D,U+002D,U+0000}, {U+002D,U+003D,U+0000}, {U+002D,U+003E,U+0000}, {U+002E,U+002E,U+0000}, {U+002E,U+002E,U+002E,U+0000}, {U+002F,U+003D,U+0000}, {U+003A,U+003D,U+0000}, {U+003C,U+003D,U+0000}, {U+003D,U+003D,U+0000}, {U+003E,U+003D,U+0000}, {U+007C,U+007C,U+0000}, {U+007C,U+007C,U+0000}, {U+007C,U+007C,U+0000}, {U+007C,U+007C,U+0000}, {U+007C,U+007C,U+0000}, {U+007C,U+007C,U+0000}, {U+007C,U+007C,U+007C,U+0000}, {U+007C,U+007C,U+007C,U+0000}, {U+007C,U+007C,U+007C,U+0000}, {U+007C,U+007C,U+007C,U+0000}, {U+007C,U+007C,U+007C,U+0000}, {U+007C,U+007C,U+007C,U+0000}, {U+223D,U+0331,U+0000}, {U+2242,U+0338,U+0000}, {U+224E,U+0338,U+0000}, {U+224F,U+0338,U+0000}, {U+2266,U+0338,U+0000}, {U+226A,U+0338,U+0000}, {U+226B,U+0338,U+0000}, {U+227F,U+0338,U+0000}, {U+2282,U+20D2,U+0000}, {U+2283,U+20D2,U+0000}, {U+228F,U+0338,U+0000}, {U+2290,U+0338,U+0000}, {U+29CF,U+0338,U+0000}, {U+29D0,U+0338,U+0000}, {U+2A7D,U+0338,U+0000}, {U+2A7E,U+0338,U+0000}, {U+2AA1,U+0338,U+0000}, {U+2AA2,U+0338,U+0000}, {U+2AAF,U+0338,U+0000}, {U+2AB0,U+0338,U+0000}, {U+2ADD,U+0338,U+0000}, </code></td></tr><tr><td><code>Operators_fence</code></td><td>20 ranges (61 characters): <code>[U+0028–U+0029], {U+005B}, {U+005D}, [U+007B–U+007C], {U+007C}, [U+007C–U+007D], {U+2016}, {U+2016}, [U+2018–U+2019], [U+201C–U+201D], [U+2308–U+230B], [U+2329–U+232A], [U+2772–U+2773], [U+27E6–U+27EF], {U+2980}, {U+2980}, [U+2983–U+2998], [U+29FC–U+29FD], {U+E010}, {U+E016}, </code></td></tr><tr><td><code>Operators_separator</code></td><td>3 characters: <code>U+002C, U+003B, U+2063, </code></td></tr></table><figcaption>Special tables for the operator dictionary.</figcaption></figure><figure id="operator-dictionary-category-table"><table><tr><th>(Content, Form) keys</th><th>Category</th></tr><tr><td>18 ranges (138 characters) in <strong>infix</strong> form: <code>[U+2190–U+2199], [U+219C–U+21AD], [U+21AF–U+21B5], {U+21B9}, [U+21BC–U+21CC], [U+21D0–U+21DD], [U+21E0–U+21F0], {U+21F3}, [U+21F5–U+21F6], [U+21FD–U+21FF], [U+27F0–U+27F1], [U+27F5–U+27FF], [U+290A–U+2910], [U+2912–U+2913], [U+2921–U+2922], [U+294E–U+2961], [U+296E–U+296F], [U+2B45–U+2B46], </code></td><td>0</td></tr><tr><td>36 ranges (103 characters) in <strong>infix</strong> form: <code>{U+002B}, {U+002D}, {U+002F}, {U+00B1}, {U+00F7}, [U+2212–U+2214], {U+2216}, {U+2218}, {U+2224}, [U+2227–U+222A], {U+2236}, {U+2238}, [U+228C–U+228F], [U+2293–U+2296], {U+2298}, [U+229D–U+229F], [U+22BB–U+22BD], {U+22C4}, {U+22C6}, [U+22CE–U+22CF], [U+22D2–U+22D3], [U+2795–U+2797], {U+27F4}, {U+29BC}, {U+29F6}, [U+2A22–U+2A2E], [U+2A38–U+2A3A], [U+2A40–U+2A4F], [U+2A51–U+2A63], [U+2ADA–U+2ADB], {U+2AFB}, {U+2AFD}, {U+2B32}, {U+E002}, {U+E005}, {U+E007}, </code></td><td>1</td></tr><tr><td>44 ranges (89 characters) in <strong>infix</strong> form: <code>{U+0025}, {U+002A}, {U+002E}, {U+0040}, {U+00B7}, {U+00D7}, {U+2022}, {U+2043}, {U+2206}, {U+220E}, {U+2217}, [U+223F–U+2240], {U+2297}, {U+2299}, [U+22A0–U+22A1], {U+22C5}, {U+22C7}, [U+22C9–U+22CC], [U+2305–U+2306], [U+25A0–U+25A1], [U+25AA–U+25AB], [U+25AD–U+25B1], [U+2981–U+2982], [U+2999–U+299A], {U+29B5}, [U+29C2–U+29C3], [U+29C9–U+29CD], [U+29D8–U+29D9], {U+29DB}, [U+29DF–U+29E0], {U+29E2}, [U+29E7–U+29ED], [U+29F8–U+29FB], [U+2A1D–U+2A21], [U+2A2F–U+2A37], [U+2A3B–U+2A3D], {U+2A3F}, {U+2A50}, [U+2ADC–U+2ADD], {U+2AFE}, {U+E010}, {U+E016}, {U+E01C}, {U+E030}, </code></td><td>2</td></tr><tr><td>23 ranges (53 characters) in <strong>prefix</strong> form: <code>{U+0021}, {U+002B}, {U+002D}, {U+00AC}, {U+00B1}, {U+2018}, {U+201C}, [U+2200–U+2201], [U+2203–U+2204], {U+2207}, [U+2212–U+2213], [U+221B–U+221C], [U+221F–U+2222], {U+223C}, [U+22BE–U+22BF], {U+2310}, {U+2319}, [U+2795–U+2796], {U+27C0}, [U+299B–U+29AF], [U+2AEC–U+2AED], {U+E010}, {U+E016}, </code></td><td>3</td></tr><tr><td>42 characters in <strong>postfix</strong> form: <code>U+0021, U+0022, U+0026, U+0027, U+0060, U+00A8, U+00B0, U+00B2, U+00B3, U+00B4, U+00B8, U+00B9, U+02CA, U+02CB, U+02D8, U+02D9, U+02DA, U+02DD, U+0311, U+2019, U+201A, U+201B, U+201D, U+201E, U+201F, U+2032, U+2033, U+2034, U+2035, U+2036, U+2037, U+2057, U+20DB, U+20DC, U+23CD, U+E000, U+E004, U+E006, U+E009, U+E00A, U+E010, U+E016, </code></td><td>4</td></tr><tr><td>26 characters in <strong>postfix</strong> form: <code>U+005E, U+005F, U+007E, U+00AF, U+02C6, U+02C7, U+02C9, U+02CD, U+02DC, U+02F7, U+0302, U+2016, U+203E, U+2322, U+2323, U+23B4, U+23B5, U+23DC, U+23DD, U+23DE, U+23DF, U+23E0, U+23E1, U+2980, U+1EEF0, U+1EEF1, </code></td><td>5</td></tr><tr><td>25 characters in <strong>prefix</strong> form: <code>U+0028, U+005B, U+007B, U+007C, U+2308, U+230A, U+2329, U+2772, U+27E6, U+27E8, U+27EA, U+27EC, U+27EE, U+2983, U+2985, U+2987, U+2989, U+298B, U+298D, U+298F, U+2991, U+2993, U+2995, U+2997, U+29FC, </code></td><td>6</td></tr><tr><td>25 characters in <strong>postfix</strong> form: <code>U+0029, U+005D, U+007C, U+007D, U+2309, U+230B, U+232A, U+2773, U+27E7, U+27E9, U+27EB, U+27ED, U+27EF, U+2984, U+2986, U+2988, U+298A, U+298C, U+298E, U+2990, U+2992, U+2994, U+2996, U+2998, U+29FD, </code></td><td>7</td></tr><tr><td>3 ranges (22 characters) in <strong>prefix</strong> form: <code>[U+222B–U+2233], [U+2A0B–U+2A0F], [U+2A15–U+2A1C], </code></td><td>8</td></tr><tr><td>5 ranges (18 characters) in <strong>prefix</strong> form: <code>[U+220F–U+2210], [U+22C0–U+22C3], [U+2A00–U+2A09], {U+2AFC}, {U+2AFF}, </code></td><td>9</td></tr><tr><td>3 ranges (7 characters) in <strong>prefix</strong> form: <code>{U+2211}, {U+2A0A}, [U+2A10–U+2A14], </code></td><td>10</td></tr><tr><td>6 characters in <strong>infix</strong> form: <code>U+005C, U+2061, U+2062, U+2063, U+2064, U+2396, </code></td><td>11</td></tr><tr><td>3 characters in <strong>infix</strong> form: <code>U+002C, U+003A, U+003B, </code></td><td>12</td></tr><tr><td>3 characters in <strong>prefix</strong> form: <code>U+2145, U+2146, U+2202, </code></td><td>13</td></tr></table><figcaption>Mapping from operator (Content, Form) to a category.</figcaption></figure><figure id="operator-dictionary-categories-values"><table><tr><th>Category</th><th>rspace</th><th>lspace</th><th>properties</th></tr><tr><td>0</td><td><code>0.2777777777777778em</code></td><td><code>0.2777777777777778em</code></td><td>stretchy </td></tr><tr><td>1</td><td><code>0.2222222222222222em</code></td><td><code>0.2222222222222222em</code></td><td>N/A</td></tr><tr><td>2</td><td><code>0.16666666666666666em</code></td><td><code>0.16666666666666666em</code></td><td>N/A</td></tr><tr><td>3</td><td><code>0</code></td><td><code>0</code></td><td>N/A</td></tr><tr><td>4</td><td><code>0</code></td><td><code>0</code></td><td>N/A</td></tr><tr><td>5</td><td><code>0</code></td><td><code>0</code></td><td>stretchy </td></tr><tr><td>6</td><td><code>0</code></td><td><code>0</code></td><td>stretchy symmetric </td></tr><tr><td>7</td><td><code>0</code></td><td><code>0</code></td><td>stretchy symmetric </td></tr><tr><td>8</td><td><code>0.16666666666666666em</code></td><td><code>0.16666666666666666em</code></td><td>symmetric largeop </td></tr><tr><td>9</td><td><code>0.05555555555555555em</code></td><td><code>0.1111111111111111em</code></td><td>symmetric largeop movablelimits </td></tr><tr><td>10</td><td><code>0.16666666666666666em</code></td><td><code>0.16666666666666666em</code></td><td>symmetric largeop movablelimits </td></tr><tr><td>11</td><td><code>0</code></td><td><code>0</code></td><td>N/A</td></tr><tr><td>12</td><td><code>0</code></td><td><code>0.16666666666666666em</code></td><td>N/A</td></tr><tr><td>13</td><td><code>0.16666666666666666em</code></td><td><code>0</code></td><td>N/A</td></tr></table><figcaption>Operators values for each category.</figcaption></figure>
36 changes: 25 additions & 11 deletions tables/operator-dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ def dumpKnownTables(fenceAndSeparators):

def stringifyRange(unicodeRange):
if unicodeRange[0] == unicodeRange[1]:
return toHexa(unicodeRange[0])
return "{%s}" % toHexa(unicodeRange[0])
else:
return "[%s, %s]" % (toHexa(unicodeRange[0]), toHexa(unicodeRange[1]))
return "[%s%s]" % (toHexa(unicodeRange[0]), toHexa(unicodeRange[1]))

def toUnicodeRanges(operators):
unicodeRange = None
Expand Down Expand Up @@ -463,7 +463,7 @@ def serializeValue(value, fence, separator):
for character in sequence:
md.write("U+%04X," % character)
totalCharacterCount += 1
md.write("U+0000} ");
md.write("U+0000}, ");
totalCharacterCount += 1
md.write("</code></td>");
md.write("</tr>")
Expand All @@ -476,10 +476,16 @@ def serializeValue(value, fence, separator):
count = len(knownTables[name]["singleChar"])
md.write("<tr>")
md.write("<td><code>Operators_%s</code></td>" % name);
md.write("<td>%d characters: <code>" % count)
for entry in sorted(knownTables[name]["singleChar"]):
md.write("U+%04X " % entry)
totalCharacterCount += 1
ranges = toUnicodeRanges(knownTables[name]["singleChar"])
if (len(ranges) * 2 < count):
md.write("<td>%d ranges (%d characters): <code>" % (len(ranges), count))
for entry in ranges:
md.write("%s, " % entry)
else:
md.write("<td>%d characters: <code>" % count)
for entry in sorted(knownTables[name]["singleChar"]):
md.write("U+%04X, " % entry)
totalCharacterCount += count
md.write("</code></td>")
md.write("</tr>")
md.write("</table>");
Expand All @@ -498,10 +504,18 @@ def serializeValue(value, fence, separator):
continue
count = len(knownTables[name]["singleChar"])
md.write("<tr>")
md.write("<td>%d characters in <strong>%s</strong> form: <code>" % (count, knownTables[name]["value"]["form"]))
for entry in sorted(knownTables[name]["singleChar"]):
md.write("U+%04X " % entry)
totalCharacterCount += 1

ranges = toUnicodeRanges(knownTables[name]["singleChar"])
if (len(ranges) * 2 < count):
md.write("<td>%d ranges (%d characters) in <strong>%s</strong> form: <code>" % (len(ranges), count, knownTables[name]["value"]["form"]))
for entry in ranges:
md.write("%s, " % entry)
else:
md.write("<td>%d characters in <strong>%s</strong> form: <code>" % (count, knownTables[name]["value"]["form"]))
for entry in sorted(knownTables[name]["singleChar"]):
md.write("U+%04X, " % entry)

totalCharacterCount += len(knownTables[name]["singleChar"])
md.write("</code></td>")
md.write("<td>%d</td>" % value_index);
value_index = value_index + 1;
Expand Down

0 comments on commit c5fd3d2

Please sign in to comment.