latin: unrestricted width of sample column
[sheet.git] / digits.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'digit characters sheet',
5         version => '1.0',
6         description => [
7                 "Unicode glyphs of numbers 0 to 10 in various scripts.",
8         ],
9         keywords => [qw(
10                 numeral numerical digit number counting decimal
11                 script glyph unicode writing comparison list character
12                 history sample test language multilingual
13         )],
14         stylesheet => [qw( light dark circus mono red )],
15         data => [qw'writing-digits.inc.pl'],
16         raw => <<'EOT',
17 <style>
18 th:first-child { min-width: 10em }
19 </style>
20 EOT
21 });
22
23 :>
24 <h1>Numerals</h1>
25
26 <p>Digits and numbers counting up to ten
27 in various <a href="/writing">writing systems</a>.</p>
28
29 <div>
30
31 <:
32 use Shiar_Sheet::FormatChar 1.08;
33 my $glyphs = Shiar_Sheet::FormatChar->new;
34 unless (exists $get{v}) {
35         $glyphs->{unicode}--;
36         $glyphs->{anno}  = [];
37         $glyphs->{style} = 'univer';
38 }
39
40 my $scriptname = do 'writing-script.inc.pl';
41 $_ = showlink($_, "/latin") for $scriptname->{latn} || ();
42
43 my $table = do "writing-digits.inc.pl";
44 die "Table data not found: $_\n" for $@ || $! || ();
45
46 sub printtable {
47         say '<div class=section>', $glyphs->tabletag;
48         for my $id (@_) {
49                 my $info = $table->{$id};
50                 my $title = $info->{title} // $scriptname->{$id} || $id;
51                 print $glyphs->row([ ".>$title", @{$info->{list}} ]);
52         }
53         say '</table></div>';
54 }
55
56 printtable(@{ $table->{$_} }) for @{ $table->{default} };
57
58 say "</div>\n";
59 say for '<hr/>', $glyphs->legend;
60