5 no warnings 'qw'; # that's not a comment, it's a NUMBER SIGN
6 use open IO => ':utf8';
10 $header{content_type} = 'text/html; charset=utf-8';
12 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
13 "http://www.w3.org/TR/html4/loose.dtd">
17 <title>digraph cheat sheet</title>
18 <meta http-equiv="content-type" content="utf-8">
19 <link rel="stylesheet" type="text/css" media="all" href="/digraphs.css">
48 background: transparent;
77 <h1>Common Digraphs</h1>
79 <p>i^k in <a href="/">Vim</a>.
80 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
83 my $diinfo = do 'digraphs.inc.pl';
84 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
96 my ($width, $digraphs, $rowheads, $colheads) = @_;
101 for my $cell (@$digraphs) {
105 $rows[-1] .= '<th>'.(shift @$rowheads || ' ') if $rowheads;
108 elsif ($cell eq '>') {
112 elsif ($cell =~ s/^-//) {
115 elsif ($cell eq '=') {
120 my $code = join '', map { $di{ord $_} || '' } split //, $cell;
121 my $name = $diinfo->{$code}->[1];
123 $rows[-1] .= sprintf('<td%s%s%s>%s%s',
124 defined $name ? qq{ title="$name"} : '',
125 defined $class ? qq{ class="$class"} : '',
126 $colspan > 1 && qq{ colspan="$colspan"},
127 $cell eq '' ? ' ' : quote($cell),
128 $code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
129 : length($cell) == 1 && $cell !~ /[a-z]/
130 ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
138 unshift @rows, sprintf '<thead><tr><td>%s<tbody>', join '',
139 map { sprintf '<th title="%2$s">%s', split(/:/, $_, 2), '', '' }
143 return sprintf "<table>\n%s</table>\n", join '', map {"<tr>$_\n"} @rows;
146 print "<h2>Common</h2>\n\n";
147 print table(@$_) for (
148 [ 3 => [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}]],
149 [ 3 => [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}]],
150 [ 3 => [qw{. å ä ö ü ß . Å æ ø ű ſ}]],
151 [ 3 => [qw{. ¿ ç ñ é ê è}]],
154 print "<h2>Arrows</h2>\n\n";
155 print table(@$_) for (
156 [ 4 => [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}]],
157 [ 4 => [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}]],
158 [ 3 => [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}]],
159 [ 3 => [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}]],
162 print "<h2>Line drawing</h2>\n\n";
163 print table(@$_) for (
164 [ 4 => [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}]],
165 [ 4 => [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}]],
166 [ 3 => [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}]],
167 [ 3 => [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}]],
174 [ 1 => [qw{. ╱ ╳ ╲ }]],
175 [ 4 => [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }]],
176 [ 3 => [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }]],
177 [ 3 => [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }]],
180 print "<h2>Blocks</h2>\n\n";
181 print table(@$_) for (
182 [ 3 => [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }]],
183 [ 3 => [qw{. ░ . ▒ . ▓ }]],
184 [ 2 => [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }]],
185 [ 2 => [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }]],
186 [ 3 => [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}]],
189 print "<h2>Signs</h2>\n\n";
190 print table(@$_) for (
191 [ 8 => [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}]],
192 [ 4 => [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}]],
193 [ 5 => [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar
194 [12 => [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac
197 print "<h2>IPA</h2>\n\n";
198 print table(@$_) for (
201 . p p̪ > > t ʈ c k q = ʡ ʔ
202 . b b̪ > > d ɖ ɟ ɡ ɢ = - =
203 . m ɱ > > n ɳ ɲ ŋ ɴ = = =
204 . ʙ - > > r - - = ʀ = -я =
205 . - ⱱ > > ɾ ɽ - = ɢ̆ = - =
206 . ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
207 . β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
208 . = = > > ɬ - - - - = = =
209 . = = > > ɮ - - - - = = =
210 . - ʋ > > ɹ ɻ j ɰ - - - =
211 . = = > > l ɭ ʎ ʟ - = = =
212 . ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
213 . ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
224 'Voiced lateral fricative',
226 'Lateral approximant',
231 qw'BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal EG:Epiglottal Gl:Glottal',
244 [qw{Close Near-close Close-mid Mid Open-mid Near-open Open}],
245 [map {substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded"} qw{Front Central Back}]
249 print "<h2>Japanese</h2>\n\n";
250 print table(@$_) for (
264 ['', qw{K S T N H M Y R W}],
291 ['', qw{K S T N H M Y R W}],