Since LaTeX already has all of this information about the structure of the document, it can easily collect it and build a table of contents. It will only do this if you explicitly tell it to. LaTeX\ will put the table of contents wherever you include the line
\tableofcontentsin your document. To put the table of contents at the beginning (where people expect to find it) just put it in after the
\maketitle command. You should run LaTeX at least twice
after you add the table of contents, since it takes two or three tries
to get the table of contents right--once to write all the page
numbers out to a fileWhen you make major changes, LaTeX may tell you that you need to run it twice. It is always a good idea to do this before you print the final version of a document, just to make sure everything is correct.