vimperator: describe caret mode functionality
[sheet.git] / digits.plp
index f688d054104071ac5d4d817215e2de8862d7acf8..a6a684e6ced5ba4d24d6539b990a8545c1adfcf8 100644 (file)
@@ -2,48 +2,59 @@
 
 Html({
        title => 'digit characters sheet',
-       version => 'v1.0',
+       version => '1.0',
        description => [
-               "Character comparison,",
-               "tracking letters as they evolve from Phoenician to modern scripts.",
-               "Good Unicode test sample.",
+               "Unicode glyphs of numbers 0 to 10 in various scripts.",
        ],
-       keywords => [qw'
-               script glyph unicode writing comparison character alphabet letter
-               history phoenician latin sample test language multilingual
-       '],
-       stylesheet => [qw'light dark red'],
+       keywords => [qw(
+               numeral numerical digit number counting decimal
+               script glyph unicode writing comparison list character
+               history sample test language multilingual
+       )],
+       stylesheet => [qw( light dark circus mono red )],
        data => [qw'writing-digits.inc.pl'],
+       raw => <<'EOT',
+<style>
+th:first-child { min-width: 10em }
+</style>
+EOT
 });
 
 :>
-<h1>Writing systems</h1>
+<h1>Numerals</h1>
 
-<p>Also see comparison of <a href="/writing">writing systems</a>.</p>
+<p>Digits and numbers counting up to ten
+in various <a href="/writing">writing systems</a>.</p>
 
-<div class="section">
+<div>
 
 <:
-use Shiar_Sheet::FormatChar;
+use Shiar_Sheet::FormatChar 1.08;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 unless (exists $get{v}) {
        $glyphs->{unicode}--;
        $glyphs->{anno}  = [];
-       $glyphs->{style} = 0;
+       $glyphs->{style} = 'univer';
 }
 
 my $scriptname = do 'writing-script.inc.pl';
-$_ = qq{<a href="/latin">$_</a>} for $scriptname->{latn} || ();
-
-my @table = do "writing-digits.inc.pl";
-die "Table data not found: <em>$_</em>.\n" for $! || $@ || ();
-
-$glyphs->print([map {
-       ref $_ eq 'ARRAY' ? @{$_} : map { ".>$_" }
-               $scriptname->{"digits_$_"} || $scriptname->{$_} || $_
-} @table]);
+$_ = showlink($_, "/latin") for $scriptname->{latn} || ();
+
+my $table = do "writing-digits.inc.pl";
+die "Table data not found: $_\n" for $@ || $! || ();
+
+sub printtable {
+       say '<div class=section>', $glyphs->tabletag;
+       for my $id (@_) {
+               my $info = $table->{$id};
+               my $title = $info->{title} // $scriptname->{$id} || $id;
+               print $glyphs->row([ ".>$title", @{$info->{list}} ]);
+       }
+       say '</table></div>';
+}
 
-:></div>
+printtable(@{ $table->{$_} }) for @{ $table->{default} };
 
-<hr>
+say "</div>\n";
+say for '<hr/>', $glyphs->legend;