[HTML5][] has a well-defined [outline algorithm][algo] (there's a nice
overview at [html5 doctor][html5doc]). Since browsers don't seem to
support an [outline view][view] yet, I decided to embed an
automatically-generated outline in a webpage using JavaScript. Thanks
to the [HTML5 outliner (h50) project][h5o], this is fairly
straightforward. However, I couldn't find an example on their site,
so here's a recipe to get you started.
Download the outliner javascript:
$ wget http://h5o.googlecode.com/files/outliner.0.5.0.62.js
or get the most recent version from the [h5o download page][download].
Then, start your page off with something like: