Navigate slides by keys

There are two events that interest us; roughly, `keypress` for those
that depend on the keyboard layout and `keydown` for those that don’t.

We store the key bindings as maps from the key code to the handler
function. If there is a handler for a particular key combination, we
call it.
Set font size

None of the usual font size units are good for presentations. A
comprehensive [research][1] on the matter involves taking into account
the screen size (when actually projected), the room depth (eye distance
of the farthest viewer), angular seconds and the visual acuity of
viewers.

[1]: http://www.thinkoutsidetheslide.com/selecting-the-correct-font-size/

We just base everything on a base size of 24pt on a 1024×768 96ppi
monitor, and scale that into `vh`s.
Body text rhythm

We have a line height of 1.5. To completely preserve line rhythm, we
could:

* separate paragraphs with a margin of 1.5em; *or*
* indent the first line of each paragraph and do away with the margin.

Neither is satisfactory for presentations — 1.5em is too wide and
indenting plays poorly with lists.

So we choose to use a margin of 0.75em. This way, the rhythm breaks on
odd paragraphs, and is restored on even ones.
List margins

The same margin of 0.75em should be applied to top-level lists, so that
they render consistently with paragraphs.
Heading 4

Heading level 4 will be just the same size as a regular paragraph, and
so has the same line height and margin.
Heading 3

A third level heading will be 1.5em relative to body text. It is big
enough to lose the boldness. To preserve rhythm, set line height to 1.
Margin is calculated against the increased size so reduce it to
0.5em (0.5×1.5 = 0.75).
Heading 2

A second level heading is twice as big as body text. In the line rhythm,
a single line of heading 2 stands for two lines of body. The margin is
set so that it multiplies to the normal 0.75 = 2 × 0.375.
Heading 1

First level heading is thrice as big as body text. Its line height is
set to 1 so that it uses the same double rhythm as h2. The margin is set
to multiply to 0.75 again.
Heading 5

Fifth and sixth level headings should not be used in presentations. But
just for completeness, fifth level will be 25% smaller than body text
and emphasized with bold. It will fit into the usual body text line by
setting the line height at 2 and margin to 1em.
Heading 6

Sixth level headings are similarly not recommended, but added for
completeness.
List padding

With a larger font, the default padding on lists is too small, causing
numbered list markers to overflow into the left margin.
Add test slides for paragraph lists

If you separate list items in markdown with empty lines, the markdown
engine makes each item a paragraphs. This makes it possible to have
multiple paragraphs in a list item.
Add background support

If the first element of the slide is an image, make it the background
for the slide and scale to the maximum.
Special classes for image slides

The markdown syntax for an image has a field for alt text. Since we turn
the image into a background, there’s nowhere we can put the alt text.
But we can (ab)use it to assign a special class to the slide, which then
can be used by the presentation author to style text of the slide.