<(common.inc.plp)><:
use 5.010; # state
+my $mode = ($ENV{PATH_INFO} // '') eq '/xorg' || exists $get{xorg};
+my $modename = $mode ? 'X.Org' : 'RFC-1345';
+
Html({
title => 'digraph cheat sheet',
- version => 'v1.0',
+ version => '1.1',
description => [
- "Complete table of digraph characters from RFC-1345.",
+ "Complete table of digraph characters from $modename.",
],
keywords => [qw'
digraph mnemonic compose composition pair
- character char glyph table unicode vim
+ character char glyph table unicode vim xorg x11 x
'],
stylesheet => [qw'light'],
data => [qw( digraphs.inc.pl )],
});
:>
-<h1>RFC-1345 Digraphs</h1>
-
-<p>Character mnemonics
-following composition key ⎄:
-i^k in <a href="/vi">Vim</a>,
-^u^\ in <a href="/readline">Emacs</a>,
-^a^v in <a href="/screen">Screen</a>.
-Also see <a href="/unicode">common Unicode</a>.</p>
-
-<p class="aside">Unofficial <span class="u-prop ex">proposals</span>
-are available as <a href="/digraphs.vim">ex commands</a>.</p>
+<h1><:= $modename :> Digraphs</h1>
+
+<p>Character mnemonics following compose key ⎄<:
+say join("\n",
+ $mode ? (
+ ' in the X Window System (Shift+AltGr by default).',
+ 'Differences from <a href="/digraphs">RFC-1345</a> are indicated.',
+ ) : (':',
+ 'i^k in <a href="/vi">Vim</a>,',
+ '^u^\ in <a href="/readline">Emacs</a>,',
+ '^a^v in <a href="/screen">Screen</a>.',
+ 'Similar but different from <a href="/digraphs/xorg">X.Org</a>.',
+ ),
+ 'Also see <a href="/unicode">common Unicode</a>.</p>',
+);
+say '<p class="aside">Unofficial <span class="u-prop ex">proposals</span>',
+ ' are available as <a href="/digraphs.vim">ex commands</a>.' if not $mode;
+:>
<:
my $di = do 'digraphs.inc.pl'
my @columns = !exists $get{split} ? \@chars2 :
([@chars2[0, 1, 3, 4, 6]], [@chars2[2, 5, 7]]);
-if (exists $get{xorg}) {
+if ($mode) {
my $xorg = do 'data/digraphs-xorg.inc.pl'
or die "Error loading Xorg data: ", $@ // $!;
$_ = [ord $_] for values %{$xorg};
print '<hr>' if exists $get{split};
}
-if (exists $get{xorg}) {
+if ($mode) {
:>
<div class="legend">
<table class="glyphs"><tr>