What various packages, example code, or examples of existing documents with available source code are available to assist one in:
- Changing the style and formating of a table of contents?
- Building a new design for the table of contents from scratch?
This post is community wiki, everybody is invited to edit.
tocloft: provides many features for customizing the ToC and the and the ability to create new "Lists of ..."
titletoc: a companion for
tocbasic: offers basic features for managing table of contents and similar lists, for package authors and class writers, is part of the KOMA-Script bundle
tocstyle: provides many ways of customizing the ToC and such lists, still in development, is part of the KOMA-Script bundle
minitoc: for adding mini-tables-of-contents (minitocs) at the beginning of every chapter, part or section
tocbibind: can be used to add the ToC and/or bibliography and/or the index etc. to the table of contents
tocvsec2: gives control over section numbering and/or the entries in the table of contents on a section by section basis
etoc: (released a year after OP) claims a different approach than other toc packages. Instead of customizing an initial layout, you define "line-styles" for each toc level toc and can inject code for transitions between levels.
memoir class provides features which are very similar to the capabilities of
Click on an image to go to the source code and the explanation.