Possible Duplicate:
Generating a table of contents
How to create a dynamically self-updating table of content for a notebook? The TOC should contain the titles for the section, subsection, subsubsection etc. and should self-update as the new sections are added, and existing ones changed. A "dynamic self-updating" part may be loosen from the question if it's too hard, i.e. a function that can be ran to generate a TOC which i can then manually copy.