<(common.inc.plp)><: Html({ title => 'APL', version => '1.0', description => [ ], keywords => [qw' '], data => [qw'apl.inc.pl'], raw => <<'EOT', <style> .target tbody td:nth-child(4) ~ td, :target tbody td:nth-child(4) ~ td { text-align: left; } .target tbody td[title]::after, :target tbody td[title]::after { content: ': ' attr(title); font-size: 75%; opacity: .7; } </style> EOT }); use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; my $ops = Data('apl'); :> <h1>APL Symbols</h1> <div class="section"> <table class="mapped" onclick="this.classList.toggle('target')"> <col><colgroup span=3><colgroup span=2> <thead><tr> <td rowspan=2>op <td colspan=3>input <td colspan=2>meaning <tr> <td title="unified/Dyalog key combination">⎈ <td><a href="/digraphs" title="digraph">di</a><td>html <td title="…B">monadic <td title="A…B">dyadic <tbody> <: for my $op (@{$ops}) { $op or do { say '<tbody>'; next; }; my ($chr, $dyad, $monad) = @{$op}; ($chr, my $altkey) = split /\n/, $chr; my $codepoint = ord $chr; my $ascii = $codepoint <= 127; my $info = $glyphs->glyph_info($codepoint); my ($class, $name, $mnem, $entity, $string) = @{$info}; printf '<tr><th title="%2$s">%s', $chr, EscapeHTML($name || '?'), $class; printf '<td class="%s">%s', @{$_} for ( [$ascii ? 'l5' : defined $altkey ? 'l4' : 'l3', $altkey], [defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : $ascii ? 'l5' : 'l1', EscapeHTML($mnem) // sprintf('%s%0*X', $codepoint < 256 ? (x => 2) : (u => 4), $codepoint)], [defined $entity ? 'l4' : $ascii ? 'l5' : 'l1', $entity // "#$codepoint"], ); printf( '<td%s>%s', map { defined ? (!!$_->[1] && qq( title="$_->[1]"), $_->[0]) : (' class=Xi', '') } $_ && [map { EscapeHTML($_) } split /\n/, $_, 2] ) for $monad, $dyad; say '</td>'; } :></table> </div> <: say for '<hr/>', $glyphs->legend;