TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have lecture notes in beamer for my classes which I compile into a single document. I put an \end{document} after the last page that I've lectured from on a given day and then post the resulting document. I update this throughout the semester.

The table of contents resulting from this document is of course just the section headings of the document as it appears. However, I would like to include the entire table of contents as a form of course outline that the students can see in advance of a topic being covered, and to keep the page numbers stable. I suppose that the links to future topics must either be inactive or give an error when clicked, and the page numbers blank, but I'd like the titles there.

Is there a way to do this?

share|improve this question
Welcome to TeX.SX. You can add syntax highlighting to inline code by putting it between `` like I did. – ℝaphink Sep 6 '11 at 13:25
@Raphink: Thanks for the fix – Liam Sep 7 '11 at 1:27
up vote 4 down vote accepted

If you have a final version of the lecture notes, compile them entirely. Then add \nofiles in the preamble, so when you add \end{document} at an earlier place, the table of contents auxiliary file will not be overwritten.

share|improve this answer
That sounds good, I will try it. One concern though: it sounds like this will suppress all intermediate files, not just the toc file. So if I change a reference in the lecture (say to another page), that won't get updated? Is that correct? If so, I'll have to remember to do the double processing (full and truncated) each time one of those other references changes. – Liam Sep 7 '11 at 1:25
This should not be a concern: no auxiliary file is (over)written, so all references will be correct. – egreg Sep 7 '11 at 7:48
Correct, no aux file is written or overwritten. So if references change, the new ones will not appear in the aux file, the old one will be used. This is happening to me. Also, I find that the table of contents pages inserted by beamer at the start of subsections are blank. I'm not sure why. – Liam Sep 24 '11 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.