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 would like to discard the entire document and have only the index remaining.


My naive attempt below does not produce any output. I want Page 2 of the document that gets generated if the \usebox{\DiscardBox} line is un-commented, but not Page 1.






share|improve this question
Index writing is performed at \shipout time, so if nothing is shipped out no index is produced. – egreg Dec 19 '12 at 22:02
why not just have a new document which inputs the .ind file of the first (and does nothing else) – David Carlisle Dec 19 '12 at 22:06
@DavidCarlisle: WOW!! That is pure genius... Never occurred to me. Seems to work fine. What do I need to do get only a one column index? Using just \input{<file>.ind} produces a two column output. – Peter Grill Dec 19 '12 at 22:14
look in chat:-) – David Carlisle Dec 19 '12 at 22:14
Are you talking visually remove everything but the index? That is, if you have a document of 10 pages with 1 page dedicated to the index, then you can delete pages 1-9 and only be left with "page 10"? – Werner Dec 19 '12 at 22:36
up vote 5 down vote accepted

imakeidx sets the number of columns with \imki@columns; so you can simply build another document with the following format:


\def\indexname{External index}


leaving to the class the rest.

share|improve this answer

Just have a new document which inputs the .ind file of the first (and does nothing else) .

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.