You need to assign an arbitrary ID to the entries in the category. It can be done something like this--we'll use the entry ID as the ID.
In the table of contents section, you want something like this:
CODE
<ul>
<MTEntries>
<li><a href="#entry<MTEntryID>"><MTEntryTitle></a></li>
</MTEntries>
</ul>
In the main-content section, you'd code your titles something like this:
CODE
<h3 id="entry<MTEntryID>"><MTEntryTitle></h3>