4 title => 'digraph cheat sheet',
7 "Complete table of digraph characters from RFC-1345.",
10 digraph compose character char glyph table unicode vim
12 stylesheet => [qw'light'],
16 <h1>RFC-1345 Digraphs</h1>
18 <p>i^k in <a href="/">Vim</a>.
19 Also see <a href="/unicode">common digraphs</a>.</p>
21 <p class="aside">Unofficial <span class="Xz">proposals</span>
22 are available as <a href="/digraphs.vim">ex commands</a>.</p>
25 my $di = do 'digraphs.inc.pl';
28 [qw{! " % ' ( ) * + , - . /}],
29 ['0'..'9'], [qw{: ; < = > ?}],
30 ['A'..'M'], ['N'..'Z'],
31 ['a'..'m'], ['n'..'z'],
33 my @chars2 = (['_'], @chars); # trailing character (extended set)
35 print '<table class="glyphs dimap"><col>';
36 print qq'<colgroup span="$_">' for map {scalar @$_} @chars2;
37 print "</colgroup><col>\n";
38 for my $section (qw{thead tfoot}) {
39 print "<$section><tr><th>↳";
40 print '<th>', EscapeHTML($_) for map {@$_} @chars2;
43 for my $c1group (@chars) {
45 for my $c1 (@$c1group) {
46 print '<tr><th>', EscapeHTML($c1);
47 for my $c2 (map {@$_} @chars2) {
49 if (not defined $di->{$mnem}) {
53 if (ref $di->{$mnem} ne 'ARRAY') {
54 printf '<td class="X Xr" title="%s">', EscapeHTML($mnem);
57 my ($codepoint, $name, $prop, $script, $string) = @{ $di->{$mnem} };
59 my $glyph = $string || chr $codepoint;
60 utf8::upgrade($glyph); # prevent latin1 output
61 my $desc = $mnem . ($name && " ($name)");
62 my @class = ('X', grep {$_} $prop, $script);
64 $glyph = EscapeHTML($glyph);
65 $glyph = "<span>$glyph</span>" if $prop eq 'Zs';
67 printf "\n".'<td class="%s" title="%s">%s',
68 join(' ', @class), EscapeHTML($desc), $glyph;
70 print "\n<th>", EscapeHTML($c1), "\n";
76 <table class="glyphs"><tr>
77 <td class="X Cc">control
78 <td class="X Zs"><span>spacing</span>
79 <td class="X Mn">modifier
80 <td class="X Sk">spacing modifier
81 <td class="X Pf">quote
82 <td class="X Po">punctuation
83 <td class="X So">symbol
85 <td class="X Sc">currency
86 <td class="X No">numeric
87 <td class="X Greek">greek
88 <td class="X Cyrillic">cyrillic
89 <td class="X Latin">latin
90 <td class="X Hebrew">hebrew
91 <td class="X Arabic">arabic
92 <td class="X Hangul">korean
93 <td class="X Hiragana">japanese
94 <td class="X Bopomofo">chinese
97 <table class="glyphs"><tr>
99 <td class="X Xl">latin1
100 <td class="X Xa">ascii
101 <td class="X Xz">proposed