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;
70 <h1>Common Digraphs</h1>
72 <p>i^k in <a href="/">Vim</a>.
73 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
76 my $diinfo = do 'digraphs.inc.pl';
77 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
89 my ($width, $digraphs, $rowheads, $colheads) = @_;
92 push @cells, sprintf '<td title="%s"%s>%s%s',
93 $di{ord $_} && $diinfo->{$di{ord $_}}->[1],
94 $_ eq '-' ? ' class="empty"' : $_ eq '=' ? ' class="reserved"' : '',
95 $_ eq '-' || $_ eq '=' ? ' ' : quote($_),
96 $di{ord $_} && sprintf(' <small>%s</small>', $di{ord $_})
100 splice @cells, $_ * $width, 0, '<th>'.($rowheads->[$_] || ' ')
101 for reverse 0 .. $#cells / $width;
106 push @rows, sprintf '<tr>%s', join '', splice @cells, 0, $width, ()
110 unshift @rows, sprintf '<thead><tr><td>%s<tbody>', join '',
111 map { sprintf '<th title="%2$s">%s', split(/:/, $colheads->[$_], 2) }
115 return sprintf "<table>%s</table>\n", join '', @rows;
118 print "<h2>Arrows</h2>\n\n";
119 print table(@$_) for (
120 [ 4 => [qw{↖ ↑ ↗ ↔ ← - → ↕ ↙ ↓ ↘ -}]],
121 [ 4 => [qw{⇖ ⇑ ⇗ ⇔ ⇐ - ⇒ ⇕ ⇘ ⇓ ⇙ -}]],
122 [ 3 => [qw{◤ ▲ ◥ ◀ ◆ ▶ ◣ ▼ ◢}]],
123 [ 3 => [qw{◸ △ ◹ ◁ ◇ ▷ ◺ ▽ ◿}]],
126 print "<h2>Line drawing</h2>\n\n";
127 print table(@$_) for (
128 [ 4 => [qw{┌ ┬ ┐ ─ ├ ┼ ┤ │ └ ┴ ┘ -}]],
129 [ 4 => [qw{┏ ┳ ┓ ━ ┣ ╋ ┫ ┃ ┗ ┻ ┛ -}]],
130 [ 3 => [qw{┍ ┯ ┑ ┝ ┿ ┥ ┕ ┷ ┙}]],
131 [ 3 => [qw{┎ ┰ ┒ ┠ ╂ ┨ ┖ ┸ ┚}]],
132 # [ 4 => [qw{╔ ╦ ╗ ═ ╠ ╬ ╣ ║ ╚ ╩ ╝ -}]],
133 # [ 3 => [qw{╒ ╤ ╕ ╞ ╪ ╡ ╘ ╧ ╛}]],
134 # [ 3 => [qw{╓ ╥ ╖ ╟ ╫ ╢ ╙ ╨ ╜}]],
137 print "<h2>Signs</h2>\n\n";
138 print table(@$_) for (
139 [ 3 => [qw{▘ ▀ ▝ ▌ █ ▐ ▖ ▄ ▗ ░ ▒ ▓}]],
140 [ 3 => [qw{□ ▣ ■ ▤ ▦ ▥ ▧ ▩ ▨}]],
141 [ 4 => [qw{♠ ♡ ♢ ♣ ♤ ♥ ♦ ♧}]],
142 [10 => [qw{☼ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar
143 # [12 => [qw{♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac
144 [ 8 => [qw{¤ ¢ ₥ € £ ₨ $ ¥ ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}]],
147 print "<h2>IPA</h2>\n\n";
148 print table(@$_) for (
151 p t - ʈ - c k q - = ʡ ʔ
152 b d - ɖ - ɟ ɡ ɢ - = - =
153 m ɱ - n - ɳ ɲ ŋ ɴ = = =
154 ʙ - - r - - - = ʀ = я =
155 - ⱱ - ɾ - ɽ - = ɢ̆ = - =
156 ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
157 β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
158 = = - ɬ - - - - - = = =
159 = = - ɮ - - - - - = = =
160 - ʋ - ɹ - ɻ j ɰ - - - =
161 = = - l - ɭ ʎ ʟ - = = =
162 ʘ - ǀ ǁ ǃ - ǂ - - = = =
163 ɓ - ɗ - - - ʄ ɠ ʛ - - -
174 'Voiced lateral fricative',
176 'Lateral approximant',
181 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',
194 [qw{Close Near-close Close-mid Mid Open-mid Near-open Open}],
195 [map {substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded"} qw{Front Central Back}]