WP Table Of Contents plugins
I was using the rather nice Table Of Contents+ WordPress plugin to auto-generate tables of content on certain posts/pages, but that has since been abandoned. Luckely Steven A. Zahm took over development, and presto, we have the Easy Table of Contents plugin. You can peruse the sourcecode on GitHub.