charset: parent in subtitle of partial tables
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 27 Mar 2017 21:09:03 +0000 (23:09 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 29 Mar 2017 11:51:18 +0000 (13:51 +0200)
Clarify relations in default preset.

base.css
charset.plp

index 50b92d85e1f33d7983b4e5fa4dfadc1a478ffee6..34417073786f600c8fb5f1c08dbaf35676bc6779 100644 (file)
--- a/base.css
+++ b/base.css
@@ -28,6 +28,12 @@ h2, caption {
 caption {
        margin: 1ex;
 }
+caption aside {
+       position: absolute;
+       margin-left: 1ex;
+       font-weight: normal;
+       display: inline;
+}
 
 hr {
        clear: both;
index 734d227a0131104c025143e9cb9fd3e299480044..ebcbc32f5a1b2c061bc7232b85178150e323d8af 100644 (file)
@@ -51,6 +51,10 @@ my @request = map {
                if ($input =~ s/-$//) {
                        $endpoint = $row{offset} ? $row{offset} < 160 ? 159 : 191 : 127;
                }
+               if ($row{offset}) {
+                       $row{setnote} = 'over cp437' if $input eq 'cp850';
+                       $row{setnote} = 'over iso-8859-1' if $input =~ /^iso-8859-|^cp125/;
+               }
 
                if ($input =~ /^U([0-9a-f]+)(?:-([0-9a-f]+))?/) {
                        my $start = hex($1) << ($2 ? 4 : 8);
@@ -145,7 +149,9 @@ sub range_cell {
 
 for my $row (@request) {
        printf '<div class="section"><table class="glyphs%s">', !$row->{cell} && ' charmap';
-       printf '<caption>%s</caption>', $row->{set};
+       my $title = $row->{set};
+       $title .= " <aside>($_)</aside>" for $row->{setnote} // ();
+       printf '<caption>%s</caption>', $title;
        print '<col>' x 17;
        for my $section (qw{thead}) {
                print "<$section><tr><th>↱";