Collecting table of contents entries.