TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

Strange question, but I wanted to know if its possible to render only the table of contents and not the associated body of text below. Is there a suppression command that means that a section is processed but not drawn?

share|improve this question
And Welcome to TeX.SX. – Harish Kumar Dec 8 '12 at 10:15
Yeah, I was thinking I would have to do that. I just wondered if there were any other options. – alexganose Dec 8 '12 at 10:16
up vote 9 down vote accepted

You can do it by preparing a printtoc.tex file

\documentclass{book} % use the same class
\usepackage[italian]{babel} % if you use babel (same options!)
%% Add other packages that act on the page shape
%% you load in the main file

\frontmatter % if you use book or similar class
%\setcounter{page}{3} % if the original toc starts page iii




where I suppose that thesis.tex is the name of your main file.

share|improve this answer
Thank you thats brilliant. Just what I was looking for. – alexganose Dec 8 '12 at 10:40

If you put your text in separate files and \include them in a master file then you can use \includeonly to generate just a table of contents.

share|improve this answer

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.