From: Mischa POSLAWSKY Date: Sun, 23 Apr 2017 18:59:28 +0000 (+0200) Subject: writing: common method to display (univer) legend X-Git-Tag: v1.10~79 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/16499a59e8c124cedc7cc499a3ebfaeb714e1f44 writing: common method to display (univer) legend --- diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index 0a8a50a..6772dfc 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -274,5 +274,22 @@ sub print { } } +sub legend { + my @classes = ( + ["X l5" => 'unicode 1.1'], + ["X l4" => '20th century'], + ["X l3" => 'in 6.0 (2010)'], + ["X l2" => 'recent assignments'], + ["X l1" => 'proposed'], + ["ex" => 'irregular'], + ); + + return ( + '
', + (map { sprintf '
%s', @{$_} } @classes), + '
', + ); +} + 1; diff --git a/apl.plp b/apl.plp index ba51a11..9ca9970 100644 --- a/apl.plp +++ b/apl.plp @@ -80,16 +80,6 @@ for my $op (@ops) { :> -
- -
- -
unicode 1.1 - 20th century - in 6.0 (2010) - recent assignments - proposed - irregular -
-
+<: +say for '
', $glyphs->legend; diff --git a/writing.plp b/writing.plp index ee2d825..2f08da6 100644 --- a/writing.plp +++ b/writing.plp @@ -56,18 +56,7 @@ for ( } @table]); } -:> +say "\n"; -
- -
- -
unicode 1.1 - 20th century - in 6.0 (2010) - recent assignments - proposed - irregular -
-
+say for '
', $glyphs->legend;