Index generation

The main difference between a Table of Contents and an Index is that the latter is typically composed of multiple entries that need to be sorted into alphabetical order. In addition, there may be multiple items with the same name that must be merged into a single entry.