Take the 2-minute tour ×
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.

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

2 Answers 2

up vote 7 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

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

\chapter{\contentsname}

\makeatletter
\input{thesis.toc}
\makeatother

\end{document}

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

 
discard

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.