5 use open IO => ':utf8';
9 $header{content_type} = 'text/html; charset=utf-8';
11 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
12 "http://www.w3.org/TR/html4/loose.dtd">
16 <title>digraph cheat sheet</title>
17 <meta http-equiv="content-type" content="utf-8">
18 <link rel="stylesheet" type="text/css" media="all" href="/digraphs.css">
47 background: transparent;
76 <h1>Common Digraphs</h1>
78 <p>i^k in <a href="/">Vim</a>.
79 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
82 my $diinfo = do 'digraphs.inc.pl';
83 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
95 my ($width, $digraphs, $rowheads, $colheads) = @_;
100 for my $cell (@$digraphs) {
104 $rows[-1] .= '<th>'.(shift @$rowheads || ' ') if $rowheads;
107 elsif ($cell eq '>') {
111 elsif ($cell =~ s/^-//) {
114 elsif ($cell eq '=') {
119 my $code = join '', map { $di{ord $_} || '' } split //, $cell;
120 my $name = $diinfo->{$code}->[1];
122 $rows[-1] .= sprintf('<td%s%s%s>%s%s',
123 defined $name ? qq{ title="$name"} : '',
124 defined $class ? qq{ class="$class"} : '',
125 $colspan > 1 && qq{ colspan="$colspan"},
126 $cell eq '' ? ' ' : quote($cell),
127 $code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
128 : length($cell) == 1 && $cell !~ /[a-z]/
129 ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
137 unshift @rows, sprintf '<thead><tr><td>%s<tbody>', join '',
138 map { sprintf '<th title="%2$s">%s', split(/:/, $_, 2) }
142 return sprintf "<table>\n%s</table>\n", join '', map {"<tr>$_\n"} @rows;
145 print "<h2>Arrows</h2>\n\n";
146 print table(@$_) for (
147 [ 4 => [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}]],
148 [ 4 => [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇘ ⇓ ⇙ -}]],
149 [ 3 => [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}]],
150 [ 3 => [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}]],
153 print "<h2>Line drawing</h2>\n\n";
154 print table(@$_) for (
155 [ 4 => [qw{. ┌ ┬ ┐ ─ . ├ ┼ ┤ │ . └ ┴ ┘ -}]],
156 [ 4 => [qw{. ┏ ┳ ┓ ━ . ┣ ╋ ┫ ┃ . ┗ ┻ ┛ -}]],
157 [ 3 => [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}]],
158 [ 3 => [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}]],
159 # [ 4 => [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ -}]],
160 # [ 3 => [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛}]],
161 # [ 3 => [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜}]],
164 print "<h2>Signs</h2>\n\n";
165 print table(@$_) for (
166 [ 3 => [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ . ░ ▒ ▓}]],
167 [ 3 => [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}]],
168 [ 4 => [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}]],
169 [ 5 => [qw{. ☼ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar
170 # [12 => [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac
171 [ 8 => [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}]],
174 print "<h2>IPA</h2>\n\n";
175 print table(@$_) for (
178 . p p̪ > > t ʈ c k q = ʡ ʔ
179 . b b̪ > > d ɖ ɟ ɡ ɢ = - =
180 . m ɱ > > n ɳ ɲ ŋ ɴ = = =
181 . ʙ - > > r - - = ʀ = -я =
182 . - ⱱ > > ɾ ɽ - = ɢ̆ = - =
183 . ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
184 . β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
185 . = = > > ɬ - - - - = = =
186 . = = > > ɮ - - - - = = =
187 . - ʋ > > ɹ ɻ j ɰ - - - =
188 . = = > > l ɭ ʎ ʟ - = = =
189 . ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
190 . ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
201 'Voiced lateral fricative',
203 'Lateral approximant',
208 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',
221 [qw{Close Near-close Close-mid Mid Open-mid Near-open Open}],
222 [map {substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded"} qw{Front Central Back}]