<head>
<title>digraph cheat sheet</title>
<meta http-equiv="content-type" content="utf-8">
-<link rel="stylesheet" type="text/css" media="all" href="/digraphs.css">
+<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
+ my %styles = map {$_ => $_} qw(dark circus mono red terse);
+ our $style = exists $get{style} && $styles{$get{style}} || 'light';
+ printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
+ $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
+ ) for keys %styles;
+:>
</head>
-<body>
+<body id="unicode">
<h1>Common uncommon Unicode</h1>
<p>i^k in <a href="/">Vim</a>.
my $colspan = 1;
for my $cell (@$digraphs) {
- my $class;
if ($cell =~ s/^\.//) {
# dot indicates start of a new row
push @rows, '';
my $name = $diinfo->{$code}->[1];
# determine display class
- if ($cell =~ s/^-//) {
-# $class = 'Empty';
+ my @class;
+ if ($cell eq '-') {
+ $cell = '';
}
elsif ($cell eq '=') {
- $class = 'Reserved';
+ push @class, 'di-invalid';
$cell = '';
}
- elsif ($cell =~ /[ -~]/) {
- $class = 'Ascii';
- }
- elsif (not $code) {
- $class = 'DiNone';
- }
- elsif ($diinfo->{$code}->[2] =~ /\bXz\b/) {
- $class = 'DiProp';
- }
else {
- $class = 'Di';
+ if ($cell =~ s/^-//) {
+ push @class, 'di-rare'; # discouraged
+ }
+
+ if ($code) {
+ push @class, 'di-d'; # digraph
+ push @class, 'di-prop' # unofficial
+ if $diinfo->{$code}->[2] =~ /\bXz\b/;
+ }
+
+ if ($cell =~ /[ -~]/) {
+ push @class, 'di-a'; # ascii
+ }
+ else {
+ push @class, 'di-b'; # basic unicode
+ }
}
# add cell html
$rows[-1] .= sprintf('<td%s%s%s>%s%s',
defined $name ? qq{ title="$name"} : '',
- defined $class ? qq{ class="$class"} : '',
+ @class ? sprintf(' class="%s"', join ' ', @class) : '',
$colspan > 1 && qq{ colspan="$colspan"},
$cell eq '' ? ' ' : quote($cell),
$code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
print_glyph_tables(
'Popular',
- [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}],
- [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}],
+ [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
+ [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
[qw{. å ä ö ü ß . Å æ ø ű ſ}],
[qw{. ¿ ç ñ é ê è}],
'Arrows',
[qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],
[qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}],
- [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}],
- [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}],
+ [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }],
+ [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }],
'Line drawing',
[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
- .>Plosive p p̪ > > t ʈ c k q = ʡ ʔ
- .>Voiced_Plosive b b̪ > > d ɖ ɟ ɡ ɢ = - =
+ .>Plosive p -ȹ > > t ʈ c k q = ʡ ʔ
+ .>Voiced_Plosive b -ȸ > > d ɖ ɟ ɡ ɢ = - =
.>Nasal m ɱ > > n ɳ ɲ ŋ ɴ = = =
.>Trill ʙ - > > r - - = ʀ = -я =
.>Tap/flap - ⱱ > > ɾ ɽ - = ɢ̆ = - =
.>Click ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
.>Implosive ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
}],
+ [qw{
+ co . ɕ . ʑ . ɧ . ɥ . ʍ . w
+ }],
[(
'-',
map { substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded" }
qw{Front Central Back}
), qw{
.>Close i y ɨ ʉ ɯ u
- .>Near-close - ɪ ʏ - ʊ -
+ .>Near-close ɪ ʏ - - - ʊ
.>Close-mid e ø ɘ ɵ ɤ o
.>Mid - - ə - - -
.>Open-mid ɛ œ ɜ ɞ ʌ ɔ
.>M ま み む め も =
.>Y や = ゆ = よ =
.>R ら り る れ ろ =
- .>W わ ゐ = ゑ を =
+ .>W わ -ゐ = -ゑ を =
}],
[qw{
- A I U E O
:></div>
-<p id="footer">
- <a href="http://vi.shiar.net/unicode">vi.<strong>shiar.net</strong>/unicode</a>
- <a href="git://dev.shiar.net/vi-cheat"><:= "v$VERSION" :></a>
- created by Shiar •
- <a title="Licensed under the GNU Affero General Public License, version 3"
+<div class="legend">
+ <table class="glyphs"><tr>
+ <td class="X di-a">ascii
+ <td class="X di-d">digraph
+ <td class="X di-prop">proposed
+ <td class="X di-b">other unicode
+ <td class="X di-rare">discouraged
+ </table>
+</div>
+
+<p class="footer">
+ <a href="http://sheet.shiar.nl/" rel="home">sheet.shiar.nl</a>/unicode
+ <a href="git://dev.shiar.nl/sheet" rel="vcs-git" title="Git repository"><:= "v$VERSION" :></a>
+ created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
+ <a title="Licensed under the GNU Affero General Public License, version 3" rel="copyright"
href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a> •
last update <:
use Time::Format qw(time_format);